Linux GRUB and grub.conf troubleshooting - part2
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
List available disk partition at grub prompt
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:
An example of find command that will NOT find a grub.conf file:
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:
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.
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.