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:
parent
4df11c68b1
commit
0a5247b50b
1 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue