repairing grub ed

On Manjaro/Arch 2021

reinstall ed

boot into live USB stick

find partitions
lsblk

mount system and enter (arch)
mkdir a
mount /dev/XROOT a
mount /dev/XEFI a/boot/efi
arch-chroot a

mount system and enter
mkdir a
mount /dev/XROOT a
mount /dev/XEFI a/boot/efi
mount -o bind /dev a/dev
mount -o bind /sys a/sys
mount -o bind /proc a/proc
mount -o bind /sys/firmware/efi/efivars a/sys/firmware/efi/efivars
chroot a

# test efivars
ls /sys/firmware/efi/efivars

install into /boot/efi/EFI/Manjaro
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Manjaro
update-grub

configure ed

(optionally install os-prober, mount other root partitions)

grub-mkconfig -o /boot/grub/grub.cfg

Categories: Computer