Install GRUB to Ubuntu Partition

Posted by Noel on Ask Ubuntu See other posts from Ask Ubuntu or by Noel
Published on 2012-09-20T00:53:31Z Indexed on 2012/09/20 3:51 UTC
Read the original article Hit count: 267

Filed under:
|
|

So my computer has the following partitions:

/dev/sda -- (I know this isn't a real partition, but more so the boot loader)

/dev/sda1 -- (Windows 7 Boot Loader)

/dev/sda3 -- (Windows 7)

/dev/sda4 -- (Data partition, NTFS)

that means i have /dev/sda2 as free space.

I do not want to change the MBR of the computer. I would like /dev/sda2 to contain GRUB AND Ubuntu. So ideally when I turn my computer on, BIOS would ask if I'd like to boot Windows 7 or Ubuntu(or Grub or partition 2), and I could choose either one. But I would like Grub and Ubuntu to be on the same partition, so they will not interfere in any way with windows or window's boot loader/partition (sda3)

How can I do this?

Catch: when formatting partitions, Ubuntu does not give me the option to make them virtual partitions, so that makes things harder.

I tried: installing Ubuntu to /dev/sda2 (which I formatted as ext4) and then told the Ubuntu installer to install the bootloader to /dev/sda2. But when I select "Ubuntu" from BIOS's boot selection, it loads a black screen and says "invalid arch independent ELF magic

grub rescue> _" and allows me to input stuff. How can I fix this, or tell my computer where Grub is?

© Ask Ubuntu or respective owner

Related posts about grub2

Related posts about partitioning