So to my understanding the BIOS is firmware, i.e. software that's built into the hardware and is OS-independent.
But then we have bootloaders that boot up the operating system.
But then we have things like GRUB which are bootloaders, but also appear to be Linux-centric bootloaders?
I'm sort of confused why this is the case. Does every BIOS use GRUB? Does all hardware come with a built-in bootloader? Does something like GRUB boot up Windows, Linux, Mac, etc?
I'm trying to understand the cutoff point at which we move from OS-independence to OS-dependence, from the hardware/firmware side to the "whatever OS we've installed" side.
Trying to phrase this another way.
Let's say I go into a store and buy a pre-built Windows laptop. I hand it to you and you inspect it and say, "Okay, it's using this BIOS, this bootloader, this operating system."
I say "Cool. Now can you wipe Windows away and install Ubuntu on this instead? I want this laptop to be an Ubuntu laptop, not Windows."
Would this be possible? Would you need to change the bootloader? How would you know what to change it to? What if I had handed you a Macbook Pro instead? Could we wipe it and make it a Windows computer? Could we wipe it and make it a Ubuntu computer?
What determines compatibility and necessity here? When a laptop is sold does it come with a pre-loaded bootloader depending on the OS? What determines what we can change it to depending on the OS we want? What determines what OS we can run in the first place?
I am trying to wrap my head around the relationship between the hardware, BIOS, bootloader, and OS.