Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 87398

Summary: new-kernel-pkg removes kernel when installing new one
Product: [Retired] Red Hat Linux Reporter: Andrew Gormanly <a.gormanly>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-06-11 03:48:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andrew Gormanly 2003-03-26 17:18:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
When installing a new kernel with e.g. 'rpm -ivh kernel-2.4.18-27.8.0',
/sbin/new-kernel-pkg removes the old kernel installed on the system.

Version-Release number of selected component (if applicable):
mkinitrd-3.4.28-1

How reproducible:
Always

Steps to Reproduce:
1. rpm -ivh kernel-2.4.18-27.8.0
2. reboot a bit later
3.
    

Actual Results:  The old kernel is gone.

Expected Results:  The two kernel RPMs should be installed at the same time, as
before (RH 4.2 - 7.3).

Additional info:

Lines 75-79 of /sbin/new-kernel-pkg are below.  79 is the offending line for
grub; there's a similar one for lilo.

        title="Red Hat Linux ($version)"
        /sbin/grubby --add-kernel=$bootPrefix/vmlinuz-$version $INITRD    \
                     --copy-default --title "$title"                \
                     --args="root=$rootdevice"                      \
                     --remove-kernel="TITLE=$title"

This could really screw things up if the new kernel were broken.

Comment 1 Jeremy Katz 2003-03-28 00:05:47 UTC
That line out of new-kernel-pkg removes any old kernels from the config title
which would have used the exact same title (which is based on the kernel
version).  Are you sure you used -i instead of -U or -F?

Comment 2 Jeremy Katz 2003-06-11 03:48:19 UTC
Closing due to lack of activity.  Please reopen if you have further information
to add.