Red Hat Certified Engineer/Technician RHCE/RHCT topics and questions

Advertisement


DNS query tools & Network tools (Ping & Traceroute)

Linux GRUB and grub.conf troubleshooting - part2

Postby debuser » Mon Jan 04, 2010 6:04 pm

Coming in contact for the first time with a server that fails to boot (from grub configuration errors) can be difficult, if you don't have a copy of the grub.conf at hand.

List available disks at grub prompt
Code: Select all
grub> find (hd        -->TAB key
  Possible disks are:   hd0 hd1


List available disk partition at grub prompt
Code: Select all
grub> find (hd0,        -->TAB key
  Partition num: 0, Filesystem type is ext2fs, partition type is 0x83
  ...
  Partition num: 2, Filesystem type is ext2fs, partition type is 0x83


The above is the INcomplete grub find command. You can also use it to find a grub.conf on the available partitions on each disk.

An example of find command that will find a grub.conf file:
Code: Select all
grub> find (hd0,0)/boot/grub/grub.conf
   (hd0,0)
   (hd0,1)
   (hd0,2)


An example of find command that will NOT find a grub.conf file:
Code: Select all
grub> find (hd0,0)/boot/grub/grub.conf
   Error 15: File not found


Once I know on which disk and partition the grub.conf file resides, I can cat it to have an idea of the GRUB boot configuration:
Code: Select all
grub> cat (hd0,0)/boot/grub/grub.conf
   (hd0,0)
   (hd0,1)
   (hd0,2)


The above command works mostly as the Linux cat command and it will display the contents of the /boot/grub/grub.conf file on the fist partition from the first disk.
debuser
 
Posts: 70
Joined: Thu Aug 06, 2009 9:48 am


Re: Linux GRUB and grub.conf troubleshooting - part2

Postby debuser » Mon Jan 04, 2010 7:20 pm

To manage to boot the system from GRUB command line, issue the root/kernel/initrd commands in this sequence, as in the grub.conf file in the stanza that interests you (usually, previous running kernel).
debuser
 
Posts: 70
Joined: Thu Aug 06, 2009 9:48 am



Advertisement


Return to Red Hat Certified Engineer/Technician RHCE/RHCT

Similar topics


Who is online

Users browsing this forum: No registered users and 0 guests