I had the idea of converting a live and running openSUSE installation from MBR to GPT/UEFI. I followed this tutorial and successfully converted disk keeping partitions and associated data. My original setup was the following:
/dev/sda1 ext4 /boot
/dev/sda2 LVM
/dev/root/root ext4 /
/dev/root/home ext4 /home
After converting disk to GPT, as I suspected, Linux didn't boot. BIOS didn't show me the option of MBR-booting Linux which now lives on a GPT disk. OK, it's time to setup grub2-efi
.
I need to install grub2efi
on /dev/sda
's EFI partition, which is 156MB large.
First, I have converted (read "backed up, formatted and restored files") /boot
into VFAT as required by EFI. I also double-checked that the partition type is EFI Boot.
I ran a Live openSUSE to mount & chroot into the root partition
# cryptsetup luksOpen /dev/sda2 root
# vgchange -a y suse
# mkdir /mnt/suse
# mount /dev/suse/root /mnt/suse
# mount /dev/suse/home /mnt/suse/home
# mount /dev/sda1 /mnt/suse/boot
# for i in /dev /dev/pts /sys /proc; do mount -B $i /mnt/suse$i; done
# chroot /mnt/suse
I tried with YaST Boot Loader configuration, and later with grub2-efi-install
but the result is always the following: when I EFI-boot into Linux I get GRUB's rescue console with error "unknown filesystem".
My current partition setup is the following
/dev/sda1 vfat /boot #only this changed
/dev/sda2 LVM
/dev/root/root ext4 /
/dev/root/home ext4 /home
Question straightforward: how do I make grub boot the encrypted system partition?