IBM Support

Recovering from broken UUID in grub.conf file

Question & Answer


Question

What happens if I copy the grub.conf from one server, and how to do I recover from this event?

Cause

Incorrect steps followed. Never copy the grub.conf from one server to another.

Answer

The grub.conf includes a UUID for the root partition, which is unique for the server in question. There are also kernel dependant levels and other considerations that must be taken. Hand editing of the grub.conf is discouraged to begin with. If the grub.conf is broken, the following can be used to recover.


Reboot Server

Hit spacebar at boot screen

Enter 'p', and type in the password, if the grub has been locked down

Select the newest kernel and hit 'e' key to edit

Select the line starting with kernel /vmlinuz … , and hit the 'e' key again

replace the phrase
root=UUID=XXXXXXXXX
with
root=LABEL=root

if LABEL=root does not work, you can also enter the raw root partition

The partition may be sda3 or sda5. Redhat 5 is sda3, redhat 6 is sda5
root=/dev/sda3 or root=/dev/sda5

If the grub.conf was taken from a server with a different version of linux, you must also edit the vmlinux version to match.

Hit the 'enter' key to return

Hit the 'b' key to boot

The server will boot normally.

Once the server is booted, you must identify the correct UUID

this is done by running

ll /dev/disk/by-uuid/

you must note the line which points to /dev/sda3 or sda5.

Run 'vi /etc/grub.conf' and ensure the UUID=XXXX is the correct UUID for this server

Reboot the server, and it should boot without issues, uninterrupted.

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Host","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 October 2019

UID

swg21971156