crux-musl

Unnamed repository; edit this file 'description' to name the repository.
git clone https://codeberg.org/emmett1/crux-musl
Log | Files | Refs | README | LICENSE

README (1243B)


      1 README for f2fs-tools
      2 
      3 
      4 f2fs-tools' fsck tool by default refuses to check a mounted filesystem
      5 whether it's mounted read-only or not. This causes fsck to fail at boot
      6 and prompt for the root password for filesystem maintenance. In order to
      7 avoid this it is recommended that the 6th field (fs_passno) of any f2fs
      8 entries in /etc/fstab be set to 0.
      9 
     10 Hopefully this will be fixed upstream sometime in a new release.
     11 
     12 If you REALLY want to work around this limitation a user-submitted patch
     13 for /etc/rc can be found below, but note that this is NOT supported.
     14 
     15 
     16 patch:
     17 
     18 --- etc/rc.orig	2020-10-27 11:41:02.000000000 +0800
     19 +++ etc/rc	2020-11-09 15:44:30.933015712 +0800
     20 @@ -27,8 +27,13 @@
     21  fi
     22  
     23  # Check filesystems
     24 -/sbin/fsck $FORCEFSCK -A -T -C -a
     25 -if [ $? -gt 1 ]; then
     26 +ROOTFS=$(/bin/findmnt -lno fstype /)
     27 +ROOTDEV=$(/bin/findmnt -lno source /)
     28 +if [ "$ROOTFS" = "f2fs" ]; then
     29 +  /sbin/fsck.f2fs -a -f "$ROOTDEV"
     30 +else
     31 +  /sbin/fsck $FORCEFSCK -A -T -C -a
     32 +  if [ $? -gt 1 ]; then
     33  	echo
     34  	echo "***************  FILESYSTEM CHECK FAILED  ******************"
     35  	echo "*                                                          *"
     36 @@ -46,6 +51,7 @@
     37  	/bin/mount -o remount,ro /
     38  	/sbin/reboot -f
     39  	exit 0
     40 +  fi
     41  fi
     42  
     43  # Mount local filesystems