3

I have 2 separate HDDs - one has Win7 and the other has Ubuntu 11.04.

When I installed Ubuntu I placed the GRUB/MBR on the partition, not the device, is this why it will not boot into Ubuntu?

Can I easily copy the MBR to the device area or do I have to reinstall?

and educationally, why is there the option to use the partition if it doesn't work?

Thanks

1 Answer 1

4

Install the MBR to the disk with Ubuntu on it and configure the BIOS to boot from Ubuntu's disk instead of the Win7 one.

Since you cannot boot into Ubuntu, you'll need the Live CD to boot and repair things.

  1. Boot from the Live CD.
  2. Mount the partition containing the Ubuntu installation (by opening it in the file browser for example)
  3. Open a Terminal
  4. Run the mount command to get a list of mounted partitions, you need to know the device name of the Ubuntu installation. Search for a line matching type ext4

    ..... stripped for saving space .....
    /dev/sda2 on /media/disk type ext4 (rw)
    

    Here, /dev/sda2 is the partition and /dev/sda is the device name

  5. Now install the MBR, use the device name from step 4 and the folder name between on and type. Replace the names accordingly and run:

    sudo grub-install --boot-directory=/media/disk /dev/sda
    
  6. Reboot afterwards, do not forget to check your BIOS settings.

You can install GRUB to a partition because other bootloaders can chainload GRUB. (GRUB can chainload the Windows bootloader in the same way)

2
  • Sorry, I'm not sure I follow. How can I do that when I can't even boot into Ubuntu?
    – SuperJumbo
    Jun 14, 2011 at 13:06
  • 2
    Updated with instructions for recovering from a Live CD.
    – Lekensteyn
    Jun 14, 2011 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .