Previous Post | Top | *** |
TOC
This is updated memo of Rescue media(1) (in Japanese).
Rescue media
There are many iso images which are useful for system administration and rescue tasks available on the web. Here are some of the notable ones:
- GParted live
- GOOD: active
- GOOD: Debian based system rescue media.
- GOOD: GUI partition manager
- BAD: Currently, Debian Lacks GUI LVM manager like blivet-gui
- TODO: Follow Create GParted live from scratch to install blivet-gui deb pakage
- debian-installer (netinst)
- GOOD: active and stable
- GOOD: This facilitates official Debian system install.
- BAD: “rescue mode” needs to mount a functioning root filesystem and it can’t be unmounted for filesystem operation (fsck…).
- Debian live
- GOOD: active
- GOOD: Debian based system rescue media.
- Kali Linux Live image
- GOOD: active
- GOOD: Debian based system rescue media.
- SYSTEM RESCUE HOMEPAGE
- GOOD: active
- FAIR: ARCHlinux based system rescue media
- Super Grub2 Disk/Rescatux
- GOOD: last release 2024 for Super Grub2 Disk (the multi disk/iso boot loader, now support btrfs)
- BAD: last released in 2021 for Rescatux (outdated linux iso image)
- Ventoy
- GOOD: active (the multi disk/iso boot loader w/o iso image)
Ventoy + Gparted for rescue USB-key
Since modern USB-keys have huge storage space, I decided to use ventoy and put all interesting iso images in it. This way, I only need to maintain one USB key.
For the moment, I will mostly use GParted live iso image.
Booting system with USB-key
- Sony Vaio SVT1313: power up system with a USB key inserted with “ASSIST” button.
- Thinkpad T14 Gen 1 (AMD): power up and press ENTER or F12
Use case: Migrating from ext4 to Btrfs for home
Let’s think about encrypted LVM install case where /dev/sda
holds LVM root
,
home
, and swap_1
. Let’s convert home
data to use btrfs instead of ext4.
- Boot from USB to use rescue boot shell
- Decrypt LUKS partion (
/dev/sda5
)sudo cryptosetup luksOpen /dev/sda5 sda5_crypt
- Now you see
/dev/mapper/hastname--vg-home
,/dev/mapper/hastname--vg-root
etc. - Mount
/dev/mapper/hastname--vg-home
tomnt/home
- Mount
/dev/mapper/hastname--vg-root
to/mnt/root
- Copy all data from
/mnt/home/username
to/mnt/root/home/
. - Remove mounting of
hostname--vg-home
iin/etc/fstab
by adding#
at the head of line..
- Decrypt LUKS partion (
- Boot normal SSD system
- Install required program
sudo apt install btrfs-progs
- Format forcebly the old
home
LV as btrfssudo mkfs.btrfs -f /dev/mapper/hostname--vg-home
- Check LV and VG names with
lvs
andvgs
- Rename the old
home
LV tobtrfs
LVsudo lvrename hostname-vg home btrfs
- Mount
/dev/mapper/hostname--vg-btrfs
at/mnt
sudo mount /dev/mapper/hostname--vg-btrfs /mnt
- Create subvolume
@home
at/mnt
sudo btrfs subvolume create @home /mnt
- Copy back data under
/home
to/mnt/@home
. - Change mounting of home in
/etc/fstab
to use@home
-subvolume for home.- Add
/dev/mapper/hostname--vg-btrfs btrfs default,subvol=@home 0 2
in/etc/fstab
- Add
- Reboot
- Install required program
NOTE: Use pvs
, vgs
, lvs
,and lvmdiskscan
commands to assess LVM
situation. These are lvm
subcommands but can be invoked as normal commands
without lvm
prefix.
NOTE: lvresize
can be invoked with -r
option to perform FS resize along
with LV resizing.
Previous Post | Top | *** |