Pmbootstrap: Root partition not resized automatically on non-x86_64 Qemu

Created on 4 Nov 2017  路  2Comments  路  Source: postmarketOS/pmbootstrap

Even though pmbootstrap reports otherwise, --image-size <whatever> doesn't actually do anything when running Qemu on a non-x86_64 architecture (in my testing, armhf).

If I manually resize the image using truncate +1G qemu-vexpress.img, pmbootstrap does however complain when not setting --image-size to the correct value.

ERROR: The system image size must be 3072M or greater

But when booting the image, the root partition doesn't get resized to use up all the new space.

bug initramfs

Most helpful comment

The --image-size argument works as expected. The real issue is that the partition is not resized.
This is due the way we use to detect it, see here.
In the qemu-vexpress the root partition is /dev/mmcblk0p2, but if we change the resize function to detect that one, we will also start resizing the device partitions or the partitions in the actual sd-cards.

I see some possible solutions to force the partition resize:

  1. using a deviceinfo variable (ex: deviceinfo_initfs_force_partition_resize="true")
  2. using a cmdline parameter (ex: PMOS_FORCE_PARTITION_RESIZE)
  3. hardcode something like if devicename starts with qemu then resize

@ollieparanoid what you think about it?

All 2 comments

The --image-size argument works as expected. The real issue is that the partition is not resized.
This is due the way we use to detect it, see here.
In the qemu-vexpress the root partition is /dev/mmcblk0p2, but if we change the resize function to detect that one, we will also start resizing the device partitions or the partitions in the actual sd-cards.

I see some possible solutions to force the partition resize:

  1. using a deviceinfo variable (ex: deviceinfo_initfs_force_partition_resize="true")
  2. using a cmdline parameter (ex: PMOS_FORCE_PARTITION_RESIZE)
  3. hardcode something like if devicename starts with qemu then resize

@ollieparanoid what you think about it?

I would prefer the 2nd option, because we only need this in the initramfs and we do it the same way with the logging already.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

craftyguy picture craftyguy  路  6Comments

erhoof picture erhoof  路  4Comments

craftyguy picture craftyguy  路  7Comments

montvid picture montvid  路  3Comments

MartijnBraam picture MartijnBraam  路  5Comments