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
# 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
}
#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
}