System unusable on battery after incomplete shutdown

Bug #316200 reported by DaveAbrahams
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Jaunty by Alistair Phipps

Bug Description

As still happens reasonably often with Ubuntu, when my laptop locks up and I am forced to power-cycle it, the system (by default) comes back in an unusable state:

1. It skips fsck on startup because I'm on battery.
2. My root filesystem (JFS) is apparently detected as not having been cleanly unmounted, so the system mounts it read-only
3. Naturally, X refuses to start, but worse
4. I can't even log in at a virtual terminal to fix things because... the filesystem is read-only.

The only fix is to boot up in single-user mode, drop to a root shell prompt, do

 #mount -o remount,rw /
 # fsck /

Then I can resume the normal boot process.

Apparently according to https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/89752 a lot of people thought that skipping fsck when not on AC power was a wonderful idea, but it is the beginning of a perfect storm of hassle on my system. The fsck, once I manage to get to a root shell, only takes a couple seconds, and it would be infinitely better for me if that were done automatically regardless of A/C power state. I don't know why people use ext3 on laptops anyway; it takes forever to fsck (http://www.sabi.co.uk/Notes/linuxFS.html#fsFeats).

So there are two serious problems here:

1. fsck is skipped
2. can't login if the root FS is mounted read-only

and a couple suggestions:

3. Ubuntu should probably not install ext3 by default on laptops :-)
4. The installer should probably partition the disk by default so that whatever part of the disk that needs to be writable for login is probably writable even in case of an unclean shutdown.

This is ubuntu 8.10

Revision history for this message
DaveAbrahams (boostpro) wrote :

I am attempting to work around this problem by installing the attached init script

Revision history for this message
Alistair Phipps (alistairphipps) wrote :

I also ran into this issue. Installed using Jaunty alternate, selected JFS filesystem, and whenever the system does not shut down properly, none of my partitions will mount on next boot. JFS requires an fsck before mounting after an unclean mount. fstab option to fsck should be respected, with any exceptions for battery power only being on a per-filesystem basis (e.g. exclude ext3).

Changed in acpi-support (Ubuntu):
status: New → Confirmed
Revision history for this message
Alistair Phipps (alistairphipps) wrote :

The bug is in /etc/init.d/checkfs.sh (initscripts); fixing "affects" package.

affects: acpi-support (Ubuntu) → sysvinit (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.