Revert "[build]: Use zstd compression for base filesystem squashfs" (#10030)
When upgrading from an older image (with an older kernel that doesn't
support zstd) to 202012, the squashfs filesystem from the 202012 image
can't be mounted on the older image, because zstd was introduced in
4.14, and older images will likely be running 4.9.
Therefore, disable zstd compression in the squashfs image for 202012
image. When upgrading from 202012 to newer images, since 202012 is
running on 4.19, it can read and mount zstd-compressed squashfs images.
# Why this was done
The kernel in 201811 image (4.9 kernel) doesn't support zstd. In some cases,
it may be needed to mount the squashfs image from the new image while
the current (old) image is booted. If the squashfs image is compressed with
zstd, then it cannot be mounted on a 4.9 kernel, because zstd was introduced
in 4.14.
This reverts commit 35e88e5f6a
.
This commit is contained in:
parent
b4e8bcc19c
commit
f2e677db34
@ -586,7 +586,7 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
|
||||
sudo du -hsx $FILESYSTEM_ROOT
|
||||
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker
|
||||
scripts/collect_host_image_version_files.sh $TARGET_PATH $FILESYSTEM_ROOT
|
||||
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -comp zstd -b 1M -e boot -e var/lib/docker -e $PLATFORM_DIR
|
||||
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -e boot -e var/lib/docker -e $PLATFORM_DIR
|
||||
|
||||
# Ensure admin gid is 1000
|
||||
gid_user=$(sudo LANG=C chroot $FILESYSTEM_ROOT id -g $USERNAME) || gid_user="none"
|
||||
|
Reference in New Issue
Block a user