1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-12 19:09:56 +03:00

install: format: fix root size calculation

Actually pass rootfs_size and don't round up when dividing.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
Casey Connolly 2025-06-26 14:57:43 +02:00
parent 4df11c68b1
commit 0a5247b50b

View file

@ -273,11 +273,11 @@ def format_and_mount_root(args: PmbArgs, layout: PartitionLayout) -> None:
install_fsprogs(filesystem)
logging.info(f"(native) format {layout.root.path} (root, {filesystem})")
rootfs_size = round(layout.root.size / 1024)
rootfs_size = layout.root.size
# Leave some empty space for LUKS
if layout.fde:
rootfs_size -= 64 * 1024
pmb.chroot.root([*mkfs_root_args, layout.root.path, f"{round(layout.root.size / 1024)}k"])
pmb.chroot.root([*mkfs_root_args, layout.root.path, f"{int(rootfs_size/1024)}k"])
# Unmount the empty dir we mounted over /boot
pmb.mount.umount_all(Chroot.native() / rootfs / "boot")