LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-04-2003, 01:33 AM   #1
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Rep: Reputation: 30
Question GRUB entries in the boot-menu


Hello,

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.

Thanks,
Kramer.
 
Old 12-04-2003, 05:33 AM   #2
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Look under /usr/src, /lib/modules and some of the files under /boot as well.

Be careful!

John
 
Old 12-04-2003, 10:01 AM   #3
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
/usr/src is EMPTY

[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 ?

Thanks.
 
Old 12-04-2003, 10:19 AM   #4
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
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.

Once again, be careful.

John
 
Old 12-08-2003, 11:47 PM   #5
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
Sorry for getting back on this late.

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
 
Old 12-09-2003, 04:51 AM   #6
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
Hi,

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.

John
 
Old 12-09-2003, 07:11 AM   #7
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
howzit

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.

chow
 
Old 12-10-2003, 03:46 AM   #8
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
I took, part of all your suggestions and it worked like a charm.

I took the back up of grub.conf, didn't delete old kernel's and
left the entry for the 1 older version of the kernel and edited/
removed the rest.

Thanks to each one of you for your time and suggestion's.
Appreciate it.

Kramer.

Last edited by shankariyer; 12-10-2003 at 03:48 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need to access /boot/grub/menu.lst and /boot/grub/device.map neouto Linux - Newbie 8 09-04-2005 11:45 AM
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Grub Boot Menu avatar_58 Linux - General 2 05-20-2005 10:29 AM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
How to remove entries in the lilo boot menu? Rampage2884 Linux - Newbie 4 04-09-2002 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration