Bootloader – Where is the Boot Loader Installed


Where is the boot loader, such as Grub, installed generally?

When I install 12.04 along side Windows on different partitions of my disk, I encountered a choice for "Device for boot loader installation". If I understand it correctly, it is to specify where to install the boot loader Grub,

I found on the internet that it is to specify the disk that contains the partitions for the OS, not any partition on the disk. E.g.
disk sda, not partition sda1, sda2.


I wonder where the boot loader installed actually on the disk?

Is it installed on any of the existing partitions for the OSes and for personal data, or does it have its own partition, which is also visible e.g. from system monitor of Ubuntu?

Thanks and regards!

Best Answer

The boot loader needs to be installed where the BIOS is looking for something to boot. To keep things simple, you usually have a disk drive where your computer boots from, you install a GNU/Linux system in that disk and the bootloader gets there too.

The only things you need from the bootloader are really:

  • That the BIOS is able to find it
  • That it is able to find and boot your Operating System (with Linux, you just need the bootloader to have somehow access to the kernel and, if you're using one, the initrd image.)

As far as you have these two points covered, you install it where it is more convenient and where the BIOS will look for it.

The BIOS will usually look for bootloaders in the Master Boot Record of hard drives, a small area in the beginning of the drive where you can put some code to be run. You can also have a bootloader installed at the beginning of a partition.

Bootloaders are usually small enough to fit in these small areas, and even if they don't, they must put something there so the BIOS boots the bootloader.

lilo is a simple bootloader which is installed in those areas. grub is a bit bigger, and so you install some code in those areas, which, then, loads some more code from a disk partition (where grub is said to be "installed", where its configuration file lies, along with the binary code, this is usually set to be the system /boot partition, where kernels and initrds are placed too, for convenience).

In this case, if it is prompting you for the disk, this means it's asking you on which Master Boot Record should grubget installed, that is, the disk you will be booting the computer from. That part of grub will be installed only on the disk MBR. The rest probably gets installed to the same partition as / or /boot/ of the Ubuntu system you're installing (and that rest is accessible from Ubuntu, look for directories /boot/grub/ or /grub/).

Related Question