Page MenuHomeFreeBSD

Use makefs(8) in release VM-image generation instead of mdconfig/newfs/etc.
ClosedPublic

Authored by nwhitehorn on Feb 24 2021, 3:27 PM.

Details

Summary

This patch changes release VM image generation to use makefs(8) instead of using md(4), then newfs, and mounting and unmounting things many times. This provides a number of benefits:

  • Simpler generation of images (the patch is net-negative): no need to attach md(4) devices and mount and unmount things
  • Reduced privileges needed: if not for needing to have devfs mounted in the image at a few points, could do this in a zero-privilege jail
  • Can generate cross-endian file systems: this enables generation of powerpc64 VM images (tested and working) on amd64 hosts

I have tested generation of amd64 and powerpc64 images and they work as before, with identical file system parameters and organization.

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nwhitehorn created this revision.

No objection, but please do not target this for releng/13.0 (13.0-RELEASE), as it is my opinion it is too late for such a change at this point in the cycle.

This revision is now accepted and ready to land.Feb 24 2021, 3:35 PM

Just committed this. I agree about 13.0 -- I was planning to merge to stable/13 after 13.0 has branched and smoke-test this in HEAD for a bit in the meantime.