Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a PC that dual-boots Ubuntu and Windows Vista. I recently reinstalled Windows Vista after some problems and now the bootloader's gone.

I've been trying to follow this Ubuntu community guide but it's not working. I have Grub Legacy according to the first part (I installed Ubuntu 9.04 originally then upgraded).

From the 9.04 LiveCD, I ran this:

sudo grub-install --root-directory=/media/disk /dev/sda5

sda5 is the Ubuntu partition. I get this output:

grub-probe: error: Cannot open `/boot/grub/device.map`
[: 494: =: unexpected operator
Installing GRUB to /dev/sda5 as (hd0,4)...
Installation finished.No errors reported.
This is the contents...(etc)

(hd0)   /dev/sda

In the bit below, when I run setup (hd0) I get an error, "Error 17: Cannot mount selected partition"

Little help?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Found the problem, the line root (hd0,0) should have been root (hd0,4) since that is what was output from the earlier command.

Everything sorted.

share|improve this answer
    
You should mark your answer as an answer to the question. –  jneves May 16 '10 at 9:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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