[Bug 1801629] Re: xubuntu-core needs to depend on cryptsetup and lvm2 or 'apt autoremove' will make a LUKS+LVM encrypted root partition non-bootable
lumbricus
1801629 at bugs.launchpad.net
Sun Feb 24 20:51:53 UTC 2019
I think I've been successful recovering the installation. Please let me
know if this makes sense or if there are any mistakes. People running
into this, will be happy to find recovery instructions here.
See also: https://askubuntu.com/a/1120949/27088
# find root partition
sudo fdisk -l
# unencrypt partition
# Note: replace /dev/nvme0n1p3 with your disk
# replace "nvme0n1p3_crypt" with the correct name
# check by running this in chroot:
# $ cat /etc/crypttab | cut -f1 -d " "
# nvme0n1p3_crypt
sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt
# mount root partition
sudo vgscan
sudo vgchange -ay
sudo mount /dev/mapper/xubuntu--vg-root /mnt
# prepare chroot environment
sudo mount /dev/nvme0n1p2 /mnt/boot/
sudo mount -o rbind /dev/ /mnt/dev/
sudo mount -t proc proc /mnt/proc/
sudo mount -t sysfs sys /mnt/sys/
# make dns available in chroot
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
# enter chroot
sudo chroot /mnt /bin/bash
# re-install missing packages
apt install cryptsetup lvm2
# re-generate (this might be done also by apt in the step before, I'm not sure)
update-initramfs -u -k all
# Leave chroot environment
exit
# Write buffers to disk
sudo sync
# Unmount file systems
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/boot
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1801629
Title:
xubuntu-core needs to depend on cryptsetup and lvm2 or 'apt
autoremove' will make a LUKS+LVM encrypted root partition non-bootable
Status in OEM Priority Project:
Fix Committed
Status in livecd-rootfs package in Ubuntu:
Fix Committed
Status in ubiquity package in Ubuntu:
Triaged
Status in ubuntu-mate-meta package in Ubuntu:
Invalid
Status in xubuntu-meta package in Ubuntu:
Invalid
Status in livecd-rootfs source package in Bionic:
Confirmed
Status in ubiquity source package in Bionic:
Invalid
Status in ubuntu-mate-meta source package in Bionic:
Invalid
Status in xubuntu-meta source package in Bionic:
Invalid
Status in livecd-rootfs source package in Cosmic:
Won't Fix
Status in ubiquity source package in Cosmic:
Won't Fix
Status in ubuntu-mate-meta source package in Cosmic:
Invalid
Status in xubuntu-meta source package in Cosmic:
Invalid
Status in livecd-rootfs source package in Disco:
Fix Committed
Status in ubiquity source package in Disco:
Triaged
Status in ubuntu-mate-meta source package in Disco:
Invalid
Status in xubuntu-meta source package in Disco:
Invalid
Bug description:
In a clean install of Xubuntu 18.10, if an unsuspecting user runs 'apt
autoremove', it will remove 'cryptsetup' and 'lvm2' making the system
non-bootable at next restart if an encrypted(LUKS+LVM) root partition
was selected during the ubiquity installer wizard:
$ sudo apt update && sudo apt --auto-remove full-upgrade && cat /run/reboo*
<snip...>
The following packages will be REMOVED:
cryptsetup cryptsetup-bin cryptsetup-initramfs cryptsetup-run dmeventd libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5 lvm2
<...snip>
This _will_ make the system non-bootable upon restart if LUKS+LVM are
active on the root partition. This would, by extension, make any auto-
mounted partitions(home, etc.) unavailable after boot as well!
WORKAROUND:
$ sudo apt install cryptsetup lvm2
<snip...>
cryptsetup is already the newest version (2:2.0.4-2ubuntu2).
cryptsetup set to manually installed.
lvm2 is already the newest version (2.02.176-4.1ubuntu3).
lvm2 set to manually installed.
<...snip>
ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: xubuntu-core 2.227
ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
Uname: Linux 4.18.0-10-generic x86_64
ApportVersion: 2.20.10-0ubuntu13
Architecture: amd64
CurrentDesktop: XFCE
Date: Sun Nov 4 18:20:38 2018
InstallationDate: Installed on 2018-11-04 (0 days ago)
InstallationMedia: Xubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.2)
SourcePackage: xubuntu-meta
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1801629/+subscriptions
More information about the foundations-bugs
mailing list