Page 1 of 1
GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 2:02 am
by ExL
I am new to Linux. I have been trying to understand the proper way to install MX-19 on my Lenovo C30 PC. My GParted disk looks very similar to the one from the T530 in Dolphin's video
https://www.youtube.com/watch?v=PA0QGL2d2Zk. The first partition, /dev/sda1/ is an EFI system partition.
GParted_Screenshot.png
The HD partition style is GPT. I believe that means I am using UEFI. WWhen installing MX Linux 10, and I get to the step where it asks to install the GRUB boot loader, I'm not sure whether I should choose MBR (like Dolphin's video shows) or ESP, which I believe is for use with UEFI.
Thanks,
Ed
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 2:17 am
by JayM
I'm no UEFI expert but I think ESP stands for EFI System Partition, which is what (U)EFI systems use instead of Master Boot Records. So that's probably the one you want to install GRUB to.
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 7:49 am
by philotux
For an installation in UEFI mode, the grub should be installed in a FAT32 formatted EFI system partition (ESP). I even make a separate ESP for each of my installs to eliminate the risk of future major updates of Windows to overwrite the Grub.
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 11:57 am
by ExL
There are many different examples online of partitions for dual booting Linux. It seems like most do not add a second ESP. I don't understand how GRUB works with only one ESP. Does it replace the Windows boot? What if I want to remove MX-19 later and replace it with another distro?
If I want to add a second ESP, would I add three new partitions to my unallocated space, including a second ESP? If so, how would I tell the GRUB installer to use the second ESP?
Possible_Dual_Boot_Partitons.png
Thanks,
Ed
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 12:59 pm
by Huckleberry Finn
This is just a saying that became almost identical with the word Linux: " KISS " :)
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 3:48 pm
by fehlix
ExL wrote: Thu Nov 28, 2019 11:57 am
I don't understand how GRUB works with only one ESP. Does it replace the Windows boot? What if I want to remove MX-19 later and replace it with another distro?
If I want to add a second ESP, would I add three new partitions to my unallocated space, including a second ESP? If so, how would I tell the GRUB installer to use the second ESP?
UEFI-boot does not have one bootloader, but as many as NVRAM EFI-table within the firmware can hold.
You can see the current list if NFRAM entries by running
The installer will copy efi-grub-loader into a new directory within the selected ESP,
e.g. for MX-19 Linux into /EFI/MX19/grubx64.efi and will announce this new efi-loader
into the NVRAM firmware UEFI-bootmenu to make it selectable when pressing Fn-key (e.g. F12) during
boot-up. Other OS's boot efi-loader get not overwritten.
E.g. the WinOS efi-loader is located at /EFI/Microsoft/Boot/bootmgfw.efi.
WinOS-update sometimes reshuffles the order the NVRAM EFI-boot-entries or removes other efi-loader,
also it appears it does often replace the default fallback efi-loader at /EFI/Boot/bootx64.efi
with it's own one. The fallback loader is normally not needed as it's mainly needed for removable devices.
You can always manually sort either by going into the firmware-setup or by running efibootmgr from Linux.
You would select the EFI System partition from a drop-down list within the installer.
Most user will just use the existing ESP, but you can create an additional ESP as suggested by @philotux.
ESP needs to be FAT and marked as esp/boot, e.g. by using Gparted.
HTH

Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 8:00 pm
by asqwerth
Consider the ESP the dumping ground for all bootloaders, which you would then reorder (to set which distro's bootloader to boot first as the controlling grub) using BIOS or the efibootmgr terminal command.
Thus you only need 1 ESP.
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 8:43 pm
by ExL
I'm all for KISS, and would be fine with one ESP. But I noticed that most tutorials recommend 250MB to 512MB for the ESP partition. The default Windows ESP is only 100MB. I don't plan on installing multiple Linux distros, so maybe a 100MB ESP would be adequate.
Thanks for all the suggestions.
Ed
Re: GRUB to MBR or ESP?
Posted: Thu Nov 28, 2019 8:55 pm
by fehlix
The size of the efi-grubloader installed by MX-19 is about 128 KB. So with 100MB ESP-size you have plenty of space.