-
-
Save codeliger/a966a4d640c1db1fdba8ac0f457ae5e4 to your computer and use it in GitHub Desktop.
Restore GRUB in UEFI + LVM + LUKS setup (Manjaro)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup: UEFI, LVM + LUKS encrypted drive | |
Bootloader: Grub | |
Links: | |
- https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader | |
- | |
Restore GRUB (boot into live env): | |
# get the encrypted partition (crypto_LUKS) | |
lsblk -f | |
cryptsetup open --type luks /dev/sda2 lvm | |
mount /dev/mapper/cryptVG-root /mnt | |
mount /dev/sda1 /mnt/boot # boot partition | |
mount -t proc proc /mnt/proc | |
mount -t sysfs sys /mnt/sys | |
mount -o bind /dev /mnt/dev | |
mount -t devpts pts /mnt/dev/pts/ | |
modprobe efivarfs | |
chroot /mnt | |
# I get the "EFI variables are not supported on this system." so do this: | |
mount -t efivarfs efivarfs /sys/firmware/efi/efivars | |
pacman -S mtools os-prober # probably not needed | |
# set use_lvmetad = 0 in /etc/lvm/lvm.conf | |
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro_grub --recheck | |
update-grub | |
# set use_lvmetad to previous value in /etc/lvm/lvm.conf | |
REBOOT and should work | |
Note: If initial ramdisk env needs to be updated and boot is unsuccessful do this: | |
- chroot like here but don't mount the boot partition | |
- make sure use_lvmetad is set correctly | |
mkinitcpio -p linux41 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment