GRUB is messed up

I get the following output and when I try booting windows, it doesn't - it just hangs:

Code:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows NT/2000/XP on /dev/sdb1
grub-probe: error: Cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
done

Is this after running my updated script? can you post the output of sudo cat /boot/grub/device.map
 
I searched the net for that exact error and came across hundreds of posts from the grub1 days and all of them did not seem to be mission critical.

You can have a look in device.map if your hd was correctly mapped or you can just take a chance and reboot to see if it will work none the less.

There was a procedure for mapping devices, but it was for grub1 and I cannot find any good and solid documentation on grub2, even the official wiki is a bit lean on the information side of things (I'm still using grub1).

I had a look at my wifes PC and it seems that device.map is pretty straight forward.

On yours it should look something like this:
Code:
(hd0)  /dev/sda
(hd1)  /dev/sdb

Strangely the old grub partition numbering seems to be prevalent in this file...
 
Last edited:
With respect to drive mapping, the only change that has happened is that the first partition is now 1 and not 0. so it makes it less confusing to map say sda14 as the mapping is consistent with the partition reference. For that reason, device.map should be the same whether you use grub1 or grub2.

My suspicion is that if he were to reinstall grub and then run update-grub, it should work.
 
Is this after running my updated script? can you post the output of sudo cat /boot/grub/device.map

That was indeed after running your script. Looking at the device map list the following:

Code:
sudo cat /boot/grub/device.map
(hd0)	/dev/sda
(hd1)	/dev/sdb
 
Last edited:
what does sudo grub-install --recheck --no-floppy return?
 
Actually before I get you to run the correct grub-install, are your drives listed in your BIOS in the same order as they appear in the fdisk -l output?
 
Before you go ahead with the following, be comfortable that you can boot from a livecd and access your install via the method described in post #4. Also ensure that your /etc/grub.d/50_personal looks like the one in post #18.

So here goes:
$ sudo grub-install /dev/sda --recheck --no-floppy
$ sudo update-grub

Post any errors here (hopefully there will be none) before you reboot.
$ sudo
 
Before you go ahead with the following, be comfortable that you can boot from a livecd and access your install via the method described in post #4. Also ensure that your /etc/grub.d/50_personal looks like the one in post #18.

So here goes:
$ sudo grub-install /dev/sda --recheck --no-floppy
$ sudo update-grub

Post any errors here (hopefully there will be none) before you reboot.
$ sudo

I just booted with windows. I tried out the original boot option and it worked! I don't know what I did right, again.
 
the device.map error indicates there was something wrong with the grub install. running grub-install would have fixed that error.
 
Yep.

$ sudo rm /etc/grub.d/50_personal
$ sudo update-grub

That should do it. Or if you just want to remove the option but not the file:
$ sudo chmod -x /etc/grub.d/50_personal
$ sudo update-grub
 
Top
Sign up to the MyBroadband newsletter
X