Lilo makes some mistakes when removing a kernel. Take a look at the following. This is my /boot/ directory before I started:

[EMAIL PROTECTED] boot]# ls -l
total 9339
lrwxrwxrwx 1 root root 32 Sep 7 23:16 System.map -> System.map-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 619733 Sep 7 21:17 System.map-2.4.22-2mdkenterprise
-rw-r--r-- 1 root root 621280 Sep 7 23:02 System.map-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 621333 Sep 11 08:44 System.map-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 621280 Sep 9 07:38 System.map-2.4.22-7mdkenterprise
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.0300
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.0800
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.2100
lrwxrwxrwx 1 root root 28 Sep 7 23:16 config -> config-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 48155 Sep 7 21:17 config-2.4.22-2mdkenterprise
-rw-r--r-- 1 root root 51513 Sep 7 23:02 config-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 51551 Sep 11 08:44 config-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 51540 Sep 9 07:38 config-2.4.22-7mdkenterprise
-rw-r--r-- 1 root root 5032 Sep 3 17:45 diag1.img
-rw-r--r-- 1 root root 16796 Sep 3 17:45 diag2.img
drwxr-xr-x 2 root root 1024 Feb 15 2003 grub/
-rw-r--r-- 1 root root 199166 Sep 7 22:50 initrd-2.4.22-2mdkenterprise.img
-rw-r--r-- 1 root root 203237 Sep 6 21:43 initrd-2.4.22-3.tmb.2mdkenterprise.img
-rw-r--r-- 1 root root 202619 Sep 9 18:40 initrd-2.4.22-6mdkenterprise.img
-rw-r--r-- 1 root root 203653 Sep 9 18:45 initrd-2.4.22-7mdkenterprise.img
lrwxrwxrwx 1 root root 32 Sep 9 18:45 initrd-enterprise.img -> initrd-2.4.22-7mdkenterprise.img
lrwxrwxrwx 1 root root 36 Sep 9 20:30 kernel.h -> /boot/kernel.h-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 6 Aug 29 14:21 kernel.h-2.4.22
-rw-r--r-- 1 root root 537 Sep 9 20:30 kernel.h-2.4.22-6mdkenterprise
drwx------ 2 root root 12288 Feb 15 2003 lost+found/
-rw------- 1 root root 298496 Sep 11 08:57 map
lrwxrwxrwx 1 root root 15 Feb 15 2003 message -> message-graphic
-rw-r--r-- 1 root root 164762 Sep 9 18:40 message-graphic
-rw-r--r-- 1 root root 256 Feb 15 2003 us.klt
-rw-r--r-- 1 root root 1343708 Sep 7 21:17 vmlinuz-2.4.22-2mdkenterprise
-rw-r--r-- 1 root root 1383847 Sep 7 23:02 vmlinuz-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 1383773 Sep 11 08:44 vmlinuz-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 1383846 Sep 9 07:38 vmlinuz-2.4.22-7mdkenterprise
lrwxrwxrwx 1 root root 29 Sep 9 18:45 vmlinuz-enterprise -> vmlinuz-2.4.22-7mdkenterprise

This is the list of kernels installed:

[EMAIL PROTECTED] boot]# rpm -qa | grep kernel
kernel-enterprise-2.4.22.2mdk-1-1mdk
kernel-enterprise-2.4.22.7mdk-1-1mdk
kernel-enterprise-2.4.22.6mdk-1-1mdk
kernel-tmb-enterprise-2.4.22.7.tmb.1mdk-1-1mdk

I'm running 2.4.22-6mdk:

[EMAIL PROTECTED] boot]# uname -a
Linux taz.eijk.nu 2.4.22-6mdkenterprise #1 SMP Sun Sep 7 16:32:25 EDT 2003 i686 unknown unknown GNU/Linux

Now, I remove 2.4.22-2mdk:

