initramfs-tools needs to update lilo after changing the initrd

Bug #31790 reported by Chris Moore
26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lilo (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Whenever there's an update for initramfs-tools, the next time I reboot, ubuntu shows a kernel panic instead of booting.

In such cases I boot to "ubuntuOLD" and run "sudo lilo", then reboot again and the problem is fixed.

Would it not be better if the post-install script for initramfs-tools could run lilo automatically if it is found to be necessary?

Revision history for this message
Chris Moore (dooglus) wrote :

I've seen this kernel panic quite a lot of times in the past but never known which package was causing it. This time I made a list of all the packages which had been installed since the last time I booted. Here it is:

2006-02-17 10:47:11 status installed xfce4 4.2.3
2006-02-17 10:47:29 status installed xfce4-toys 4.2.3-1
2006-02-17 10:48:16 status installed xfce4-iconbox 4.2.3-1
2006-02-17 10:48:17 status installed xfce4-systray 4.2.3-1
2006-02-17 10:48:30 status installed xffm4 1:4.2.3-1ubuntu1
2006-02-17 10:49:08 status installed libxfce4mcs-manager-2 4.2.3-1
2006-02-17 10:49:12 status installed xfdesktop4 4.3.6.4-1ubuntu3
2006-02-17 10:49:14 status installed libxfce4mcs-client-2 4.2.3-1
2006-02-17 10:49:14 status installed xfce4-mixer 1:4.2.3-1ubuntu1
2006-02-17 10:49:26 status installed xfce4-xkb-plugin 0.3.2-3ubuntu2
2006-02-17 10:49:27 status installed xfce4-battery-plugin 0.3.0-2
2006-02-17 10:49:27 status installed xfce4-trigger-launcher 4.2.3-1
2006-02-17 10:49:27 status installed xfce4-weather-plugin 0.4.9-2ubuntu3
2006-02-17 10:49:30 status installed libxfcegui4-3 4.2.3-1ubuntu1
2006-02-17 10:49:33 status installed libxfce4util-1 4.2.3.2-1
2006-02-17 10:49:42 status installed libxfce4mcs-client3 4.3.0svn+r19775-0ubuntu3
2006-02-17 10:49:42 status installed libxfce4mcs-manager3 4.3.0svn+r19775-0ubuntu3
2006-02-17 10:49:42 status installed libxfce4util2 4.3.0svn+r19775-0ubuntu1
2006-02-17 10:49:42 status installed libxfcegui4-4 4.3.8svn+r19895-0ubuntu1
2006-02-17 10:49:42 status installed xfce4-panel 4.3.0svn+r19871-0ubuntu3
2006-02-17 10:49:42 status installed xfce4-session 4.3.0svn+r19871-0ubuntu2
2006-02-17 10:49:42 status installed xfprint4 4.3.0svn+r19872-0ubuntu1
2006-02-17 10:49:43 status installed orage 4.3.1.22svn-1ubuntu1
2006-02-17 10:49:43 status installed xfce4-appfinder 4.3.0svn+r19895-0ubuntu1
2006-02-17 10:49:43 status installed xfce4-mcs-manager 4.3.0svn+r19871-0ubuntu1
2006-02-17 10:49:43 status installed xfce4-taskmanager 0.3.1-0ubuntu2
2006-02-17 10:49:43 status installed xfce4-utils 4.3.0svn+r19871-0ubuntu1
2006-02-17 10:49:43 status installed xfwm4 4.3.0svn+r19872-0ubuntu1
2006-02-17 10:49:44 status installed mousepad 0.2.2-2ubuntu3
2006-02-17 10:49:45 status installed xfce4-mcs-plugins 4.3.0svn+r19871-0ubuntu1
2006-02-17 10:51:49 status installed alsa-utils 1.0.10-1ubuntu7
2006-02-17 10:52:23 status installed initramfs-tools 0.40ubuntu23
2006-02-17 10:52:24 status installed app-install-data 0.1.12
2006-02-17 10:52:43 status installed gnome-app-install 0.1.12
2006-02-17 10:52:44 status installed ubuntu-artwork 0.2.28-2
2006-02-17 14:11:39 status installed gnupg 1.4.2.1-0ubuntu1
2006-02-17 14:11:39 status installed gqview 2.0.1-1ubuntu1

Revision history for this message
Chris Moore (dooglus) wrote :

And here it is again in a slightly different format, in the hope that malone won't mangle it this time:

 * xfce4 4.2.3
 * xfce4-toys 4.2.3-1
 * xfce4-iconbox 4.2.3-1
 * xfce4-systray 4.2.3-1
 * xffm4 1:4.2.3-1ubuntu1
 * libxfce4mcs-manager-2 4.2.3-1
 * xfdesktop4 4.3.6.4-1ubuntu3
 * libxfce4mcs-client-2 4.2.3-1
 * xfce4-mixer 1:4.2.3-1ubuntu1
 * xfce4-xkb-plugin 0.3.2-3ubuntu2
 * xfce4-battery-plugin 0.3.0-2
 * xfce4-trigger-launcher 4.2.3-1
 * xfce4-weather-plugin 0.4.9-2ubuntu3
 * libxfcegui4-3 4.2.3-1ubuntu1
 * libxfce4util-1 4.2.3.2-1
 * libxfce4mcs-client3 4.3.0svn+r19775-0ubuntu3
 * libxfce4mcs-manager3 4.3.0svn+r19775-0ubuntu3
 * libxfce4util2 4.3.0svn+r19775-0ubuntu1
 * libxfcegui4-4 4.3.8svn+r19895-0ubuntu1
 * xfce4-panel 4.3.0svn+r19871-0ubuntu3
 * xfce4-session 4.3.0svn+r19871-0ubuntu2
 * xfprint4 4.3.0svn+r19872-0ubuntu1
 * orage 4.3.1.22svn-1ubuntu1
 * xfce4-appfinder 4.3.0svn+r19895-0ubuntu1
 * xfce4-mcs-manager 4.3.0svn+r19871-0ubuntu1
 * xfce4-taskmanager 0.3.1-0ubuntu2
 * xfce4-utils 4.3.0svn+r19871-0ubuntu1
 * xfwm4 4.3.0svn+r19872-0ubuntu1
 * mousepad 0.2.2-2ubuntu3
 * xfce4-mcs-plugins 4.3.0svn+r19871-0ubuntu1
 * alsa-utils 1.0.10-1ubuntu7
 * initramfs-tools 0.40ubuntu23
 * app-install-data 0.1.12
 * gnome-app-install 0.1.12
 * ubuntu-artwork 0.2.28-2
 * gnupg 1.4.2.1-0ubuntu1
 * gqview 2.0.1-1ubuntu1

Revision history for this message
Matt Zimmerman (mdz) wrote :

You forgot to provide the text of the panic that you see.

Changed in initramfs-tools:
status: Unconfirmed → Needs Info
Revision history for this message
Chris Moore (dooglus) wrote :

I just applied some updates and rebooted. This lead to a kernel panic.

The packages that the update installed are as follows:

  tangerine-icon-theme tango-icon-theme ubuntu-base ubuntu-desktop ubuntu-minimal ubuntu-standard udev x-window-system-core x11-common xbase-clients xserver-xorg xutils

None of them look like they would affect /boot/initrd.img-2.6.15-20-686, but the modification date on that file is the same as the time that I applied the updates.

Looking around, I discovered that updating udev modifies the initrd.img file:

(dapper) chris@chrislap:/boot$ ls -l /boot/initrd.img-2.6.15-19-686
-rw-r--r-- 1 root root 6725161 2006-04-18 16:41 /boot/initrd.img-2.6.15-19-686
(dapper) chris@chrislap:/boot$ sudo apt-get --reinstall install udev
[...]
Preparing to replace udev 079-0ubuntu25 (using .../udev_079-0ubuntu25_i386.deb) ...
Unpacking replacement udev ...
Setting up udev (079-0ubuntu25) ...

(dapper) chris@chrislap:/boot$ ls -l /boot/initrd.img-2.6.15-19-686
-rw-r--r-- 1 root root 6725163 2006-04-18 16:47 /boot/initrd.img-2.6.15-19-686
(dapper) chris@chrislap:/boot$ date
Tue Apr 18 16:47:35 CEST 2006
(dapper) chris@chrislap:/boot$ uname -r
2.6.15-19-686

(notice in this case I have booted into an older kernel version, since the newest one won't boot due to the kernel panic; I also notice that installing udev only modifies the initrd.img file for the kernel which is currently running - that doesn't seem like it could be the right thing to do - shouldn't it either modify them all or none of them?)

The installation of udev is editing the /boot/initrd.img-2.6.15-20-686 file, resulting in the boot sequence getting broken.

The kernel panic says this, by the way:

  "[4294671.271000] Kernel panic - not syncing: VFS: Unable to mount root fs on unk
nown-block(3,6)

Note that the original bug report doesn't list udev in the list of installed packages, so it looks like it isn't just udev which needs to re-run lilo after installation.

Revision history for this message
Chris Moore (dooglus) wrote :

Both
  /var/lib/dpkg/info/udev.postinst
and
  /var/lib/dpkg/info/initramfs-tools.postinst
run
  update-initramfs -u

So it is the same bug, and I guess the fix would be to get update-initramfs (from the initramfs-tools package) to re-run lilo after updating the file if lilo is being used.

Revision history for this message
Chris Moore (dooglus) wrote :

I can't see how to change the status back from 'needsinfo' now that the needed info has been provided.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Indeed, if lilo is in use, update-initramfs either needs to re-run it, or leave the initramfs alone.

Changed in initramfs-tools:
assignee: nobody → adconrad
status: Needs Info → Confirmed
Revision history for this message
Dejan (dejan-rodiger) wrote :

Check my problem here:
https://bugs.launchpad.net/ubuntu/+source/lilo/+bug/88219

I have problem with initramfs and lilo I think.
Short story:
- upgraded from Ubuntu 6.10 to 7.04 through internet
- some packages didn't upgrade (initramfs-tools is one of them)
- rebooted with my 2.6.17 kernel
- boot error
- reboted with my old kernel 2.6.15-23
- boot ok
- apt-get upgrade or install initramfs-tools doesn't work because I have zero size initrd.img.old (for kernel which works)
- I commented initrd instruction in lilo.conf
- upgrade finished
- since it added 2.6.20-14 and 2.6.20-13 to the lilo.conf, I added 2.6.15-23 to lilo.conf myself (kernel which worked)
- rebooted
- boot in new kernel 2.6.20 ends in busybox and messages that it can't mount /sys, /proc, /root/dev and because of that it can't start /sbin/init
- boot in old kernel 2.6.15 ends in kernel-panic: unable to mount root ...bla bla...

I will try to boot my ubuntu 6.06 DVD if I can solve my problems. (Since I upgraded from 6.06 to 6.10 with no problems)

Adam Conrad (adconrad)
Changed in initramfs-tools:
assignee: adconrad → nobody
Revision history for this message
maximilian attems (maks-debian) wrote :

Newer lilo has hooks to run on initramfs upgrade if /etc/lilo.conf is configured.
So this should be fixed from Maverick on, thus marking as Fix released.

affects: initramfs-tools (Ubuntu) → lilo (Ubuntu)
Changed in lilo (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.