Bug 52756

Summary: /boot/vmlinuz.old is sometimes useless
Product: [Retired] Red Hat Linux Reporter: Enrico Scholz <rh-bugzilla>
Component: mkinitrdAssignee: Matt Wilson <msw>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-28 19:06:08 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:
Attachments:
Description Flags
/sbin/installkernel none

Description Enrico Scholz 2001-08-28 19:03:40 UTC
When rebuilding and installing a kernel which was installed already,
/sbin/installkernel moves /boot/vmlinuz-<VERSION> to vmlinuz.old and
generates a new /boot/vmlinuz-<VERSION>.

This can be improved, because:
- it is not possible to select the previous (working) kernel (this may
  be useful at a bad kernel-configuration like missing ide-drivers);
  /boot/vmlinuz.old is an unspecified previous kernel.

  I have an entry in the bootmanager-menu where I can select between
  current (vmlinuz) and previous kernel (vmlinuz.old). 

- as /lib/modules/<VERSION> is not backuped, it is possible that
  vmlinuz.old is not working with these modules because of missing or
  bad symbols.


I will attach a new /sbin/installkernel which:
- moves vmlinuz-<VERSION> to vmlinuz-<VERSION>.old if vmlinuz-<VERSION>
  exists; else it moves vmlinuz to vmlinuz.old
- links vmlinuz-<VERSION> to vmlinuz
- cats the $BOOTIMAGE into vmlinuz

Same happens for /boot/System.map.


With this method there will be kept a backup of all previous kernels
(named vmlinuz-<VERSION>) plus possible copies of kernels with another
configuration (named vmlinuz-<VERSION>.old).


E.g. my system has:

$ ls -l /boot
...
lrwxrwxrwx    1 root     root           13 Aug 16 22:37 vmlinuz -> vmlinuz-2.4.9
-rw-r--r--    1 root     root       592664 Mai  4 19:38 vmlinuz-2.4.4
-rw-r--r--    1 root     root       584530 Mai 29 13:19 vmlinuz-2.4.5
-rw-r--r--    1 root     root       582372 Mai 29 12:02 vmlinuz-2.4.5.old
-rw-r--r--    1 root     root       583826 Jul  4 08:31 vmlinuz-2.4.6
-rw-r--r--    1 root     root       584668 Jul 21 00:46 vmlinuz-2.4.7
-rw-r--r--    1 root     root       584987 Aug 13 20:06 vmlinuz-2.4.8
-rw-r--r--    1 root     root       586132 Aug 16 22:37 vmlinuz-2.4.9
lrwxrwxrwx    1 root     root           13 Jul 21 00:46 vmlinuz.old -> vmlinuz-2.4.7

[vmlinuz.old was removed manually at installation of 2.4.9 because
machine has never been tested with 2.4.8]

Comment 1 Enrico Scholz 2001-08-28 19:06:03 UTC
Created attachment 29934 [details]
/sbin/installkernel

Comment 2 Erik Troan 2002-05-22 17:06:40 UTC
did almost exactly this for mkinitrd 3.3.12 and later