From c39a7ca402e5b0e5c855d20a2fdfb4ece04f31b9 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Wed, 18 Apr 2018 20:57:19 +0900 Subject: [PATCH] Perform fsck on each booting Change-Id: I063c8bbf2f9ca0b0c995a1dd8260bfab7efe41f6 Signed-off-by: Hyotaek Shim --- scripts/init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/init.sh b/scripts/init.sh index 4a8f064..60aa787 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -30,6 +30,7 @@ fi FIRSTBOOT=1 if [ x"$DATAFS" != "x" ] then + /sbin/fsck -y $DATAFS /bin/mount $DATAFS /opt if [ -e /opt/var/.fsck_done ] @@ -46,8 +47,8 @@ then if [ "$FIRSTBOOT" = "1" ] then /sbin/resize2fs -f $ROOTFS - /sbin/fsck -y $ROOTFS fi + /sbin/fsck -y $ROOTFS /bin/mount $ROOTFS /sysroot -o rw else echo "WARNING : THERE IS NO ROOTFS." @@ -59,7 +60,6 @@ then if [ "$FIRSTBOOT" = "1" ] then /sbin/resize2fs -f $DATAFS - /sbin/fsck -y $DATAFS /bin/mount $DATAFS /sysroot/opt else /bin/mount -M /opt /sysroot/opt @@ -81,8 +81,8 @@ then if [ "$FIRSTBOOT" = "1" ] then /sbin/resize2fs -f $MODULES - /sbin/fsck -y $MODULES fi + /sbin/fsck -y $MODULES /bin/mount $MODULES /sysroot/usr/lib/modules fi -- 2.7.4