Bug 247489

Summary: Change default partitioning on downloadable VM images
Product: Base System Reporter: Paco Hope <freebsd>
Component: miscAssignee: freebsd-virtualization (Nobody) <virtualization>
Status: New ---    
Severity: Affects Only Me CC: doc
Priority: ---    
Version: 12.1-RELEASE   
Hardware: Any   
OS: Any   
URL: https://www.freebsd.org/doc/handbook/disks-growing.html

Description Paco Hope 2020-06-23 01:16:57 UTC
If you look at the online documentation for growing filesystems (https://www.freebsd.org/doc/handbook/disks-growing.html) you'll see that growing filesystems on disk is easy if your last partition on the disk is swap. You just delete the partition, grow the filesystem partition, and then recreate the swap partition. It also makes it easy to change the size of the swap partition.

The raw disk image downloadable from freebsd.org (https://download.freebsd.org/ftp/releases/VM-IMAGES/12.1-RELEASE/amd64/Latest/FreeBSD-12.1-RELEASE-amd64.raw.xz) is built with:
ada0p1: boot
ada0p2: swap
ada0p3: filesystem

The primary use case (I think) for these VM images is to serve as a base image for a VM in a virtualization environment, which means that the vast majority of users who download them will resize the partitions. They presumably will want to resize and/or delete the swap partition as well.

If ada0p2 was the filesystem and ada0p3 was swap, this would be trivial. As it is, the swap partition cannot easily be moved, resized, or deleted from a virtual disk created from this image.