diff options
author | Sven Gothel <[email protected]> | 2021-07-08 16:57:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-07-08 16:59:19 +0200 |
commit | 2797e50dc3f2f99b0c3d4d19f08eeed758701425 (patch) | |
tree | e122a873b1eaa44e00894f49ac766c4f249a1733 /scripts | |
parent | c651fc65905f431201d1f7858bb9f80e6f026653 (diff) |
None ROOTFS_RO: Only use 250 MiB vfat boot parition (as in arm64 branch)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qcow2_handling | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/qcow2_handling b/scripts/qcow2_handling index 24ac47b..b11a9b9 100644 --- a/scripts/qcow2_handling +++ b/scripts/qcow2_handling @@ -177,15 +177,26 @@ load_qimage() { sync qemu-nbd --discard=unmap -c $NBD_DEV image-${STAGE}.qcow2 sync - # 1 boot (7100 MiB), rootfs (remainder of BASE_QCOW2_SIZE) - sfdisk $NBD_DEV << EOF + + if [ "${ROOTFS_RO}" = "1" ] ; then + # 1 boot (7100 MiB), rootfs (remainder of BASE_QCOW2_SIZE) + sfdisk $NBD_DEV << EOF 4MiB,7100MiB,c,* 7104MiB,,83; EOF + else + # 1 boot (250 MiB), rootfs (remainder of BASE_QCOW2_SIZE) + sfdisk $NBD_DEV << EOF +4MiB,250MiB,c,* +254MiB,,83; +EOF + fi sync + kpartx -a $NBD_DEV mkfs.fat -n BOOT -F 32 -v $MAP_BOOT_DEV if [ "${ROOTFS_RO}" = "1" ] ; then + # Set reserved-blocks-percentage for root to zero mkfs.ext4 -L ROOTFS -m 0 -O "^has_journal,^metadata_csum,^64bit" $MAP_ROOT_DEV else mkfs.ext4 -L ROOTFS -O "^has_journal,^metadata_csum,^64bit" $MAP_ROOT_DEV |