how to fix grub

Goh Lip g.lip at gmx.com
Fri Jun 18 14:20:34 UTC 2010


On Fri, 18 Jun 2010 21:27:21 +0800, Matthias Andersson  
<matthias.andersson at pp1.inet.fi> wrote:


> I have noticed during the last week a problem with grub, at startup it
> stalls during the "loading grub" message if any of the two external
> hard-drives are connected to a USB port. The grub boot menu is never
> displayed.
>
> If none of the hard-drives are connected then grub loads up fine and
> boots the system.
>
> I've tried to run update-grub but it hasn't had any effects on the  
> problem.
>
> Cheers,
> Matthias Andersson


Yes, that's a common issue with external drives, more so with grub-legacy.  
The reason being the lines having (hd0,x)
and /dev/sdax changes easily (by bios) each time when booting up, causing  
the "root" of the grub system to be wrongly identified.

I suspect you are still on grub-legacy, because if you are on grub2, the  
lines below will take you to the correct partition even if the (hd0,x) or  
/sdax is wrong.

insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set c4aea9ce-65c8-415d-ac28-da51478e8053

Please verify whether you are on grub-legacy or grub2 and what version of  
ubuntu are you on? If on grub2, at Ubuntu's ternminal, do "sudo  
grub-install /dev/sda" *not* just "update-grub". If still having problem,  
please send output of grub.cfg.

If you are on grub-legacy, suggest you change to grub2.
I am on grub2, even then I've removed all instances of (hd0,x) - {there is  
no /dev/sdax} - but that's being too picky

Sisu - Goh Lip


-- 
If you understand, things are the way they are
If you do not understand, things are the way they are.




More information about the ubuntu-users mailing list