2

Possible Duplicate:
How can I repair grub? (How to get Ubuntu back after installing Windows?)

Hi installed W7 after Ubuntu 11.04, and it broke up my boot options, I followed this tutorial to restore boot loader: Recovering Ubuntu After Installing Windows. But when i run:

sudo grub-install --boot-directory=/media/5292fba2-f517-466d-a120-b8a61a97ca8a/boot /dev/sda2

I get this errors:

/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.

Can somebody help me with this? thanks in advance.

marked as duplicate by Eliah Kagan, Jorge Castro, fabricator4, hhlp, Eric Carvalho Jan 11 '13 at 16:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

The guide do not say to use /dev/sda2: it is a partition.

You should install GRUB to the disk boot sector, I suppose in your case is /dev/sda.

2

Sometimes there are good reasons to install GRUB2 into a partition, not into the disk's MBR, e.g. when you have multiple operating systems on the disk. The 11.10 Kubuntu installer did install grub2 into a partition without problems, and I could boot-chain into it from the bootloader installed in the MBR. But when moving partitions around, one has to manually use grub-install.

The command is then:

sudo grub-install --force /dev/sda6
  • Had a dual boot on iMac with refit pointing to ubuntu partition, and need to install grub directly there. this did the trick! – Jobi Carter Dec 31 '12 at 1:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.