checkroot.sh blocks writing /var (fsck)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: initscripts
Booting hung on automatic fsck of my root partition.
The checkroot.sh startup script includes this block:
set -m
logsave -s $FSCK_LOGFILE fsck -C3 $force $fix -t $roottype $rootdev >/dev/console 2>&1 3>$PROGRESS_FILE &
set +m
rm -f $PROGRESS_FILE
Note that fsck ... > /var/run/
I believe this causes a problem when /var is on / (not a separate partition), which is mounted read-only.
I worked around this by setting VERBOSE=yes in /etc/default/rcS, which causes a different path through checkroot.sh.
Then my root fsck at boot was not blocked.
-troy
$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
/var/run is a temporary read-write filesystem and is mounted by S01mountkernfs.sh very early on in the boot process. fsck can still write to /var/run even though the root filesystem is read-only, so I very much doubt that is the issue here. Bare in mind that the default Ubuntu configuration does not have a separate /var partition, so everyone would have this problem if this was really the cause of your issue. The only time that fsck would not be able to write to /var/run would be if the mounting of /var/run failed for some reason.
Do you not get an error when fsck stops? Have you tried booting in recovery mode to look for errors?
Thanks