Understanding MBR, GPT, UEFI, BIOS, and GRUB

Hi,

I have problems wrapping my head around MBR, GPT, UEFI, and BIOS.

I understand that BIOS and MBR were first. BIOS is located on the mainboard and is what makes a PC with all its hardware startup.

The MBR is the first part on the hard drive which contains information about how the partitions of the hard drive are arranged and where the BIOS has to look to start up the OS located on the hard drive.

And this how I remember it working when there are multiple hard drives with an OS on it. The BIOS itself would pop up a menu asking which OS from which hard drive I want to start.

Now UEFI and GPT are where I lose it. Both are newer/updated versions of BIOS and MBR. As far as I understand UEFI has some general improvements and is designed to work with a hard drive that uses GPT which allows for more partitions and bigger drives. So why is UEFI so much different to BIOS and what the hell is GRUB in all of that.

I thought the thing that makes the OS on a hard drive start (bootloader) is baked into BIOS and UEFI, so why do I have to install like a custom one?

And it gets even weirder when combining Windows and Linux.

Let's say I have two hard drives plugged into my UEFI motherboard.

Disk A: Windows, GPT
Disk B: empty

Now I install Manjaro on the Disk B, I pick the MBR option, but then it looks like this:

Disk A: Windows, GRUB, GPT
Disk B: Manjaro, MBR

And in the UEFI menu it looks like this:

Manjaro (Disk A)
Windows (Disk A)

So does this mean I now have two separate bootloaders on my Disk A? One by Windows and the other one being GRUB which actually leads to Manjaro or Windows?

Why all of this fuss? Why cant the bootloaders be on the hard drive where the OS is actually located and UEFI asks you which one you want to start?

Is it safe to remove the GRUB on Disk A without breaking Windows or the bootloader for Windows? (When I tried Kubuntu it seemingly replaced the windows bootloader with GRUB and when I wanted to uninstall Kubuntu it failed to properly restore the Windows bootloader which made it unable for me to start Windows again)

bios let you choose between boot EFI or boot MBR but ....

for manjaro you need to have :
Secureboot disable
fastboot disable
csm disable
legacy disable
disks on AHCI
EFI on others ( not windows )

if you see on boot screen this
EFI: <partition 1 > you boot on EFI for install EFI
EFI: you boot for install MBR ( in fact EFI[legacy])
you boot on MBR for install MBR

but bios does always bad things , any little option requires any csm or legacy , it wont tell you and bios fallback in this case in MBR or Legacy

so you open a terminal and you check

inxi -Fxxxza 
efibootmgr -v
efivars 

ask microsoft , ask motherboard manufacturer why , not manjaro or any distro linux

https://duckduckgo.com/?q=bios+vs+uefi&ia=web

1 Like

prime answer! Why do we even have forums? Just google and wikipedia!

I already used this source beforehand

https://wiki.manjaro.org/index.php?title=Some_basics_of_MBR_v/s_GPT_and_BIOS_v/s_UEFI

So does this mean I now have two separate bootloaders on my Disk A? One by Windows and the other one being GRUB which actually leads to Manjaro or Windows?

Why all of this fuss? Why cant the bootloaders be on the hard drive where the OS is actually located and UEFI asks you which one you want to start?

I thought the thing that makes the OS on a hard drive start (bootloader) is baked into BIOS and UEFI, so why do I have to install like a custom one?

Is it safe to remove the GRUB on Disk A without breaking Windows or the bootloader for Windows?

so use EFI and GPT? got it

You are welcome!
:innocent:

Is this a hypothetic scenario or an actual sitution?
Please read:

Goodbye and Good luck!
:innocent:

the hypocrite
"Answer the actual question!"


This looks like a recipe for an unbootable system. GPT and MBR do not mix. GRUB should be on the disk where Manjaro is located, Windows has its own bootloader, so in a multi-disk setup like this, it would be best to use the UEFI to select Windows (disk A) or Manjaro (disk B) and bypass, ignore GRUB entirely. GRUB will not show a boot menu on disk B but is still there to boot Manjaro. Think of them like two separate computers, and you are using UEFI to choose which one to start up.

Yes. It is very easy. Create a Windows 10 live USB and execute a startup repair, which will remove GRUB from the disk and reinstall WBM.

This is actually the ideal setup. I'm quite shocked your UEFI does not give you the option to choose disks. Have you thoroughly checked your UEFI for settings for an option to display boot choices? There should be a hotkey you can press on boot to get a boot menu to come up. This can vary by firmware though.

UEFI vs BIOS. Ask hardware manufactures. They seem to think more restrictions equals better security. GRUB is GRUB. Windows Boot Manager is Windows Boot Manager. GRUB can tell Windows Boot Manager to start, but WBM must be utilized to start Windows, as its start process is vastly different from that of Linux. All your UEFI does is load the EFI sector of a particular disk into memory, which is the bootloaders. (GRUB or WBM) It is these bootloaders that activate and load the remainder of the system.

1 Like

Finally, a good reply, thank you.

Though I figured most of this out already with the help of people on Reddit and I moved further into it.

I found this handy tool https://github.com/arvidjaar/bootinfoscript

and it gave me this output:

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/nvme0n1p2   /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sde1        /                        ext4       (rw,noatime,discard)


=========================== sde1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env    

...

/dev/nvme0n1 = windows = 1 TB nvme
/dev/sde = linux = 256GB ssd
so on the windows drive I have efi with probably the windows boot loader.
on the linux drive I have mbr with grub

but now the part that I still don't understand is how UEFI displays it to me:
Manjaro (1TB nvme)
Windows (1TB nvme)

Why does UEFI somehow think that Manjaro is on the 1tb nvme?

The last time with Kubuntu this didn't work. Windows threw an error at me that is unable to restore the boot loader. Starting it manually by cmd didn't work either. I had to install windows on another drive and use Linux live boot from a USB stick to copy my files from the old, broken windows drive to the new one.
But now I'm not even sure if I have to go for this. Hopefully, the windows drive was untouched by all of the installation processes.

I have an Asus Z170 Pro mainboard and I can press a button to get a selection. If I don't press the button it will boot whatever I selected as default. The problem was not UEFI but I thought, that the bootloaders were not on the drives where their OS is.

So UEFI looks at /boot/efi of every drive. /boot/efi is where the bootloaders are located which point at where the OS is located and start it up. When there are multiple drives with /boot/efi then the UEFI lets me choose or set a default.

When I'm sure and I can confirm that the windows drive is untouched I will install Manjaro again on the Linux drive but this time with gpt and efi.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by