Bug 57025 - missing links in kernel-smp package will crush the unwary upgrading user
missing links in kernel-smp package will crush the unwary upgrading user
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-12-03 11:16 EST by Bishop Clark
Modified: 2008-08-01 12:22 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-30 11:39:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bishop Clark 2001-12-03 11:16:05 EST
Description of Problem:
The kernel package includes the following postinstall script:
cd /boot
ln -sf vmlinuz-2.4.9-13 vmlinuz
ln -sf System.map-2.4.9-13 System.map
ln -sf module-info-2.4.9-13 module-info

The smp kernel includes no such similar script.  Using GRUB to dereference 
the links on the UP kernel provides a worry-free kernel upgrade procedure, 
as long as GRUB is configured to use those links to find the kernel (It's 
not, but that gaffe is not within this scope).  The SMP kernel provides no 
such links, and the user must work around this problem with each install, 
increasing the probability of a serious problem killing a system.  
Moreover, the user must do this with each system upgraded, a repetitive and 
exacting process that's ill-fitted for completion by a human instead of a 

It's also a 3-second fix, you slacker!  Here's a suggestion:

cd /boot
ln -sf vmlinuz-2.4.9-13smp vmlinuz-smp
ln -sf System.map-2.4.9-13smp System.map-smp
ln -sf module-info-2.4.9-13smp module-info-smp

Here's a patch to the kernel spec:
*** /usr/src/redhat/SPECS/kernel-2.4.spec~      Tue Oct 30 18:06:51 2001
--- /usr/src/redhat/SPECS/kernel-2.4.spec       Mon Dec  3 05:58:56 2001
*** 1697,1702 ****
--- 1697,1711 ----
  %post smp
+ cd /boot
+ %ifnarch ia64 %{all_ppc}
+ ln -sf vmlinuz-%{KVERREL}smp vmlinuz-smp
+ %endif
+ %ifarch %{all_ppc}
+ ln -sf vmlinux-%{KVERREL}smp vmlinux-smp
+ %endif
+ ln -sf System.map-%{KVERREL}smp System.map-smp
+ ln -sf module-info-%{KVERREL}smp module-info-smp
  [ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade
  depmod -ae -F /boot/System.map-%{KVERREL}smp %{KVERREL}smp
  [ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldoth
*** 1705,1710 ****
--- 1714,1728 ----
  %post enterprise
+ cd /boot
+ %ifnarch ia64 %{all_ppc}
+ ln -sf vmlinuz-%{KVERREL}enterprise vmlinuz-enterprise
+ %endif
+ %ifarch %{all_ppc}
+ ln -sf vmlinux-%{KVERREL}enterprise vmlinux-enterprise
+ %endif
+ ln -sf System.map-%{KVERREL}enterprise System.map-enterprise
+ ln -sf module-info-%{KVERREL}enterprise module-info-enterprise
  [ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade
  depmod -ae -F /boot/System.map-%{KVERREL}enterprise %{KVERREL}enterprise
  [ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldoth
*** 1713,1718 ****
--- 1731,1745 ----
  %post debug
+ cd /boot
+ %ifnarch ia64 %{all_ppc}
+ ln -sf vmlinuz-%{KVERREL}debug vmlinuz-debug
+ %endif
+ %ifarch %{all_ppc}
+ ln -sf vmlinux-%{KVERREL}debug vmlinux-debug
+ %endif
+ ln -sf System.map-%{KVERREL}debug System.map-debug
+ ln -sf module-info-%{KVERREL}debug module-info-debug
  [ -x /usr/sbin/module_upgrade ] && /usr/sbin/module_upgrade
  depmod -ae -F /boot/System.map-%{KVERREL}debug %{KVERREL}debug
  [ -x /sbin/mkkerneldoth ] && /sbin/mkkerneldoth

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

How Reproducible:

Steps to Reproduce:
1. Install smp kernel with Initial Software Load
2. Upgrade to newer kernel (following 
http://www.redhat.com/support/docs/howto/kernel-upgrade but skippng lilo 
section as we're into the bronze age now, using GRUB magic)
3. reboot and stare in amazement until you realize what you did, at which 
time the ritual swearing begins.

Actual Results:
System can no longer find kernel to boot

Expected Results:
system booting happily, normally and healthily.

Additional Information:
Hey!  I already gave ya a nice shiny Diff (you should sanity check that, as 
there was some blind sed magic in there) !  Whaddaya want for nothing?!?  A 
rubber biscuit?!?  	

Oh yeah.  Additionally, the initrd isn't linked.  This is fun for people 
using SCSI modules to boot their system, as it, again, leaves it unbootable 
after a happy kernel package upgrade.  The thing is, with link set up 
correctly, using GRUB to boot the kernel makes kernel upgrades really easy 
and painless.  Without the links, it's, well, pain.
Comment 1 Arjan van de Ven 2001-12-03 11:20:20 EST
The bug is the opposite :(
Those symlinks are made at boot time depending on what kernel you are running; 
the fact that the UP kernel breaks that is a bug.

As for easy-to-add-to-grub; well; rpm -i on a kernel rpm will automatically add
that kernel to grub already......
Comment 2 Bishop Clark 2001-12-03 11:32:36 EST

I need you to look at the spec file at line 1682 and tell me that the links are 
set after boot.

I need you to also examine a smp system, after a fresh install, and suggest why 
the links are *not* set as you suggest.

Am I missing something?
Comment 3 Bugzilla owner 2004-09-30 11:39:18 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

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