Bug 52756 - /boot/vmlinuz.old is sometimes useless
/boot/vmlinuz.old is sometimes useless
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
David Lawrence
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-08-28 15:03 EDT by Enrico Scholz
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-28 15:06:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/sbin/installkernel (965 bytes, text/plain)
2001-08-28 15:06 EDT, Enrico Scholz
no flags Details

  None (edit)
Description Enrico Scholz 2001-08-28 15:03:40 EDT
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 15:06:03 EDT
Created attachment 29934 [details]
Comment 2 Erik Troan 2002-05-22 13:06:40 EDT
did almost exactly this for mkinitrd 3.3.12 and later

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