init: Do not perform fsck on rootfs and halfs unless when we are doing resize 39/278639/2 accepted/tizen/unified/20220726.012311 submit/tizen/20220725.143901
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Fri, 22 Jul 2022 14:54:23 +0000 (16:54 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Fri, 22 Jul 2022 15:19:43 +0000 (17:19 +0200)
Running fsck on the filesystems will cause partition to be modified, and,
consequently it will break possibility of doing DELTA_IMAGE-based upgrade.
This is because the upgrade type verifies the checksum of the partition
before doing upgrade - after fsck it is simply not matching anymore.

Change-Id: If0f56db7895983dbba41a773329d05a2eb1f2675

scripts/init.sh

index e1b419028e76891c1cd747c86a5885270c6f6c36..9ae800a41373713251e6eac8b95a773b5ee18cdb 100755 (executable)
@@ -201,7 +201,6 @@ function process_rootfs()
             /sbin/fsck -y $ROOTFS
             /sbin/resize2fs -f $ROOTFS
         fi
-        /sbin/fsck -y $ROOTFS
         /bin/mount -o ro $ROOTFS $ROOTFS_MNT
     else
         if [ "$NEED_RESIZEFS" = "1" ]
@@ -212,7 +211,6 @@ function process_rootfs()
             /sbin/resize2fs -f $ROOTFS
         fi
         /bin/mount -o remount,ro $ROOTFS_MNT
-        /sbin/fsck -y $ROOTFS
     fi
 }
 
@@ -278,7 +276,6 @@ function process_halfs()
         /sbin/fsck -y $HALFS
         /sbin/resize2fs -f $HALFS
     fi
-    /sbin/fsck -y $HALFS
     /bin/mount -o ro $HALFS $HALFS_MNT
 }