[Pkg-sysvinit-devel] Bug#686895: initscripts: /forcefsck: fsck -f	undefined (e2fsck-ism)
    Julius Seemayer 
    debian at yeeer.net
       
    Mon Feb 17 02:01:55 UTC 2014
    
    
  
tag 686895 + patch
thanks
Hi,
I  ran  into the very same bug.  It seems to be a more conceptual problem than
btrfs-related, but for making btrfsck work, I added this patch: >
--- checkroot.sh	2014-02-16 23:34:17.349214647 +0000
+++ /etc/init.d/checkroot.sh	2014-02-16 23:42:03.199999371 +0000
@@ -187,6 +187,12 @@
 		if [ -f /forcefsck ] || grep -s -w -i "forcefsck" /proc/cmdline
 		then
 			force="-f"
+
+			# btrfsck doesn't know -f
+			mount | while read dev on path type fs fnord; do
+				[ x/ = "x$path" -a xbtrfs = "x$fs" ] \
+					&& break
+			done && force=
 		else
 			force=""
 		fi
<  It  checks  if  /  is  a btrfs file system and then removes the -f from the
fsck(8)  command  line.  I don't know if it's sensible to add something like a
blacklist for "file systems whose fsck doesn't know -f" at this place. 
Cheers,
	Julius
    
    
More information about the Pkg-sysvinit-devel
mailing list