I have some of the manual commands in my notes. Your system will be different, but here are the ones for an older system here:
Code:
# sdf5 is the normal partition that contains the LUKS container. c720 is the "name" of the LUKS container
sudo cryptsetup luksOpen /dev/sdf5 c720
# Need some temporary directories to mount things
sudo mkdir /mnt/root /mnt/Stuff
# Activate the LVM VGs
sudo vgchange -ay
# Mount any LVs that you need from inside the encrypted storage - it might be easier to use /dev/{vgname}/{lvname} links than the mapper links. YMMV
sudo mount /dev/mapper/c720--vg-lv--Stuff /mnt/Stuff
sudo mount /dev/mapper/c720--vg-root /mnt/root
After commands similar to those you'll still need to setup a chroot to change the passwd. I always have to look up those steps on my tablet. Remember, the goal of the chroot is just to use the installed OS and to have access to the system programs, system boot files, and system settings AFTER we've already booted. https://superuser.com/questions/1111...x-installation has a guide. Ignore the Arch/Gentoo stuff. Any Ubuntu ISO for the same release can be used to boot into a "Try Ubuntu" environment. I always have an old 8GB flash drive laying around with Ubuntu-Mate on it for emergency use like this. The key is that the OS version on disk and the OS version on the flash drive need to be for the same release ... say 20.04 on both or 22.04 on both.
When you know what you are doing, fixing a corrupted boot issue takes 5 minutes, assuming zero hardware issues. The first time, it will take longer. This is also how we can access log files on a system that won't boot for troubleshooting needs. Lots of uses of the Try Ubuntu + chroot setup.
Bookmarks