checkroot.sh/checkfs.sh do not wait for fsck to finish

Bug #255563 reported by Chris Halse Rogers
56
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Critical
Martin Pitt
Nominated for Karmic by Alain Baeckeroot
Intrepid
Fix Released
Critical
Martin Pitt

Bug Description

Binary package hint: sysvinit

It seems that it's a goal to parallelise the fsck on boot, and that this has started to be implemented in Intrepid.

Similarly to bug 255562, the current implementation of this breaks stuff. Currently, the fsck of / will be started and the rest of the init sequence is continued. Since, for me, /tmp and /var are on / this means that a bunch of init scripts fail when trying to write to either /tmp or /var, culminating in X failing to come up and presenting an error screen. A text login prompt is displayed, but login fails.

Related branches

Changed in sysvinit:
importance: Undecided → High
Revision history for this message
Kees Cook (kees) wrote :

I see this as well -- the init scripts report "failed", yet fsck continues in the background while the rest of the system continues to boot, leaving some filesystems unmounted (since they're still being fsckd).

Changed in sysvinit:
status: New → Confirmed
assignee: nobody → pitti
milestone: none → intrepid-alpha-5
Martin Pitt (pitti)
Changed in sysvinit:
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Keeping notes: Apparently this sequence in /etc/init.d/checkroot.fs does not work any more:

                            set -m
                            logsave -s $FSCK_LOGFILE fsck -C3 $force $fix -t $roottype $rootdev >/dev/console 2>&1 3>$PROGRESS_FILE &
                            set +m
                            usplash_progress "$PROGRESS_FILE"
                            rm -f $PROGRESS_FILE

The script exits right after calling logsave fsck (checked with set -x and lots of echos). Switching to bash does not help either. Something really weird is going on here...

Changed in sysvinit:
importance: High → Critical
milestone: intrepid-alpha-5 → intrepid-alpha-6
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sysvinit - 2.86.ds1-59ubuntu5

---------------
sysvinit (2.86.ds1-59ubuntu5) intrepid; urgency=low

  * debian/initscripts/lib/init/usplash-fsck-functions.sh, get_fsck_status():
    fsck -C recently started to report a fourth parameter (current device)
    which was not expected by the read shell command, causing abortion of the
    script due to a division by zero error. Now use "read pass cur max tail"
    to allow for arbitrary extra info in the fsck progress lines.
    (LP: #255563)

 -- Martin Pitt <email address hidden> Wed, 03 Sep 2008 19:12:41 +0200

Changed in sysvinit:
status: In Progress → Fix Released
Changed in sysvinit (Ubuntu Intrepid):
status: Fix Released → Confirmed
Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

This bug affected me on karmic koala RC today (2009-10-28)

i connected in graphic user session while "fsck -a -C9 -t ext4 ..." was running on a big data partition.

------------------------------------------------------------------
 ~$ lsb_release -rc
Release: 9.10
Codename: karmic
------------------------------------------------------------------
~$ dpkg -l | grep init
ii busybox-initramfs 1:1.13.3-1ubuntu7 Standalone shell setup for initramfs
ii initramfs-tools 0.92bubuntu53 tools for generating an initramfs
ii initscripts 2.87dsf-4ubuntu11 scripts for initializing and shutting down the system
ii insserv 1.12.0-11 Tool to organize boot sequence using LSB init.d script dependenc
ii libklibc 1.5.15-1ubuntu2 minimal libc subset for use with initramfs
ii lsb-base 4.0-0ubuntu5 Linux Standard Base 4.0 init script functionality
ii module-init-tools 3.10-3 tools for managing Linux kernel modules
ii ncurses-base 5.7+20090803-2ubuntu2 basic terminal type definitions
rc system-services 0.3.9-8 definitions of essential system services
ii sysvinit-utils 2.87dsf-4ubuntu11 System-V-like utilities
ii upstart 0.6.3-10 event-based init daemon
rc upstart-compat-sysv 0.3.9-8 compatibility for System-V-like init
ii xinit 1.1.1-1 X server initialisation tool
------------------------------------------------------------------
~$ uname -a
Linux servolant 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
------------------------------------------------------------------

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

~$ dpkg -l | grep splash
ii libusplash0 0.5.49 userspace bootsplash library
ii usplash 0.5.49 Userspace bootsplash utility
ii usplash-theme-xubuntu 0.38 Usplash theme for Xubuntu

btw, man fsck.ext4 says that the "-a" option is obsolete (kept only for compat) and should be replaced by "-p"

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

i forgot to mention that i boot with no splash (i suppressed the "quiet splash" options in grub)
my grub section is:

title Ubuntu karmic (development branch), kernel 2.6.31-14-generic
uuid 15ac5c49-3908-4674-8811-3ff51e366161
kernel /vmlinuz-2.6.31-14-generic root=UUID=8d775025-3380-4f16-a5f4-526c60956da9 ro
initrd /initrd.img-2.6.31-14-generic
quiet

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

i forgot to watch in tty1, i saw it at shutdown, displaying something like :
fsck [##############----------------------------------------------------------]
starting OpenSSH server
starting PostgreSQL server
login:

no doubt the boot process did not wait for fsck to finish.

Revision history for this message
Martin Pitt (pitti) wrote :

Closing intrepid task again.

Changed in sysvinit (Ubuntu Intrepid):
status: Confirmed → Fix Released
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Use "bootwait" in your fstab options for that filesystem to have it wait

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

1/ either "bootwait' option should be added by default for all partitions in fstab by Karmic installer/upgrader
  or
  the initprocess should wait by default

2/ should i fill a new bug wrt Karmic ?

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

the "bootwait" option is not described in the english man page of Karmic.

ii mount 2.16-1ubuntu5

Revision history for this message
Alain Baeckeroot (alain-baeckeroot) wrote :

 i won't add an undocumented option in the fstab :)

i opened a new bug wrt karmic https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/469161

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.