-   Linux - General (
-   -   How do you recover when grub boots to 'grub>'? (

m223464 05-02-2012 01:13 PM

How do you recover when grub boots to 'grub>'?
How do you recover when grub boots to 'grub>'?


I actually know most of the answer to my question, but I am stuck on one point.

If grub.conf is corrupt a server will boot to 'grub>'. To boot the server you need to build the root, kernal and initrd lines which would normally appear in grub.conf. I know how to figure out everything excpet the dev device for the boot partition which is needed for the 'root=' parameter on the kernel directive.

I can find and cat /etc/fstab but I'm on Centos6 and it only lists the UUIDs of the partitions.

I could try each dev device one by one until I eventually select the right one but I was hoping there is a more sensible approach. Sadly I've search online but not found a solution to this yet.

Grateful for any advice on this.


colorpurple21859 05-02-2012 01:39 PM

root=UUID=<UUID number>

m223464 05-02-2012 02:03 PM

Thanks. I forgot you could do that. Is there no way of translating it though as I seem to mistype the UUID frequently when performing these recovery tests.

colorpurple21859 05-02-2012 02:09 PM

I don't think so, but not for sure, someone on here with more brains(of course it don't take a whole lot to pass me up in brain power LOL) then me might know that answer.

jefro 05-02-2012 07:33 PM

Live cd's help find out stuff.

thewird 05-06-2012 11:14 AM

Any chance you figured this out? I have a similiar problem if you could help me out. Thanks.


m223464 05-07-2012 06:57 AM


I concluded there's no way to translate a UUID to device in grub. Whilst tune2fs and blkid offer this, it's obviously not available whilst you're in grub. Therefore the realistic options are:

1. Use the UUID for / in 'cat (hd0,X)/etc/fstab'
2. Trial and error until you hit the correct disk
3. Keep a record of important configuration info of your servers off the system which incudes the UUID maping, which can be used in such emergencies.

From a support perspective I think option 3 would be good practice but may rarely get done.

Thanks again

syg00 05-07-2012 07:11 AM

grub2 might be your saviour.

All times are GMT -5. The time now is 03:14 AM.