opnsense-src/usr.sbin/makefs
Mark Johnston 240afd8c1f makefs: Add ZFS support
This allows one to take a staged directory tree and create a file
consisting of a ZFS pool with one or more datasets that contain the
contents of the directory tree.  This is useful for creating virtual
machine images without using the kernel to create a pool; "zpool create"
requires root privileges and currently is not permitted in jails.
makefs -t zfs also provides reproducible images by using a fixed seed
for pseudo-random number generation, used for generating GUIDs and hash
salts.  makefs -t zfs requires relatively little by way of machine
resources.

The "zpool_reguid" rc.conf setting can be used to ask a FreeBSD guest to
generate a unique pool GUID upon first boot.

A small number of pool and dataset properties are supported.  The pool
is backed by a single disk vdev.  Data is always checksummed using
Fletcher-4, no redundant copies are made, and no compression is used.
The manual page documents supported pool and filesystem properties.

The implementation uses a few pieces of ZFS support from with the boot
loader, especially definitions for various on-disk structures, but is
otherwise standalone and in particular doesn't depend on OpenZFS.

This feature should be treated as experimental for now, i.e., important
data shouldn't be trusted to a makefs-created pool, and the command-line
interface is subject to change.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35248
2022-08-05 13:42:29 -04:00
..
cd9660 makefs(8): Fix a few typos in source code comments 2022-02-06 13:46:38 +01:00
ffs makefs(8): Fix a few typos in source code comments 2022-02-06 13:46:38 +01:00
msdos makefs: Fix warnings and reset WARNS to the default 2022-05-10 17:38:23 -04:00
sys Fix makefs bootstrap after d485c77f20 2021-02-22 17:55:45 +00:00
tests makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
zfs makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
cd9660.c Synchronise with NetBSD's version of EFI handling for El Torito images. 2018-03-31 15:04:41 +00:00
cd9660.h Fix -Wpointer-sign warnings in makefs and mkimg 2021-01-07 09:26:21 +00:00
ffs.c makefs: fix calculation of file sizes 2022-05-16 16:32:10 -06:00
ffs.h Allocate extra inodes in makefs when leaving free space in UFS images. 2021-04-06 13:43:29 -04:00
Makefile makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
makefs.8 makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
makefs.c makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
makefs.h makefs: Add ZFS support 2022-08-05 13:42:29 -04:00
msdos.c makefs: remove set but not used variables 2021-11-21 21:21:34 -05:00
msdos.h Fix makefs bootstrap after d485c77f20 2021-02-22 17:55:45 +00:00
mtree.c makefs: Ignore the "tags" keyword in mtree manifests 2021-03-23 14:38:40 -04:00
walk.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
zfs.c makefs: Add ZFS support 2022-08-05 13:42:29 -04:00