Install GRUB to Ubuntu Partition

Solution 1:

BIOS is not smart enough to ask you about partitions, in fact, it knows nothing about partitions. From the BIOS point of view, your disk is just a sequence of 512-byte sectors.

When BIOS is ready to pass the control to the bootloader, it just reads the first 512 bytes from the disk and just blindly passes the control to whatever program is located at the predefined position in that data. It is the job of that program (MBR bootloader) to load the OS (this usually involves loading a more complex bootloader program from some other location on the disk).

Point is - it is your bootloader, stored in MBR, which is aware about partitions and stuff. You may have a Windows bootloader there or GRUB. If you find a way to configure the Windows bootloader to pass control to GRUB which is installed on /dev/sdaX then your schema would work although I never heard of anyone doing this. Windows is not very concerned about being able to load other OSes, you know.

It is possible to do what you want if you have two hard drives in your machine - just install Windows on one and Ubuntu on another, and switch between them in BIOS. Or, I don't know, maybe it is possible to put GRUB on a flash drive? That actually would be cool - if the drive is unplugged Windows would boot, if you plug the drive in then Ubuntu would boot (provided that "boot from USB" comes first in the list of boot devices) .

Solution 2:

I use a third party boot manager, which means I specifically want grub installed to a partition. It's easy to take care of this during installation since Ubuntu lets you put grub wherever you like. However, if you want to do it after the fact, it's as simple as:

sudo grub-install /dev/sda1 --force

where sda1 is the partition where you'd like to put it.

Solution 3:

May I ask why you don't want to install GRUB in the MBR, thus replacing the Windows bootloader?


Installing GRUB in a partition is not recommended and generally considered to be a bad idea. One is usually better off letting Ubuntu install GRUB in the hard drive's MBR.

GRUB can then take care of loading either Ubuntu or Windows. This is simple, harmless, and the recommended approach.

This process is also completely reversible, should you choose to return to Windows and use its bootloader exclusively.


Should you decide to install GRUB in the MBR (as you should), Boot Repair is the way to go.

Install GRUB

To install the GRUB bootloader, follow these steps.

Open a terminal in Ubuntu, and run the following commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair

After a few seconds, Boot Repair's main window will open.

Click on Recommended repair.

You're done!

Reboot to test everything out.

Hold down the Shift key as the computer boots to display the GRUB menu, which allows you to select which OS you'd like to boot.


Glossary

Bootloader: a piece of code that runs before any operating system is running. A bootloader is used to boot other operating systems. Each operating system usually has its own bootloader.

GRUB (Grand Unified Bootloader): a bootloader package developed to support multiple operating systems and allow the user to select among them during boot-up. It is Ubuntu's default bootloader.

Command, command line: the traditional Unix environment , where you type commands to tell the computer what to do.

Terminal: an application that allows you to access the command line. Open it by hitting its keyboard shortcut, Ctrl Alt T

Solution 4:

It's easy to do. Just download EasyBCD to edit the windows bootloader.