Skip to contentSkip to conversation

checkroot.sh and fsck the root partition

DISCUSSION Holger Freyther 2 participants 2 messages Feb 15, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I know most of use ubifs/jffs2 but I have one device with a ext3/ext4 partition and would like to run fsck as part of the boot (with auto fix up). Besides installing the e2fs fsck, fixing the fstab fsck will not be executed.

E.g. if I take a look at this script:
http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh

it is not clear how 'rootcheck' could ever be 'yes'.

Any comments?

holger

#1 lore raw
Quoted 9 lines · Holger Freyther

I know most of use ubifs/jffs2 but I have one device with a ext3/ext4 partition and would like to run fsck as part of the boot (with auto fix up). Besides installing the e2fs fsck, fixing the fstab fsck will not be executed.

E.g. if I take a look at this script:
http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh

it is not clear how 'rootcheck' could ever be 'yes'.

My guess, and it is a guess (though potentially comparing against the original debian initscripts we started with, or looking through git history, may be informative) is that the original default value of rootcheck was yes, and hence the conditional in the loop setting rootcheck=no made sense, but it was changed at some point in the history due to the use of non-checkable filesystems.

If we change the default back, we'll break everyone using the stock fstab or one based on it, as the default sets pass=1 for the 'rootfs' mount. One option would be to source /etc/default/rcS after the definition of the defaults prior to the loop, thereby allowing a per machine rcS which changes the default value.

Signature · 1 line
Christopher Larson