|
Size: 1368
Comment:
|
← Revision 4 as of 2025-12-03 04:39:13 ⇥
Size: 1552
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
== Reboot into BIOS == {{{#!highlight sh numbers=off sudo systemctl reboot --firmware-setup }}} [[https://superuser.com/a/1083166/20815|Ref]] |
|
| Line 7: | Line 15: |
| If using a chroot to reinstall entries, first setup various bind mounts outside the chroot: {{{#!bash |
If using a chroot to reinstall entries, first setup various bind mounts from outside the chroot into the chroot: {{{#!highlight sh |
Notes related to Extensible Firmware Interface (EFI).
Reboot into BIOS
sudo systemctl reboot --firmware-setup
Repair for Linux
To reinstall UEFI entries, check what's installed with efibootmgr --verbose which will list all boot entries, and the default. If the entry for the OS is missing (usually "debian" or "ubuntu"), the entry may need to be re-added. Rather than manipulating EFI variables, it's easiest to reinstall grub which ensures all files/etc are in the right place.
If using a chroot to reinstall entries, first setup various bind mounts from outside the chroot into the chroot:
1 CHROOT_ROOT=/mnt
2 # mount --bind /dev/ $CHROOT_ROOT/dev
3 # mount --bind /dev/pts $CHROOT_ROOT/dev/pts
4 # OR
5 mount --rbind /dev/ $CHROOT_ROOT/dev
6 mount --bind /sys $CHROOT_ROOT/sys
7 mount --bind /proc $CHROOT_ROOT/proc
8 mount --rbind /run $CHROOT_ROOT/run
9
10 modprobe efivarfs
11 mount -o bind /sys/firmware/efi $CHROOT_ROOT/sys/firmware/efi
Also ensure the EFI partition is mounted at the correct location (e.g. usually /boot/efi).
After entering the chroot, reinstall grub with:
grub-install --target=x86_64-efi --efi-directory=/boot/efi
Afterwards, double-check the boot entry shows up with efibootmgr.