Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've a question on the way GRUB handles the kernel upgrades.
Whenever I upgrade the kernel, GRUB gives me a new entry, while giving me the option to boot from the different kernel version's. It started out in 2.4.8 and now its 2.4.20-24.9.
It's an useful feature to be able to boot to different( but old ) kernel version's but how I can remove those old entries and also free up any occupied space by those.
[root@localhost src]# cd debug
[root@localhost debug]# l
total 0
[root@localhost debug]# cd ../redhat
[root@localhost redhat]# ls -lR
.:
total 20
drwxr-xr-x 2 root root 4096 Feb 27 2003 BUILD
drwxr-xr-x 8 root root 4096 Oct 25 18:25 RPMS
drwxr-xr-x 2 root root 4096 Feb 27 2003 SOURCES
drwxr-xr-x 2 root root 4096 Feb 27 2003 SPECS
drwxr-xr-x 2 root root 4096 Feb 27 2003 SRPMS
./BUILD:
total 0
./RPMS:
total 24
drwxr-xr-x 2 root root 4096 Feb 27 2003 athlon
drwxr-xr-x 2 root root 4096 Feb 27 2003 i386
drwxr-xr-x 2 root root 4096 Feb 27 2003 i486
drwxr-xr-x 2 root root 4096 Feb 27 2003 i586
drwxr-xr-x 2 root root 4096 Feb 27 2003 i686
drwxr-xr-x 2 root root 4096 Feb 27 2003 noarch
./RPMS/athlon:
total 0
./RPMS/i386:
total 0
./RPMS/i486:
total 0
./RPMS/i586:
total 0
./RPMS/i686:
total 0
./RPMS/noarch:
total 0
./SOURCES:
total 0
./SPECS:
total 0
./SRPMS:
total 0
[root@localhost redhat]#
/lib/modules has all the files under each revision... but how do I cleanup up the 3 entries that show's up in GRUB to make it show only the latest version ?
Sorry, missed that part of your question. Edit the file /boot/grub/grub.conf
The file might be somewhere else on your system, check /etc/grub.conf, /boot/grub.conf.
To recover the space, you can delete the subdirectories in /lib/modules that correspond to the versions you don't want. You can also remove corresponding files in /boot.
This is my grub.conf( from /boot/grub/, /etc/grub.conf points to the same )
I've one question. I wanted to remove the section between /* and */. I
understand from your suggesstion and the note in the same file, that I
don't have to rerun grub.
But I think I need to change the value of 'default' to 1 correct. I believe that
it starts with zero( so now its points to Windows 2000 to boot into by default
and which I would like to keep the same ).
So editing is all I've to do, correct. Thanks for the guidance...
# 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 (hd0,10)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda
default=3
timeout=10
splashimage=(hd0,10)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-24.9)
root (hd0,10)
kernel /vmlinuz-2.4.20-24.9 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-24.9.img
/*
title Red Hat Linux (2.4.20-20.9)
root (hd0,10)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-20.9.img
title Red Hat Linux (2.4.20-8)
root (hd0,10)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
*/
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
default = 0, will make Linux your default, =1, will be windows. If you don't want it to boot into either automatically, comment out the timeout line, then it will wait for you to choose.
The lines between the comment marks are safe to delete, so long as you're sure that 2.4.20-24.9 is reliable. I always like to keep one older kernel around for just-in-case.
No, you don't have to re-run grub, which is a big advantage over lilo.
u may edit your grub.conf file if u know what u r doing if not then . To be safe itīs not a bad idea to keep older kernels on your system I have normaly 1/2 older version just in case. If all kernel upgrades where dine via rpm then u may use the cmd rpm -e kernel-<kernel verion> this will remove kernel as well as the menu entries for u.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.