Where to install grub?

22,393

/dev/sda is a good place to install it - installing onto a partition only works if you have some means of chain-loading your bootloader.

Share:
22,393
Hailwood
Author by

Hailwood

I could tell you all about me... but I'd prefer to let my work do the talking for me!

Updated on September 18, 2022

Comments

  • Hailwood
    Hailwood over 1 year

    So,

    My partition table looks like:

    /dev/sda
     /dev/sda1 16708MB  (Windows Recovery Environment (loader))
     /dev/sda2 367MB    (Windows 7 (Loader))
     /dev/sda3 368203MB (Windows 7 Files)
     /dev/sda5 348000MB (Where I am mounting /)
     /dev/sda6 16874MB  (Swap)
    

    So, looking at that There are two loaders there already, Ubuntu gives me the option of installing grub to:

    /dev/sda
    /dev/sda1
    /dev/sda2
    /dev/sda3
    /dev/sda5
    

    Now I am not sure where I should install grub, In the root, over the top of the windows 7 loader, or in the ubuntu / partition?

  • thomasrutter
    thomasrutter over 11 years
    To put it another way - your computer will boot first from the master boot record (MBR) on the drive configured in the bios as the boot drive. This MBR is not in any partition, it comes before any partitions. So you have to have a boot loader in your MBR, even if it's just a small bootstrap code which then goes on to load boot code in one of the partitions (which Grub does). You MUST install Grub into the MBR unless you have some other bootloader in it which you want to run before Grub, and it's able to then chain-load Grub. You almost never want to do that, even if dual-booting w/Windows.