aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/makefs/makefs.8
Commit message (Collapse)AuthorAgeFilesLines
* makefs: zfs: Allow the path vdev property to be setJose Luis Duran2026-08-211-17/+21
| | | | | | | | | | This allows specifying custom vdev paths (such as GPT labels like /dev/gpt/...) when creating ZFS filesystem images via makefs(8), rather than defaulting to /dev/null. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D59031
* makefs.8: Cleanup man pageJose Luis Duran2026-01-061-4/+5
| | | | | | Reviewed by: ziaee MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54538
* makefs/zfs: Allow the user to specify the pool GUIDMark Johnston2025-07-211-0/+6
| | | | | | | This will be used by the test suite to enable running makefs/zfs tests in parallel. MFC after: 1 month
* makefs/zfs: Make it possible to set a compression propertyMark Johnston2025-07-211-2/+8
| | | | | | | | | | | | | | | | | makefs currently does not implement compression for ZFS datasets, as doing so seems somewhat fraught with compatibility issues. As a result, the root dataset has compression disabled, and all others inherit from that. However, it may be useful to enable compression for new files once the generated pool is actually imported. Thus, implement a per-data compression option. By default, compression is inherited from the parent dataset and disabled on the root dataset. Add a regression test. PR: 288241 MFC after: 1 month
* makefs: Honor -T timestamps when creating images from mtree manifestsBojan Novković2025-05-201-2/+6
| | | | | | | | | | | | | | | | | | makefs backends rely on the fsnode structure to derive most of the information about the underlying filesystem objects. Depending on how the image is built, the fsnode structures are initialized in the walk_dir or read_mtree functions. However, read_mtree fails to take timestamps passed by -T into account, leading to nonreproducible images in backends that do not check for -T. Fix this and make -T backend-agnostic by adding an appropriate check in read_mtree_keywords while making sure that mtree entries can still override -T timestamps. PR: 285630 Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D49531
* makefs.8: Clarify that makefs-generated zpools always have the same GUIDMark Johnston2024-11-191-1/+18
| | | | | PR: 282832 MFC after: 1 week
* makefs.8: Remove a warning about makefs -t zfs being experimentalMark Johnston2024-11-191-3/+0
| | | | | | | This should have been done with commit d9fe71828797 but was missed. Fixes: d9fe71828797 ("makefs: Remove the warning printed when makefs -t zfs is used") MFC after: 3 days
* makefs: Record a larger TXG number in the uberblockMark Johnston2024-10-141-0/+3
| | | | | | | | | | | | | By default, OpenZFS will perform metadata verification of the most recent TXGs, but this can be very slow since all data in a pool generated by makefs was logically written in a single transaction. Avoid triggering this verification by default, but add an option to restore the previous behaviour and enable it in regression test cases. Reported by: cperciva Tested by: cperciva (previous version) MFC after: 2 weeks
* Explain the relationship between -p and -Z.Greg Lehey2024-09-261-1/+3
|
* makefs: Make it possible to silence warnings about duplicate pathsMark Johnston2024-01-201-1/+3
| | | | | | | | | | | | When generating a VM image from an installworld mtree manifest, makefs spits out several thousand warnings about duplicate paths in the manifest. These are harmless and have been around for a long time (see the phabricator revision for some more details), so let's at least have a way to make makefs quieter. Reviewed by: brooks, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43513
* makefs: Fix ZFS cross-reference sectionsJose Luis Duran2024-01-021-6/+6
| | | | | | MFC after: 1 week Fixes: 240afd8c1fcc ("makefs: Add ZFS support") Pull Request: https://github.com/freebsd/freebsd-src/pull/979
* Explain the -d option.Greg Lehey2023-09-261-1/+6
|
* makefs: remove ISO9660 Archimedes extension supportEd Maste2023-09-201-7/+2
| | | | | | | | | | We have no need to create ISO images with RISC OS specific metadata. Reviewed by: imp Relnotes: yes Obtained from: OpenBSD a435da44c07f Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39344
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* makefs: Add ZFS supportMark Johnston2022-08-051-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* makefs: sort cd9660 sysid entries in man pageEd Maste2022-05-181-2/+2
| | | | | "efi" was added at the end of the sysid list rather than in alpha order. Move it as a diff reduction against NetBSD.
* Allocate extra inodes in makefs when leaving free space in UFS images.Nathan Whitehorn2021-04-061-1/+4
| | | | | | | | | | | | | | By default, makefs(8) has very few spare inodes in its output images, which is fine for static filesystems, but not so great for VM images where many more files will be added. Make makefs(8) use the same default settings as newfs(8) when creating images with free space -- there isn't much point to leaving free space on the image if you can't put files there. If no free space is requested, use current behavior of a minimal number of available inodes. Reviewed by: manu MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D29492
* makefs: connect cd9660 El Torito EFI boot image system typeEd Maste2020-09-171-2/+3
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365847
* makefs.8: update historyEd Maste2019-08-201-1/+7
| | | | | | | | - ported to FreeBSD and first appeared in 8.0 - Christos Zoulas added the FAT support that I imported Notes: svn path=/head/; revision=351302
* makefs: add msdosfs (FAT) supportEd Maste2019-08-201-2/+71
| | | | | | | | | | | | | | | | | | | | | | Add FAT support to makefs by copying some files from sys/fs/msdosfs/ and updating others with changes from NetBSD. The six files copied from sys/fs/msdosfs at r348251 and modified are: denode.h direntry.h fat.h msdosfs_fat.c msdosfs_lookup.c msdosfsmount.h I would prefer to avoid the duplication, but reluctance to doing so was expressed in a previous review (D11197); for now copy the files and revisit in the future. Submitted by: Siva Mahadevan Discussed with: cem, imp MFC after: 1 month Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16438 Notes: svn path=/head/; revision=351273
* makefs.8: expand description of image sizeEd Maste2019-08-191-1/+12
| | | | | | | | Submitted by: ryan_freqlabs.com, Siva Mahadevan Differential Revision: https://reviews.freebsd.org/D21316 Notes: svn path=/head/; revision=351232
* makefs.8: style updates from igorEd Maste2019-08-191-6/+9
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=351230
* Synchronise with NetBSD's version of EFI handling for El Torito images.Benno Rice2018-03-311-1/+3
| | | | | | | | | | | | | | | When I implemented my EFI support I failed to check if the upstream version of makefs in NetBSD had done the same. Override my version with theirs to make it easier to stay in sync with them in the future. Reviewed by: imp, mav Obtained from: NetBSD MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D14913 Notes: svn path=/head/; revision=331843
* makefs: add -O (offset) optionEd Maste2017-05-261-1/+7
| | | | | | | | | | | | | | | | | | NetBSD revs: ffs.c 1.60 makefs.8 1.44 makefs.c 1.48 makefs.h 1.33 ffs/buf.c 1.20 ffs/mkfs.c 1.27 Obtained from: NetBSD Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10780 Notes: svn path=/head/; revision=318951
* makefs: Add soft-updates optionEmmanuel Vadot2017-05-181-1/+3
| | | | | | | | | | | | Add the ffs option to enable soft-updates. The option is only processed is ufs2 has been selected. Reviewed by: emaste, bapt (earlier version), allanjude (earlier version) Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D10773 Notes: svn path=/head/; revision=318452
* Point out that -F probably does not do what the user expects.Brooks Davis2017-04-061-1/+7
| | | | | | | | | | | | | | | Users attempting to create images from mtree METALOG files created by installworld often use -F when they should be passing the METALOG file in place of a directory. This is often produces difficult to debug error reports. Reviewed by: emaste MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10038 Notes: svn path=/head/; revision=316593
* makefs: sync NetBSD IDs with upstream for changes that we already haveEd Maste2016-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | May 22 21:51:39 2011 +0000 (christos): From Nathan Whitehorn (nwhitehorn at freebsd dot org): Add code to generate bootable ISOs on Powermac and CHRP systems. Synthesize some partition maps (APM and MBR, respectively) pointing to (a) the whole disk, and (b) relevant El Torito boot images that have been added by other code. These partition maps are a little bit funny looking, but they seem to work. FreeBSD has been using this successfully in their release generation on powerpc, as well as generating all non-SPARC install media. SPARC support could probably be added as an extension of this patch. makefs.8 1.33 Tue Aug 23 17:09:11 2011 +0000 (christos): PR/45285: Martin Matuska: makefs does not properly convert ISO level 1 and 2 filenames (buffer overflow) makefs does not properly verify the maximum filename length in the special "." case for both ISO level 1 and ISO level 2 filename conversion. This creates broken images or causes a buffer overflow (ISO level 2). ISO level 1: If a filename contains only dots or up to 8 characters followed by dots the 8+3 limit check doesn't work. ISO level 2: If a filename contains a dot in the first 30 characters and a dot on the 30th character, the length limit check doesn't work and the buffer is overflowed. $ mkdir level1 $ touch level1/12345............ $ makefs -t cd9660 -o isolevel=1 test.iso level1 $ mkdir level2 $ touch level2/1234567890.2345678901234567.....34567890123456789012345 $ makefs -t cd9660 -o isolevel=2 test.iso level2 cd9660.c 1.32 Sun Oct 9 21:33:43 2011 +0000 (christos): add support for setting the ufs label. (Nathan Whitehorn) ffs.c 1.45 ffs.h 1.2 mkfs.c 1.22 makefs.8 1.37 Obtained from: NetBSD Notes: svn path=/head/; revision=303038
* makefs: reorder 'usage' alphabeticallyEd Maste2016-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | From NetBSD, Mon Aug 15 14:45:01 2011 +0000 (wiz) Re-order `usage' alphabetically; rename option arguments in the manpage's `SYNOPSIS' section to match those from `usage' (not the other way around; the `usage'-line (and other parts of makefs.c) contain the correct names); minor punctuation improvements. From Snader_LB. makefs.8 1.36 makefs.c 1.30 Obtained from: NetBSD Notes: svn path=/head/; revision=303036
* makefs: Provide a -T option to set timestamps to a consistent valueEd Maste2016-06-141-1/+14
| | | | | | | | | | | | | | | This is taken from the NetBSD versions listed below and adapted to the makefs version in FreeBSD, along with a bug fix from cem@ that will be sent to NetBSD. Reviewed by: pfg Approved by: re (gjb) Obtained from: NetBSD MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D6835 Notes: svn path=/head/; revision=301879
* Bump .DdEnji Cooper2015-11-091-1/+1
| | | | Notes: svn path=/head/; revision=290602
* Follow up to r290259 dealing with makefs(8)Enji Cooper2015-11-091-3/+2
| | | | | | | | | | | | | | - Don't use contractions (don't -> do not) - Change "throw away" to "discard" when describing the -o keep-bad-images option - Revert author e-mail split I brought over from NetBSD, effectively reverting the change bapt made in r267668 MFC after: 3 days Submitted by: bjk Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290601
* Fix spelling of `isolevel` cd9660 optionEnji Cooper2015-11-021-1/+1
| | | | | | | | | MFC after: 1 week X-MFC with: r290260 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290262
* Bump .Dd for r290259 and r290260Enji Cooper2015-11-021-1/+1
| | | | Notes: svn path=/head/; revision=290261
* Document undocumented long options for -t cd9660Enji Cooper2015-11-021-6/+20
| | | | | | | | | | | | | Note which options have been implemented and which options haven't been implemented Submitted as the following NetBSD PRs: bin/50390 and bin/50392 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290260
* Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53Enji Cooper2015-11-021-18/+21
| | | | | | | | | | | | Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and options have been omitted. MFC after: 1 week Obtained from: NetBSD Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290259
* Follow up to roundup feature addition in r289203Enji Cooper2015-10-301-5/+10
| | | | | | | | | | | | | | | | | | | - Rename -r to -R to avoid the clash with makefs -r in NetBSD - Note that -R is an FFS-specific option because it's not implemented in cd9660 today - Rename the roundup variable to "roundup-size" in the manpage and help text for consistency with other variables. - Bump .Dd (missed in r289203) PR: 203707 MFC after: 1 week X-MFC with: r289203 Differential Revision: https://reviews.freebsd.org/D3959 Reviewed by: adrian (earlier patch), emaste Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290180
* Revert r289694Enji Cooper2015-10-211-12/+4
| | | | | | | I committed some other undesirable local changes by accident Notes: svn path=/head/; revision=289695
* Add some rudimentary [smoke] testcases for makefsEnji Cooper2015-10-211-4/+12
| | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289694
* makefs: introduce a new option to specify what to round the resultingAdrian Chadd2015-10-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image up to. From ticket: While trying to run FreeBSD/mips on some device having very small flash media, one is forced to compress file system with mkulzma(8) utility. It is desirable to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8) and big compression block size like 65535 bytes to mkulzma at the same time. Then one obtains very good comression ratios (like 75% and more) but faces the following problem. geom_uncompress kernel module reports GEOM provider size rounded up to its compression block size. Generally, this changes original media size and now it fails to match the size of embedded UFS file system that leads to other problems, f.e. geom_label kernel module does not like this and skips the file system while tasting the GEOM and looking for UFS label. This makes it impossible to refer to the file system using known UFS label instead of something like /dev/map/rootfs.uncompress. The following patch introduces new command line option "-r roundup" for makefs that makes it round up the image to specified block size. Hence, geom_uncompress does not change GEOM media size for images rounded that way and geom_label accepts such GEOMs just fine. With the patch applied, one can use following commands: $ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs $ mkulzma -s 65536 -o fs.img.ulzma fs.img PR: bin/203707 Submitted by: <eugen@grosbein.net> Notes: svn path=/head/; revision=289203
* use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-201-6/+5
| | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668
* Mark the makefs(8) '-p' flag as deprecated in preference forGlen Barber2013-08-161-3/+8
| | | | | | | | | | the '-Z' flag for compatibility with NetBSD. Submitted by: Eric van Gyzen (via stable@) MFC after: 3 days Notes: svn path=/head/; revision=254397
* Remove contractions.Joel Dahl2013-04-111-1/+1
| | | | Notes: svn path=/head/; revision=249373
* Add a -D flag that causes duplicate entries in an mtree manifest to beBrooks Davis2013-02-201-1/+3
| | | | | | | | | | treated as warnings rather than errors. Reviewed by: marcel Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=247041
* Remove trailing whitespace.Joel Dahl2012-08-311-1/+1
| | | | Notes: svn path=/head/; revision=239952
* Sort options.Hiroki Sato2012-08-221-2/+1
| | | | Notes: svn path=/head/; revision=239574
* Add -p flag to create the image as a sparse file.Hiroki Sato2012-08-221-1/+4
| | | | | | | | Submitted by: Shesha Sreenivasamurthy PR: bin/167779 Notes: svn path=/head/; revision=239562
* Allow contents of multiple directories to be merged to the current image.Jung-uk Kim2012-01-311-1/+11
| | | | | | | | | | | Note this patch was submitted to NetBSD and they already adopted it. http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html MFC after: 1 week Notes: svn path=/head/; revision=230795
* - remove device keyword from makefs manpageEitan Adler2011-10-171-2/+1
| | | | | | | | | | | PR: docs/144408 Submitted by: gcooper Approved by: gjb Approved by: sahil (mentor) MFC after: 1 week Notes: svn path=/head/; revision=226482
* Add support to makefs(8) to add UFS labels to images.Nathan Whitehorn2011-10-091-0/+2
| | | | | | | | Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226169
* Add support for using mtree(5) manifest files to define the imageMarcel Moolenaar2011-06-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | to be created. The support is based on mtree version 2.0, as used in libarchive, but adds new features on top of it. The current implementation is fully functional, but is envisioned to grow at least the following additional features over time: o Add support for the /include special command so that manifest files can be constructed using includable fragments. o Add support specifying a search path to locate content files. o Content file filters: commands that provide file contents on stdout. The manifest file eliminates the need to first construct a tree as root in order to create an image and allows images (releases) to be created directly from object trees and/or source trees. Reviewed by: deo Sponsored by: Juniper Networks, Inc Notes: svn path=/head/; revision=223306