Hello,
In attempting to apply to a LUKS LVM drive the instructions provided at
https://help.ubuntu.com/community/LiveCdRecovery#Update_Failure
for recovering from a failed update, I got stuck at the point of
mounting the EFI partition.
Here are some details:
I have backed up the EFI, boot and the LUKS linux partitions and so am
OK with experimenting with the drive. (Already messed up the EFI and
boot partitions, but was able to restore them successfully.)
After booting from LiveUSB:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C5CE78D6-06C1-4528-BF0F-098BAEE04CC0
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 2050047 999424 488M Linux filesystem
/dev/nvme0n1p3 2050048 2000408575 1998358528 952.9G Linux filesystem
ubuntu@ubuntu:~$ sudo cryptsetup luksOpen /dev/nvme0n1p3 n1p3
ubuntu@ubuntu:~$ sudo vgscan
ubuntu@ubuntu:~$ sudo vgchange -ay ubuntu-vg
ubuntu@ubuntu:~$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move
Log Cpy%Sync Convert
root ubuntu-vg -wi-a----- 867.47g
swap_1 ubuntu-vg -wi-a----- 63.85g
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ sudo mount /dev/ubuntu-vg/root /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:/$ sudo mount /dev/nvme0n1p2 /mnt/boot
The next step would be to "mount EFI to /mnt/boot/efi" followed by
ubuntu@ubuntu:~$ sudo chroot /mnt
But what does "mount EFI to /mnt/boot/efi" mean? Here's what is in the
EFI partition nvme0n1p1:
ubuntu@ubuntu:/$ sudo mount /dev/nvme0n1p1 /mnt/boot/efi
ubuntu@ubuntu:/$ ls -laFt /mnt/boot/efi
total 12
drwxr-xr-x 5 root root 4096 Apr 9 14:36 ../
drwxr-xr-x 4 root root 4096 Dec 7 09:11 EFI/
drwxr-xr-x 3 root root 4096 Jan 1 1970 ./
ubuntu@ubuntu:/$ ls -laFt /mnt/boot/efi/EFI
total 16
drwxr-xr-x 3 root root 4096 Feb 16 22:12 ubuntu/
drwxr-xr-x 4 root root 4096 Dec 7 09:11 ./
drwxr-xr-x 3 root root 4096 Dec 7 09:11 Dell/
drwxr-xr-x 3 root root 4096 Jan 1 1970 ../
ubuntu@ubuntu:/$ ls -laFt /mnt/boot/efi/EFI/ubuntu/
total 4736
-rwxr-xr-x 1 root root 112 Mar 5 15:47 grub.cfg*
-rwxr-xr-x 1 root root 1134456 Mar 5 15:47 grubx64.efi*
-rwxr-xr-x 1 root root 1153336 Mar 5 15:47 mmx64.efi*
-rwxr-xr-x 1 root root 1196736 Mar 5 15:47 shimx64.efi*
drwxr-xr-x 3 root root 4096 Feb 16 22:12 ./
-rwxr-xr-x 1 root root 67536 Feb 16 22:12 fwupx64.efi*
drwxr-xr-x 4 root root 4096 Dec 7 09:11 ../
-rwxr-xr-x 1 root root 1271672 Jun 17 2017 MokManager.efi*
drwxr-xr-x 2 root root 4096 Jun 17 2017 fw/
So what needs to be mounted to /mnt/boot/efi so that one may perform
recovery activities such as:
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# apt-get update
root@ubuntu:/# apt-get upgrade
root@ubuntu:/# apt-get dist-upgrade
root@ubuntu:/# apt-get install --reinstall
linux-image-4.13.0-39-generic
root@ubuntu:/# apt-get install --reinstall ubuntu-desktop
root@ubuntu:/# apt-get install --reinstall unity
Thanks.
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt