Hiya! I'm writing some scripts to automate the creation of bootable NetBSD images. I build the image as a small raw disk so it can be mounted via vndconfig, then convert it to qcow2 and resize it. The goal is that these images are self-hosting: qcow2's are sparse, so I can resize the disk to the size of the host disk without any issues, which isn't possible with raw images.
However, I want the system to resize the root filesystem to fill the remaining disk space on first boot. This works with growfs_enable=YES in rc.conf on FreeBSD, but resize_root=YES on NetBSD doesn't seem to do the trick. Any advice? My script for building NetBSD images is here and is designed to be run on a NetBSD host: https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/images/netbsd/genimg -- Drew DeVault
