GRUB to MBR or ESP?

When you run into problems installing MX Linux XFCE
Message
Author
User avatar
ExL
Posts: 9
Joined: Wed Nov 27, 2019 9:51 pm

GRUB to MBR or ESP?

#1 Post 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
You do not have the required permissions to view the files attached to this post.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: GRUB to MBR or ESP?

#2 Post 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.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

philotux
Posts: 280
Joined: Sun Apr 22, 2018 12:57 pm

Re: GRUB to MBR or ESP?

#3 Post 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.

User avatar
ExL
Posts: 9
Joined: Wed Nov 27, 2019 9:51 pm

Re: GRUB to MBR or ESP?

#4 Post 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
You do not have the required permissions to view the files attached to this post.

Huckleberry Finn

Re: GRUB to MBR or ESP?

#5 Post by Huckleberry Finn »

This is just a saying that became almost identical with the word Linux: " KISS " :)

User avatar
fehlix
Developer
Posts: 12750
Joined: Wed Apr 11, 2018 5:09 pm

Re: GRUB to MBR or ESP?

#6 Post 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

Code: Select all

sudo efibootmgr -v
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
:puppy:

User avatar
asqwerth
Developer
Posts: 7976
Joined: Sun May 27, 2007 5:37 am

Re: GRUB to MBR or ESP?

#7 Post 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.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
ExL
Posts: 9
Joined: Wed Nov 27, 2019 9:51 pm

Re: GRUB to MBR or ESP?

#8 Post 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

User avatar
fehlix
Developer
Posts: 12750
Joined: Wed Apr 11, 2018 5:09 pm

Re: GRUB to MBR or ESP?

#9 Post 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.

Post Reply

Return to “Installation”