Support resizing raw disk images before booting
When you install Endless OS from an ISO, the process works as follows:
dda disk image from within the ISO to the start of the disk
- if legacy booted, rather than EFI-booted convert the partition table from GPT to MBR to work around some broken BIOSes we have found in the wild – this workaround is unnecessary but harmless for Boxes
When the installed disk image is booted, its first act is to expand the partition table and root filesystem to fill the disk.
We distribute raw disk images as well as ISOs. Currently, Boxes is able to import these disk images, but there is no way to resize the image before it is booted. This means the installed system has almost no free disk space.
The Endless OS installation process in Boxes could be streamlined as follows:
- Download the disk image, rather than the ISO (the ISO tends to be a few % larger)
- Decompress the disk image
- Convert the disk image to qcow2
- Extend the qcow image to a user-specified size (which will consume no additional space on the host disk until it is used)
- Boot it
This would avoid the need to run the Endless OS installer at all.