Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this page for instructions on how to get full permissions. Sorry for the inconvenience.
This might be something we should add to the docs (since it's much faster and easier than manually running the image-builder script with whatever qcow2 size).
If we add this though, I'd like to give explicit steps for the "resizepart ..." because not everyone will know what to do.
Well I'd add the qemu resize info to the mini-tutorials or additional tutorials (not sure what the difference is there).
The question of a max size limit to honor is going to be a common one and I am working on an FAQ which this would be a great addition to, but we don't have an answer to the max size yet.
Alberto Fanjul Alonsochanged title from Installing flatpak runtime qemu image runs out of space to Mini tutorial for extend a qemu image
changed title from Installing flatpak runtime qemu image runs out of space to Mini tutorial for extend a qemu image
purism@pureos:~$ sudo partedGNU Parted 3.2Using /dev/sdaWelcome to GNU Parted! Type 'help' to view a list of commands.
Show free avaliable space:
(parted) print free
Model: ATA QEMU HARDDISK (scsi)Disk /dev/sda: 6821MBSector size (logical/physical): 512B/512BPartition Table: msdosDisk Flags: Number Start End Size Type File system Flags 32,3kB 1049kB 1016kB Free Space 1 1049kB 191MB 190MB primary ext4 boot 2 191MB 3600MB 3409MB primary ext4 3600MB 6821MB 3221MB Free Space
Resize partition 2:
(parted) resizepart 2
Warning: Partition /dev/sda2 is being used. Are you sure you want to continue?
As we are expanding disk there's no risk. Accept:
Yes/No? Yes
Choose the end of free avaliable space:
End? [3600MB]? 6821
Exit parted:
(parted) quit
Information: You may need to update /etc/fstab.
Resize filesystem:
purism@pureos:~$ sudo resize2fs /dev/sda2
resize2fs 1.44.3 (10-July-2018)Filesystem at /dev/sda2 is mounted on /; on-line resizing requiredold_desc_blocks = 1, new_desc_blocks = 1The filesystem on /dev/sda2 is now 1618691 (4k) blocks long.
After adding cloud-initramfs-growroot to the image (see image-builder!39 (merged)) then all a user needs to do on a fresh image is to sudo resize2fs /dev/vda2 and I can add this to the current docs.
unxz image$ qemu-img resize -fraw qemu-x86_64.img +1G# run qemu image (I see cloud-initramfs-growroot expanding to free space)# get into qemu$ sudo resize2fs /dev/sda2
Is it an option to add resize2fs to sudo without password and add
Wait I thought we (by we I mean me :)) were just going to document the resize2fs step. I just haven't gotten to it yet so sorry bout that but will soon.