Bug 84128 - Upgrading kernel package failed
Upgrading kernel package failed
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: mkinitrd (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
David Lawrence
:
: 83921 (view as bug list)
Depends On:
Blocks: 79578 84358
  Show dependency treegraph
 
Reported: 2003-02-12 11:06 EST by Mario Mikocevic
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-18 12:23:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mario Mikocevic 2003-02-12 11:06:31 EST
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 17:17:39 EST
Please attach your grub.conf to this note.
Comment 2 Mario Mikocevic 2003-02-13 03:55:10 EST
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 05:50:04 EST
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 12:23:59 EST
Fixed in CVS, will be in 3.4.42-1.  Thanks for the patch.
Comment 5 Jeremy Katz 2003-02-18 12:25:22 EST
*** Bug 83921 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.