Bug 84128 - Upgrading kernel package failed
Summary: Upgrading kernel package failed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: mkinitrd
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Erik Troan
QA Contact: David Lawrence
URL:
Whiteboard:
: 83921 (view as bug list)
Depends On:
Blocks: 79578 84358
TreeView+ depends on / blocked
 
Reported: 2003-02-12 16:06 UTC by Mario Mikocevic
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-02-18 17:23:59 UTC


Attachments (Terms of Use)

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. ***


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