asb / raspi-config

Configuration tool for the Raspberry Pi. Now maintained at https://github.com/RPi-Distro/raspi-config
Other
264 stars 332 forks source link

#BUG raspi-config cause ext4 FS Corruption at FS resize #17

Open hvenzke opened 11 years ago

hvenzke commented 11 years ago

see discussion at https://github.com/raspberrypi/linux/issues/289

!! ->>> missing ext4 fsck

 diff -ur /usr/bin/raspi-config.orig /usr/bin/raspi-config
--- /usr/bin/raspi-config.orig  2012-10-28 21:13:22.000000000 +0000
+++ /usr/bin/raspi-config       2013-05-09 14:40:58.981203727 +0000
@@ -52,6 +52,12 @@
 case "$1" in
   start)
     log_daemon_msg "Starting resize2fs_once" &&
+    #
+    # must force fsck bevor resize2fs
+    echo "Forced EXT4 fsck bevor resize2fs"
+    /sbin/fsck.ext4 -f  /dev/mmcblk0p2
+    sync
+    sleep 2
     resize2fs /dev/mmcblk0p2 &&
     rm /etc/init.d/resize2fs_once &&
     update-rc.d resize2fs_once remove &&