From d1c75c3280d9d3f0d07087c0f700d6bab5498717 Mon Sep 17 00:00:00 2001 From: Mateusz Moscicki Date: Wed, 7 Feb 2024 14:36:45 +0100 Subject: [PATCH] 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 --- scripts/init.sh | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) 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 } -- 2.7.4