Export-image: Only disable metadata_csum feature if it's possibly enabled.
This commit is contained in:
parent
137efd2379
commit
4d65b2b357
1 changed files with 5 additions and 1 deletions
|
@ -50,8 +50,12 @@ ROOT_DEV=$(losetup --show -f -o ${ROOT_OFFSET} --sizelimit ${ROOT_LENGTH} ${IMG_
|
|||
echo "/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH"
|
||||
echo "/: offset $ROOT_OFFSET, length $ROOT_LENGTH"
|
||||
|
||||
ROOT_FEATURES="^huge_file"
|
||||
if grep -q "metadata_csum" /etc/mke2fs.conf; then
|
||||
ROOT_FEATURES="^metadata_csum,$ROOT_FEATURES"
|
||||
fi
|
||||
mkdosfs -n boot -F 32 -v $BOOT_DEV > /dev/null
|
||||
mkfs.ext4 -O ^metadata_csum,^huge_file $ROOT_DEV > /dev/null
|
||||
mkfs.ext4 -O $ROOT_FEATURES $ROOT_DEV > /dev/null
|
||||
|
||||
mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4
|
||||
mkdir -p ${ROOTFS_DIR}/boot
|
||||
|
|
Reference in a new issue