Comment 2 for bug 435707

Revision history for this message
Richard Hansen (rhansen) wrote : Re: /forcefsck is ignored

I modified /etc/init/mountall.conf as follows:

$ diff -u mountall.conf.old mountall.conf
--- mountall.conf.old 2009-09-25 05:40:33.331304981 -0400
+++ mountall.conf 2009-09-25 05:39:48.551305237 -0400
@@ -22,6 +22,10 @@
 console output

 script
+ mount -t tmpfs none /tmp
+ exec > /tmp/mountall.log 2>&1
+ set -x
+ cat /proc/mounts
     . /etc/default/rcS
     [ -f /forcefsck ] && force_fsck="--force-fsck"
     [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"

When the /forcefsck file is not present, I get the following logged to /tmp/mountall.log:

+ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,mode=755 0 0
/dev/mapper/grok-root / ext4 ro,relatime,barrier=1,data=ordered 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /tmp tmpfs rw,relatime 0 0
+ . /etc/default/rcS
+ TMPTIME=0
+ SULOGIN=no
+ DELAYLOGIN=no
+ UTC=yes
+ VERBOSE=no
+ FSCKFIX=no
+ RAMRUN=yes
+ RAMLOCK=yes
+ [ -f /forcefsck ]
+ [ no = yes ]
+ [ -n 0 ]
+ tmptime=--tmptime=0
+ exec mountall --daemon --tmptime=0
fsck from util-linux-ng 2.16
fsck from util-linux-ng 2.16
root: clean, 436712/7192576 files, 5188293/28753920 blocks
boot: clean, 167/62248 files, 31424/248976 blocks

When /forcefsck is present, I get the following logged to /tmp/mountall.log:

+ cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,mode=755 0 0
/dev/mapper/grok-root / ext4 ro,relatime,barrier=1,data=ordered 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /tmp tmpfs rw,relatime 0 0
+ . /etc/default/rcS
+ TMPTIME=0
+ SULOGIN=no
+ DELAYLOGIN=no
+ UTC=yes
+ VERBOSE=no
+ FSCKFIX=no
+ RAMRUN=yes
+ RAMLOCK=yes
+ [ -f /forcefsck ]
+ force_fsck=--force-fsck
+ [ no = yes ]
+ [ -n 0 ]
+ tmptime=--tmptime=0
+ exec mountall --daemon --force-fsck --tmptime=0
fsck from util-linux-ng 2.16
fsck from util-linux-ng 2.16
boot: 167/62248 files (0.0% non-contiguous), 31424/248976 blocks
root: 436712/7192576 files (0.3% non-contiguous), 5188229/28753920 blocks

So the --force-fsck argument is being passed to mountall. Mountall appears to be running fsck in both cases, but there must be different command-line arguments. However, mountall isn't running fsck.ext4 with the -f option.