[PlanetCCRMA] redhat trouble with grub

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Thu Sep 30 11:57:02 2004


On Wed, 2004-09-29 at 23:07, Noah Garrett Wallach wrote:
> On 29 Sep 2004 20:04:35 -0700, Fernando Pablo Lopez-Lezcano wrote
> > On Wed, 2004-09-29 at 18:08, Noah Garrett Wallach wrote:
> > > # cat grub.conf
> > > # 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,0)
> > > #          kernel /vmlinuz-version ro root=/dev/sda2
> > > #          initrd /initrd-version.img
> > > #boot=/dev/sda
> > > default=0
> > > timeout=10
> > > splashimage=(hd0,0)/grub/splash.xpm.gz
> > > title Red Hat Enterprise Linux WS (2.4.21-20.ELsmp)
> > >         root (hd0,0)
> > >         kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/ hda=ide-scsi
> > >         initrd /initrd-2.4.21-20.ELsmp.img
> > > title Red Hat Enterprise Linux WS (2.4.21-20.EL)
> > >         root (hd0,0)
> > >         kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ hda=ide-scsi
> > >         initrd /initrd-2.4.21-20.EL.img
> > > title Red Hat Enterprise Linux WS (2.4.21-4.ELsmp)
> > >         root (hd0,0)
> > >         kernel /vmlinuz-2.4.21-4.ELsmp ro root=LABEL=/ hda=ide-scsi
> > >         initrd /initrd-2.4.21-4.ELsmp.img
> > > title Red Hat Enterprise Linux WS-up (2.4.21-4.EL)
> > >         root (hd0,0)
> > >         kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/ hda=ide-scsi
> > >         initrd /initrd-2.4.21-4.EL.img
> > > 
> > > --- snip ---
> > > 
> > > what can I do about this?
> > 
> > Strange, do you remember if there were any error messages when you
> > installed the kernel? If the package is installed but there is no entry
> > in /boot/grub/grub.conf and no initrd it means that the post install
> > scripts somehow failed. There should have been messages printed. 
> > Maybe because you are (apparently) running RedHat Enterprise things are
> > different enough that the kernel does not complete its installation
> > scripts.
> > 
> > One way to find out for sure would be to erase the kernels and 
> > install them paying attention to the postinstall messages (if any).
> 
> might need some more hand holding here - what is the appropriate way to remove
> all the installed ccrma kernels?
> 
> here is what I did:
> 
> --- snip ---
> 
> [root@dhcp-183-1-168-192 boot]# rm *2.4.20-31.1.caps.rh90.ccrma

I see. Kernels (and all other Planet CCRMA / RedHat packages) are
installed using rpm (RedHat Package Manager) and that is what you could
use to erase them, "rm" operates on files only. 

To find which packages you actually have installed that match the kernel
you want:

rpm -q -a | grep 2.4.20-31.1

(rpm -q -a lists all packages installed, grep filters the ones that
match the string that follows). 

That should list a bunch of packages, at least the kernel itself and the
alsa driver kernel modules packages specific to that kernel. 

To erase them do:

rpm -e --nodeps kernel-... alsa-driver-...
(replace the kernel- and alsa-driver- with the ones listed in the
previous command). 

Now, I'm using the "--nodeps" option which you normally don't want to
use because other installed packages in Planet CCRMA rely on having the
alsa driver installed. If you try to erase without --deps rpm will
complain. But using it means we leave the dependencies "broken" (that
is, there is a package needed by other packages that is not installed).
To reinstall the kernel and fix things you will need to do a:

apt-get -f install

That should reinstall the missing packages. 
Save the output so that we know what happened...

-- Fernando