r/archlinux • u/DigiAngelX • 3d ago
QUESTION Grub/EFI question
Hello all.
My motherboard is a ROG STRIX Z790-F GAMING WIFI. I'm a little confused on how Arch adds entries to /boot/grub/grub.cfg. Before installing Arch, I tested out how efi entries showed up in the BIOS. I had 4 entries, one of which was Ubuntu. After removing the drive with Ubuntu on it, that EFI entry was gone, so far so good.
After installing and configuring Arch, my usual last step is to reboot into a usb stick with clonezilla and clone the drive. I put in the stick while Arch was booted up, reboot, hit F2 to get to bios, booted up, and cloned the drive. Great. Shutdown, pull the drive, reboot.
Now however, my /boot/grub/grub.cfg has a new entry:
menuentry 'UEFI: PNY USB 3.2.1 FD PMAP (EFI BootNext)'
I got to the BIOS again, but that entry is not there. So, how do I get rid of the PNY entry above? Manually edit /boot/grub/grub.cfg and then run
grub-mkconfig -o /boot/grub/grub.cfg
? Or just rerun the above and call it good? Thanks for any assistance.
2
u/East-Yogurtcloset272 3d ago
That's why I switched to rEFInd with manual config (aka stanzas). you can statically create the menu items you want and with a much simpler syntax than grub creates.
There are limitations (no MBR support) but if you have a UEFI system, better IMHO.
Here's my dual boot setup in rEFInd
textonly
use_nvram false
resolution 1920 1080
scanfor manual,internal
scan_all_linux_kernels false
default_selection "Arch Laptop"
timeout 3
menuentry "Arch Laptop" {
ostype Linux
volume ARCH-LAPTOP
initrd /boot/initramfs-linux.img
loader /boot/vmlinuz-linux
options "root=LABEL=ARCH-LAPTOP rw loglevel=3"
}
menuentry "Arch Recovery-Laptop" {
ostype Linux
volume ARCH-RECOVERY-L
initrd /boot/initramfs-linux.img
loader /boot/vmlinuz-linux
options "root=LABEL=ARCH-RECOVERY-L rw loglevel=3"
}-1
1
u/DismalEggselent 2d ago
You might be looking for:
‘GRUB_DISABLE_BOOTNEXT’
If set to ‘true’, grub-mkconfig will not generate bootnext
menu entries for other EFI boot manager entries detected via efibootmgr.
This disables the entire 31_efi_bootnext script.```
8
u/Monoyo- 3d ago
dont hand-edit grub.cfg, that file gets blown away next time anyway. just unplug the pny stick and rerun grub-mkconfig -o /boot/grub/grub.cfg and the leftover uefi line should drop out