hang during boot after upgrade to oneiric

Bug #899795 reported by linas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
New
Undecided
Unassigned

Bug Description

After upgrading to oneirc, and rebooting, system hangs during boot. Problem seems to be a bad interaction with upstart, udev, and lvm (device mapper) filesystems. Details below:

During boot, kernel appears to boot fully. Next set of messages show fsck running, and then a hang. Using the old init=/bin/sh trick, I can see that all of my file systems are now mounted, except one: a file system that lives on an lvm volume. I believe that, at this point, upstart is waiting for the lvm volume to come online... but of course, it can't/won't until lvm and the device-mapper run, which is typically done later, in the /etc/init.d scripts. (The mount point, a directory in /dev/mapper, hasn't yet been created). Commenting out the lvm volume in /etc/fstab allows the boot to proceed, more or less normally; the missing file system can then be mounted by hand.

With the above problem worked around, there is another alarming problem: much, much later in the boot, after a number of /etc/init.d scripts run, if finally gets around to running /etc/init.d/checkfs, which does an ... fsck! but with upstart, most all file systems are already mounted at this point, so the fsck crashes & burns. In the old SysV init scheme, this was correct: the fsck would not run until *after* the /etc/init.d/lvm2 scripts ran.

The clever sysadmin can work around these, but .. wow, it was hard and painful to figure out the above.

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please add the log files from '/var/log/dist-upgrade/' to this bug report as separate attachments? Thanks in advance.

affects: ubuntu → update-manager (Ubuntu)
Changed in update-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
linas (linasvepstas) wrote :

there are no files called /var/log/dist-upgrade
locate dist-upgrade shows only these:
/etc/X11/xorg.conf.dist-upgrade-2009...
/usr//lib/python2.6/dist-packages/DistUpgrade/dist-upgrade.py
and a few otherws like this, nothing in /var/log

Changed in update-manager (Ubuntu):
status: Incomplete → New
Revision history for this message
linas (linasvepstas) wrote :

BTW, this is on an amd64 system

Revision history for this message
linas (linasvepstas) wrote :

I just discovered that there are a fair number of files in /etc/init that are stale, and do not belong to any dpkg. That is, dpkg -S /etc/init/whatever reports that there's no owning package. Judging from the timestamps on these files, they appear to belong to 11.04 or even earlier distros, and should have been removed/replaced, but weren't. This suggests that dpkg is getting confused about what's installed and/or install glitches cause dpkg to forget to run .postrm scripts. I will try to manually remove the orphaned files & see if this fixes the problem. I notice that some of the orphans include udev and dbus and hal ... it may take a few days to get around to this...

Revision history for this message
linas (linasvepstas) wrote :

Removing the stale files in /etc/init makes no difference to the boot process. It still appears that nothing starts lvm (or md) before mountall runs, thus leading to a hang because local-filesystems can't happen til lvm runs. Still hitting an second round of fsck in /etc/init.d even after local filesystems got mounted rw.

no longer affects: update-manager (Ubuntu)
affects: upstart → upstart (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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