Commit 90f22d96 authored by Mike Hibler's avatar Mike Hibler

By popular demand, turn off time-dependent auto-fsck on Linux FSes.

parent f08b513c
......@@ -708,7 +708,20 @@ dolinux() {
fi
fi
# attempt to mount filesystem
#
# Turn off time-dependent fsck.
#
if [ -x /usr/local/sbin/tune2fs ]; then
echo " disabling time-dependent fsck"
tune2fs -i 0 $rootdev >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo " WARNING: could not disable time-dependent fsck"
fi
fi
#
# Attempt to mount filesystem
#
echo " fixing Linux root partition ${disk}s${part}"
mount -t ext2fs $rootdev /mnt || {
# might need a journal recovery, try fsck
......
......@@ -108,6 +108,13 @@ sub set_random_rootfs_uuid
system("$TUNE2FS -U random $root");
}
sub disable_time_dependent_fsck
{
my ($root) = @_;
system("$TUNE2FS -i 0 $root >/dev/null 2>&1");
}
sub kernel_version_compare
{
my ($v1, $v2) = @_;
......@@ -960,6 +967,7 @@ sub main
my $old_uuid = get_uuid($root);
set_random_rootfs_uuid($root);
disable_time_dependent_fsck($root);
my $fstype = mount_image($root, $imageroot);
my $uuid = get_uuid($root);
my $label = get_label($root);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment