My system became unbootable after using sudo apt remove gnome-boxes and sudo apt autoremove as a result of the lvm2 package being removed. I use LVM groups, and upon restarting after the autoremove, my system no longer booted properly. Manually reinstalling lvm2 with sudo apt install lvm2 before restarting averts the problem.
The disk partitioning scheme I use is based on LVM on LUKS scheme described on the Arch Wiki. I have an unencrypted boot drive, and then an encrypted LUKS partition. Unlocking the LUKS partition yields a single LVM physical volume which has a single LVM volume group with 3 volumes: one for swap, one for the root partition mounted at /, and one for the home partition mounted at /home.
Steps to Reproduce
I tried using the Calamares installer to configure everything, but the installer crashes when trying to create the volume group, so I instead turned to a combination of GNOME Disks and the command line.
Initial Disk Configuration using GNOME Disks
- Delete all partitions on the drive
- Format the disk and choose a GPT partition table
- Create a /boot partition
- Size: 1 GB
- Volume Name: boot
- Type: ext4
- Create the primary partition
- Size: Remainder of disk
- Volume Name: main
- Type: Other-->No Filesystem (encrypted/LUKS)
- Lock the LUKS volume so that we have some control over the mount names in the next section.
- Run this command to unlock the LUKS volume and set the name to cryptlvm
sudo cryptsetup open /dev/nvme0n1p2 cryptlvm
- Create the physical volume
sudo pvcreate /dev/mapper/cryptlvm
- Create a volume group, in this case called system
sudo vgcreate system /dev/mapper/cryptlvm
- Now establish the LVM scheme
sudo lvcreate -L 16GB system -n swap sudo lvcreate -L 50GB system -n root sudo lvcreate -l 100%FREE system -n home sudo mkswap /dev/system/swap sudo mkfs.ext4 /dev/system/root sudo mkfs.ext4 /dev/system/home
- There is a bug in Calamares that requires a workaround to have the LVM volumes persist/stay mounted (see GitHub Issue), so the workaround steps are:
sudo mkdir /mnt/root sudo mkdir /mnt/home sudo mount /dev/system/root /mnt/root sudo mount /dev/system/home /mnt/home
Then, in one terminal window, run cd /mnt/root and in another terminal window, run cd /mnt/home and leave those windows open while the installer runs.
Installation and Subsequent Boots
Proceed through the installer and choose to mount the boot partition at /boot, /dev/system/root at /, and /dev/system/home at /home.
After restarting and booting into the freshly installed system, run
sudo apt remove gnome-boxes sudo apt autoremove
This will remove the lvm2 package, despite it being in use with the LVM volumes mounted at / and /home. Reboot again, and after decrypting the disk, you are dropped into Busybox with a bit of a messed up system.