I have a 64-bit system running Arch Linux. MBR and its extended partition is a PITA. I’ve been using GRUB-Legacy far too long to see its limitations. Official support was recently dropped. So now is a good time to update from both in one go.
This is my log of how I did it. It worked for me, it might not work for you. I omit the details and specific commands and provide source links instead. Have a general understanding of what you are doing. If you do not need/want UEFI, or GPT, or GRUB2, if you don’t see the benefits of either, or if you not know what
modprobe does, this “guide” is not for you.
Read the entire post before you do anything.
- Make full system backup.
- Make rescue media. I have GParted Live, SystemRescueCD, Archboot, Linux Mint and Ubuntu. Get your own and learn to use it.
- Edit partition table. Make space for a UEFISYS partition, leave space at the beginning and end of hard drive for the GPT.
- Backup MBR. Also, copy this backup to external backup media.
- Reboot, enable EFI and see if you can boot. If so, you’re good to go. If not, reboot in BIOS mode. Continue at your own risk. You will have to use GRUB rescue mode later.
modprobe efivarsto enable
/sys/firmware/efiis populated, you’re good to go. If not, continue at your own risk. You will have to use GRUB rescue mode later.
- Convert from MBR to GPT.
- Create the UEFISYS partition.
- Backup GRUB-Legacy.
'modprobe efivars'worked previously, you’re more or less done.
If it didn’t work,
'grub-install' will fail with
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
After all, it’s still booted in BIOS mode without UEFI.