You are not logged in.

#1 2022-09-23 18:18:12

guissmo
Member
Registered: 2020-07-08
Posts: 8

[SOLVED] GRUB disappeared after update

So I did a

pacman -Syu

yesterday and I did see https://archlinux.org/news/grub-bootloa … ibilities/ however I forgot to do what is said and unsurprisingly GRUB doesn't work anymore.

My first solution was to boot a LiveUSB. I mounted my main Linux partition, chroot-ed into it and then tried the relevant update-grub and grub-install commands. However, it's been complaining about "efi variables are not supported on this system". I humbly admit that I don't know enough about EFI variables so I went into StackExchange and followed https://unix.stackexchange.com/a/91623/356742

I did modprobe efivarfs outside of the chroot, and efivar-tester worked outside of the chroot.
When I chroot in however, efivar-tester is an unknown command (so I guess I should have installed it) but more importantly trying update-grub and grub-install seems to confirm that efi variables don't work in the chroot-ed environment.

Thankfully, I dualboot with Windows and I can still boot into Windows (I'm using the forum on the same device but on the Windows-half of the dual boot).

What can I do to be able to update-grub and grub-install. Is this even the correct solution for the update?

Thanks in advance!

Last edited by guissmo (2022-09-23 19:30:19)

Offline

#2 2022-09-23 19:30:00

guissmo
Member
Registered: 2020-07-08
Posts: 8

Re: [SOLVED] GRUB disappeared after update

Solved it myself eventually with some help from the kind people in the unofficial Archlinux Discord!

I booted into the LiveUSB and did this.
Perhaps the order matters (can someone confirm this?) because I'm pretty sure I did this before posting but it worked the second time around.

mount /dev/MAINPARTITION /mnt
modprobe efivarfs
mount /dev/EFIPARTITION /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /sys/firmware/efi/efivars /run; do mount -B $i /mnt$i; done
chroot /mnt bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

Last edited by guissmo (2022-09-23 21:30:33)

Offline

#3 2022-09-24 11:16:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,991

Re: [SOLVED] GRUB disappeared after update

The order of the mount operations matters as well that you do it from the actual chroot yes.  the modprobe nor the for loop are strictly necessary if you use arch-chroot instead of standard chroot.

However just doing an -Syu on actual Arch Linux without also manually running grub-mkconfig should not have any effect, so if you are actually running something else, now you know why we do not support derivatives.

Last edited by V1del (2022-09-24 11:17:30)

Offline

Board footer

Powered by FluxBB