Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Thu Dec 07, 2023 9:26 am


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

Author Message
debuser
  Post  Post subject: Linux GRUB and grub.conf troubleshooting - part1  |  Posted: Mon Jan 04, 2010 10:37 am

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Linux GRUB and grub.conf troubleshooting - part1

Troubleshooting GRUB requires knowing how grub works. Looking at a sample grub.conf file, we can see the commands that grub will accept at command line prompt.
Code:
node1# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-version.img
#boot=/dev/sda
default=1
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Memtest86+ (1.26)
        root (hd0,0)
        kernel /boot/memtest86+-1.26 ro root=LABEL=/ idle=poll console=ttyS1,115200
title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ console=tty0 console=ttyS0,9600n8
        initrd /boot/initrd-2.6.9-42.ELsmp.img


One thing to know about grub is that it's configuration file (grub.conf) reside in the /boot directory. In some cases /boot is a directory on the root filesystem, or a filesystem of it's own. From grub's point of view, there is a difference.

If /boot is a directory on the root filesystem (like above), then all paths in grub.conf will be relative to /.
If /boot is a standalone filesystem, then all paths will be relative to /boot (instead of /boot/vmlinuz-2.6.9-42.ELsmp, it will be /vmlinuz-2.6.9-42.ELsmp).

For each stanza, there is the root command which defines where is the /boot directory for that specific Linux OS(disk & partition). After that, the kernel and initrd define where are the kernel image and the initial ram disk + other parameters, relative paths from /boot directory/filesystem.





Top
Display posts from previous:  Sort by  
Print view

Topics related to - "Linux GRUB and grub.conf troubleshooting - part1"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Linux GRUB and grub.conf troubleshooting - part2

debuser

1

2834

Mon Jan 04, 2010 12:20 pm

debuser View the latest post

There are no new unread posts for this topic. Disable IPv6 in Red Hat Enterprise Linux 5

debuser

2

14686

Thu Feb 24, 2011 3:47 pm

Haryer View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO