LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Editing grub.conf (https://www.linuxquestions.org/questions/linux-newbie-8/editing-grub-conf-318083/)

Richlw 04-28-2005 10:22 AM

Editing grub.conf
 
When using up2date I get an error:

Your system is currently running kernel-2.6.9-1.667, but the installed kernel is kernel-2.6.11-14_FC3. It is recommended that you reboot at the first opportunity to test this new kernel.

I had posted this message before and was told to edit the grub.conf file. I located it in the /etc, but when I type pico grub.conf, nothing comnes up in the editor - same with vim. I am not that familiar with editors at this point, so obviously it is my error. Can someone please point me in the right direction?

Thanks,

Rich

angkor 04-28-2005 10:28 AM

try editing grub.conf as root, and specify the complete path to grub.conf

sudo pico [path-to-grub.conf]

good luck

Richlw 04-28-2005 10:34 AM

Thanks. Tried as you suggested, but the pico screen remains blank.

Rich

harken 04-28-2005 01:56 PM

Are you sure it's in /etc? It usually resides in /boot/grub, but indeed, it may have a symlink pointing to it in /etc. Check out the file in /etc by typing 'cat /etc/grub.conf'. And you should edit directly the file by 'sudo pico /boot/grub/menu.lst'.

PTrenholme 04-28-2005 02:33 PM

Since you're in the "newbie" forum, you mighe be interested in a "sample" grub.conf file. Here's what mine looks like:
Code:

$ sudo cat /boot/grub/grub.conf
Password:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,1)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=7
#splashimage=(hd1,1)/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core (2.6.11-1.14_FC3smp)
        root (hd1,1)
        kernel /vmlinuz-2.6.11-1.14_FC3smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.11-1.14_FC3smp.img
title Fedora Core (2.6.11-1.14_FC3smp) no rhgb, run level 3
        root (hd1,1)
        kernel /vmlinuz-2.6.11-1.14_FC3smp ro 3 root=/dev/VolGroup00/LogVol00 quiet
        initrd /initrd-2.6.11-1.14_FC3smp.img
title Fedora Core (2.6.10-1.770_FC3smp)
        root (hd1,1)
        kernel /vmlinuz-2.6.10-1.770_FC3smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.10-1.770_FC3smp.img
title Fedora Backup (2.6.11-1.14_FC3smp)
        root (hd5,0)
        kernel /vmlinuz-2.6.11-1.14_FC3smp ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.11-1.14_FC3smp.img
title Fedora Backup (2.6.11-1.14_FC3smp)no rgk, run level 3
        root (hd5,0)
        kernel /vmlinuz-2.6.11-1.14_FC3smp ro 3 root=LABEL=/ quiet
        initrd /initrd-2.6.11-1.14_FC3smp.img
title Fedora Backup (2.6.9-1.667smp)
        root (hd5,0)
        kernel /vmlinuz-2.6.9-1.667smp ro root=LABEL=/ rhgb quiet
        initrd /initrd-2.6.9-1.667smp.img
title Windows
        rootnoverify (hd0,0)
        chainloader +1

Note that the "hidemenu" command is commented out. I suspect that all you'll need to do is comment out that line in your conf file since the RPM normally adds itself to grub.conf.

The other thing to check is the "default" value. A value of zero specifies that the first entry should be taken after the timeout (in seconds) has elapsed. Any other value refers to a specific block, with the count starting at one. (The point here is that a kernal update usually adds itself as the first entry, and doesn't change the default value if it's zero, but does chage it is it's not zero.)

For more detail, the GRUB manual is available by
Code:

$ info grub
Hope this helps.

bulliver 04-28-2005 03:05 PM

If grub.conf is on a separate '/boot' partition then you need to mount it first. Some distros mark /boot as 'noauto' which means it doesn't get mounted automatically. Try 'mount /boot' as root. Are the files appearing now? /etc/grub.conf is often a symlink to /boot/grub/grub.conf. You can confirm this by running "ls -l /etc/grub.conf". Is the first letter in the permission string an 'l'?


All times are GMT -5. The time now is 04:18 AM.