You are not logged in.
I have existing Arch Linux system. It is live production system where I can not take risk of messing up boot loader.
The existing system has old MBR based booting. UEFI boot is disabled in BIOS.
I am planning to switch to EFI based booting with new HDD.
Old HDD has 3 partitions: BIOS boot, /boot with ext4 and / with ext4.
New HDD also 3 partitions: BIOS boot, /boot with EFI FAT32 and / with ext4. (I know BIOS boot is not required but I created it to keep same layout)
I copied all files from existing /boot to /mnt/new/boot and from existing / to /mnt/new via rsync. More or less it makes new HDD as mirror image of old HDD.
Now I have to install grub on /mnt/new.
My question is can I run
# arch-chroot /mnt/new
# grub-install --target=x86_64-efi ...Is it safe to do? Or can it mess up existing MBR on sda? Or can it do unexpected things in BIOS or crash nvram? (system does have UEFI mode but disabled)
Is grub-install --no-nvram - specifically for such use cases?
Please advise.
Thank you.
Last edited by amish (2025-07-31 05:09:13)
Offline
Or can it mess up existing MBR on sda?
--target=x86_64-efi should not mess up MBR.
--no-nvram only works if the nvram already has the required entry or you have some other way to manage them.
You can use --removable, then boot it through UEFI boot menu. That works without nvram.
Once its booted in UEFI mode, then you can grub-install again without --removable.
My system boots in UEFI mode, however Grub is installed 3 times (UEFI, UEFI Removable, MBR). It's a fallback if the UEFI entry ever stops working.
Online