Bug 84128

Summary: Upgrading kernel package failed
Product: [Retired] Red Hat Raw Hide Reporter: Mario Mikocevic <mario.mikocevic>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: chris.ricker
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-18 17:23:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 79578, 84358    

Description Mario Mikocevic 2003-02-12 16:06:31 UTC
Description of problem:
Upgrading from 2.4.20-2.28 to 2.4.20-2.44 failed partialy

# rpm -ivh kernel-2.4.20-2.44.i686.rpm
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
/sbin/new-kernel-pkg: line 260:  8578 Segmentation fault   /sbin/grubby
--add-kernel=$bootPrefix/vmlinuz-$version $INITRD --copy-default --title
"$title" --args="root=$rootdevice" --remove-kernel="TITLE=$title"

at this point files are installed but no entry in /boot/grub/grub.conf

Version-Release number of selected component (if applicable):
# rpm -qa | grep kernel
kernel-2.4.20-2.28
kernel-utils-2.4-8.28
kernel-2.4.20-2.44

Comment 1 Erik Troan 2003-02-12 22:17:39 UTC
Please attach your grub.conf to this note.

Comment 2 Mario Mikocevic 2003-02-13 08:55:10 UTC
Here it is ->

# cat /boot/grub/grub.conf 
default=0
timeout=50
splashimage=(hd0,0)/grub/splash.xpm.gz
title MzG (2.4.21-pre4)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-pre4 ro root=/dev/hda2 hdd=ide-scsi
        initrd /initrd-2.4.21-pre4.img

title MzG (2.4.21-pre3)
        root (hd0,0)
        kernel /vmlinuz-2.4.21-pre3 ro root=/dev/hda2 hdd=ide-scsi
        initrd /initrd-2.4.21-pre3.img

title Bleeding Edge (2.5.59)
        root (hd0,0)
        kernel /vmlinuz-2.5.59 ro root=/dev/hda2
        initrd /initrd-2.5.59.img

Notice that I _do_ _not_ have rawhide kernel entry and I _do_ _not_ want to have
one.


Comment 3 Gilles J. Seguin 2003-02-18 10:50:04 UTC
The core-dump is produce by grubby
which in my case is mkinitrd-3.4.41

simple request will core dump
$ /sbin/grubby --default-kernel
will pass with option --grub | --lilo

solution: the local variable pointer need to be initialize to zero

--- grubby.c.yy 2003-01-31 11:00:23.000000000 -0500
+++ grubby.c    2003-02-18 05:32:37.000000000 -0500
@@ -1817,7 +1817,7 @@
     char * removeArgs = NULL;
     char * kernelInfo = NULL;
     const char * chptr;
-    struct configFileInfo * cfi;
+    struct configFileInfo * cfi = NULL;
     struct grubConfig * config;
     struct singleEntry * template = NULL;
     int copyDefault = 0, makeDefault = 0;


Comment 4 Jeremy Katz 2003-02-18 17:23:59 UTC
Fixed in CVS, will be in 3.4.42-1.  Thanks for the patch.

Comment 5 Jeremy Katz 2003-02-18 17:25:22 UTC
*** Bug 83921 has been marked as a duplicate of this bug. ***