Disable resize filesystem on rootfs and hal partitions. 96/309696/1 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20240509.175849
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Wed, 7 Feb 2024 13:36:45 +0000 (14:36 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Mon, 15 Apr 2024 14:51:02 +0000 (16:51 +0200)
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

scripts/init.sh

index 8de23f9..7e78e69 100755 (executable)
@@ -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
 }