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.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 11:46 PM
Unknown Object (File)
Sun, Apr 14, 5:08 PM
Unknown Object (File)
Wed, Apr 10, 10:36 AM
Unknown Object (File)
Mon, Apr 8, 9:30 PM
Unknown Object (File)
Feb 22 2024, 12:37 AM
Unknown Object (File)
Feb 22 2024, 12:37 AM
Unknown Object (File)
Feb 22 2024, 12:37 AM
Unknown Object (File)
Feb 22 2024, 12:24 AM
Subscribers
None

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
rG FreeBSD src repository
Lint
Lint Not Applicable
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.