From: Mateusz Moscicki Date: Wed, 7 Feb 2024 13:36:45 +0000 (+0100) Subject: Disable resize filesystem on rootfs and hal partitions. X-Git-Tag: accepted/tizen/8.0/unified/20240509.175849^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_8.0_unified;p=platform%2Fcore%2Fsystem%2Finitrd.git Disable resize filesystem on rootfs and hal partitions. Running the resize2fs (and/or fsck) on partition changes its data and checksum, so during the OS Upgrade checksums don't match, and Upgrade procedure ends with an error. Change-Id: I83a19aff720c8b5ec773048b9794c5ecdc5756e2 --- diff --git a/scripts/init.sh b/scripts/init.sh index 8de23f9..7e78e69 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -156,21 +156,7 @@ function process_rootfs() if [ "$IN_INITRD" = "1" ] then /sbin/btrfs check $ROOTFS - if [ "$NEED_RESIZEFS" = "1" ] - then - /bin/mount $ROOTFS $ROOTFS_MNT -o rw,compress-force=lzo - /sbin/btrfs filesystem resize max $ROOTFS_MNT - mount -o remount,ro $ROOTFS_MNT - else - /bin/mount $ROOTFS $ROOTFS_MNT -o ro,compress-force=lzo - fi - else - if [ "$NEED_RESIZEFS" = "1" ] - then - /bin/mount -o remount,rw $ROOTFS_MNT - /sbin/btrfs filesystem resize max $ROOTFS_MNT - fi - /bin/mount -o remount,ro $ROOTFS_MNT + /bin/mount $ROOTFS $ROOTFS_MNT -o ro,compress-force=lzo fi return @@ -209,21 +195,7 @@ function process_rootfs() # ext4 partion if [ "$IN_INITRD" = "1" ] then - if [ "$NEED_RESIZEFS" = "1" ] - then - /sbin/fsck -y $ROOTFS - /sbin/resize2fs -f $ROOTFS - fi /bin/mount -o ro $ROOTFS $ROOTFS_MNT - else - if [ "$NEED_RESIZEFS" = "1" ] - then - /bin/mount -o remount,ro $ROOTFS_MNT - /sbin/fsck -y $ROOTFS - /bin/mount -o remount,rw $ROOTFS_MNT - /sbin/resize2fs -f $ROOTFS - fi - /bin/mount -o remount,ro $ROOTFS_MNT fi } @@ -284,11 +256,6 @@ function process_halfs() #In future, it will be removed# if [ -d $HALFS_MNT/lib ]; then return; fi - if [ "$NEED_RESIZEFS" = "1" ] - then - /sbin/fsck -y $HALFS - /sbin/resize2fs -f $HALFS - fi /bin/mount -o ro $HALFS $HALFS_MNT }