[Pkg-sysvinit-devel] Bug#571241: checkroot.sh: should not try to fsck rootfs on ubifs

Bart Trojanowski bart at jukie.net
Wed Feb 24 15:52:54 UTC 2010


Package: initscripts
Version: 2.87dsf-8
Severity: normal

checkroot.sh has this comment:

# Disabled AC power check until fsck can be told to only check the 
# file system if it is corrupt when running on battery. (bug #526398) 

and then it forces rootcheck to 'yes'.

I am running on a SheevaPlug.  I installed Debian on a UBIFS filesystem.
This filesystem does not require/have fsck.  That wouldn't be so bad if
checkroot.sh didn't forcefully create a /dev/root and try to fsck it.

At the serial console I see:

Checking file systems...fsck from util-linux-ng 2.16.2
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
uncorrectable error :
uncorrectable error :
end_request: I/O error, dev mtdblock0, sector 8

... this is a bit confusing because my ubifs rootfs is actually on
mtdblock2.  Here, mtdblock0 contains uboot data, which doesn't use
standard MTD checksumming that Linux understands, and that's why we are
getting I/O errors.

My naive fix was to apply the following patch:

--- 8< ---

--- a/init.d/checkroot.sh
+++ b/init.d/checkroot.sh
@@ -206,6 +206,7 @@ Will restart in 5 seconds."
 #              fi
 #      fi
        rootcheck=yes
+        ( [ "$roottype" = "ubifs" ] ) && rootcheck=no
 
        #
        # See if we want to check the root file system.

--- 8< ---

and this fixes the problems for me.

-Bart


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armel (armv5tel)

Kernel: Linux 2.6.32.8 (PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initscripts depends on:
ii  coreutils                     7.4-2      The GNU core utilities
ii  debianutils                   3.2.2      Miscellaneous utilities specific t
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  sysv-rc                       2.87dsf-8  System-V-like runlevel change mech
ii  sysvinit-utils                2.87dsf-8  System-V-like utilities

Versions of packages initscripts recommends:
ii  e2fsprogs                     1.41.9-1   ext2/ext3/ext4 file system utiliti
ii  psmisc                        22.10-1    utilities that use the proc file s

initscripts suggests no packages.

-- no debconf information





More information about the Pkg-sysvinit-devel mailing list