Bug 247489 - Change default partitioning on downloadable VM images
Summary: Change default partitioning on downloadable VM images
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-virtualization (Nobody)
URL: https://www.freebsd.org/doc/handbook/...
Depends on:
Reported: 2020-06-23 01:16 UTC by Paco Hope
Modified: 2021-06-30 00:15 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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.