[EMAIL PROTECTED] boot]# rpm -e kernel-enterprise-2.4.22.2mdk-1-1mdk
There is no /lib/modules/2.4.22-2mdkenterprise, skipping creation of initrd
look like i cannot find the specified kernel /boot/vmlinuz-2.4.22-2mdkenterprise

Lilo borks.

Now, these are the kernels installed:

[EMAIL PROTECTED] boot]# rpm -qa | grep kernel
kernel-enterprise-2.4.22.7mdk-1-1mdk
kernel-enterprise-2.4.22.6mdk-1-1mdk
kernel-tmb-enterprise-2.4.22.7.tmb.1mdk-1-1mdk

and this is what the /boot directory looks like:

[EMAIL PROTECTED] boot]# ls -l
total 7343
lrwxrwxrwx 1 root root 32 Sep 7 23:16 System.map -> System.map-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 621280 Sep 7 23:02 System.map-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 621333 Sep 11 08:44 System.map-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 621280 Sep 9 07:38 System.map-2.4.22-7mdkenterprise
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.0300
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.0800
-rw-r--r-- 1 root root 512 Feb 15 2003 boot.2100
lrwxrwxrwx 1 root root 28 Sep 7 23:16 config -> config-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 51513 Sep 7 23:02 config-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 51551 Sep 11 08:44 config-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 51540 Sep 9 07:38 config-2.4.22-7mdkenterprise
-rw-r--r-- 1 root root 5032 Sep 3 17:45 diag1.img
-rw-r--r-- 1 root root 16796 Sep 3 17:45 diag2.img
drwxr-xr-x 2 root root 1024 Feb 15 2003 grub/
-rw-r--r-- 1 root root 199166 Sep 7 22:50 initrd-2.4.22-2mdkenterprise.img
-rw-r--r-- 1 root root 203237 Sep 6 21:43 initrd-2.4.22-3.tmb.2mdkenterprise.img
-rw-r--r-- 1 root root 202619 Sep 9 18:40 initrd-2.4.22-6mdkenterprise.img
-rw-r--r-- 1 root root 203653 Sep 9 18:45 initrd-2.4.22-7mdkenterprise.img
lrwxrwxrwx 1 root root 32 Sep 11 08:58 initrd-enterprise.img -> initrd-2.4.22-2mdkenterprise.img
lrwxrwxrwx 1 root root 36 Sep 9 20:30 kernel.h -> /boot/kernel.h-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 6 Aug 29 14:21 kernel.h-2.4.22
-rw-r--r-- 1 root root 537 Sep 9 20:30 kernel.h-2.4.22-6mdkenterprise
drwx------ 2 root root 12288 Feb 15 2003 lost+found/
-rw------- 1 root root 281600 Sep 11 08:58 map
lrwxrwxrwx 1 root root 15 Feb 15 2003 message -> message-graphic
-rw-r--r-- 1 root root 164762 Sep 9 18:40 message-graphic
-rw-r--r-- 1 root root 256 Feb 15 2003 us.klt
-rw-r--r-- 1 root root 1383847 Sep 7 23:02 vmlinuz-2.4.22-6mdkenterprise
-rw-r--r-- 1 root root 1383773 Sep 11 08:44 vmlinuz-2.4.22-7.tmb.1mdkenterprise
-rw-r--r-- 1 root root 1383846 Sep 9 07:38 vmlinuz-2.4.22-7mdkenterprise
lrwxrwxrwx 1 root root 29 Sep 11 08:58 vmlinuz-enterprise -> vmlinuz-2.4.22-2mdkenterprise

Notice that:
1/ the symlinks of "initrd-enterprise.img" and "vmlinuz-enterprise" are both pointing to the kernel I just removed;
2/ only the "vmlinuz-2.4.22-2mdkenterprise" file has been removed, "initrd-2.4.22-2mdkenterprise.img" is still there.

This will leave me with a system that won't boot the default entry in lilo.

Time to report this in bugzilla or will a quick fix do?

regards,

Stefan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to