Commit graph

26 commits

Author SHA1 Message Date
Eugene Grosbein 7f0dc6e2cd mkimg(1): process non-seekable output gracefully
mkimg may make severe load only to fail in the end
if output is non-seekable pipe, socket or FIFO
unless output format is raw disk image.

Check it out and fail early. Make it clear in the manual.

MFC after:	1 week
2024-03-12 23:00:21 +07:00
Eugene Grosbein d1797fb5bb mkimg.1: add new PARTITION SPECIFICATION section
The specification follows a commentary to the function parse_part()
in the source code and the code itself.

MFC after:	3 days
2024-02-28 02:56:26 +07:00
Yu-Hsun Chen 1a35ead682
mkimg(1): Fix typo
This is from the Advanced UNIX Programming Course (Fall’23) at NTHU.

MFC after:	3 days
Pull Request:	https://github.com/freebsd/freebsd-src/pull/930
2023-12-17 18:49:28 +08:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Gordon Bergling 3d265fce43 Fix a few mandoc issues
- skipping paragraph macro: Pp after Sh
- sections out of conventional order: Sh EXAMPLES
- whitespace at end of input line
- normalizing date format
2020-10-09 19:12:44 +00:00
Mateusz Piotrowski 19870105e1 Use Fl instead of Ar for long flags
Also, bump date after r361935.

MFC after:	1 week
2020-06-08 21:11:34 +00:00
Oleksandr Tymoshenko c78cd98b8a Add VHDX support to mkimg(1)
VHDX is the successor of Microsoft's VHD file format. It increases
maximum capacity of the virtual drive to 64TB and introduces features
to better handle power/system failures.

VHDX is the required format for 2nd generation Hyper-V VMs.

Reviewed by:	marcel
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25184
2020-06-08 20:28:32 +00:00
Emmanuel Vadot 2dcfca637d mkimg: Add -C argument to specify maximum capacity
Add a -C option to specify a maximum capacity for the final image file.
It is useful to control the size of the generated image for sdcard or
when we will add dynamic size partition.

Add --capacity which is a shorthand to define min and max capacity at
the same time.

Reviewed by:	bapt, marcel, wblock (manpages)
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D10509
2017-05-10 09:36:34 +00:00
Baptiste Daroussin 0e630e32be Add missing section in manpage reference
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:41:38 +00:00
Warner Losh c30dcf40ba Add a new flag to mkimg (-a num) to specify the active partition for
those partitioning schemes that have this concept. Implement it as an
override for mbr's setting 0x80 in the flags for the first partition
when we have boot code.

Differential Revision: https://reviews.freebsd.org/D4403
2016-10-18 05:43:12 +00:00
Alan Somers 005156d7b3 Update mkimg(1) author's contact info
Reviewed by:	marcel, imp
MFC after:	3 days
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D7991
2016-09-21 18:42:17 +00:00
Eitan Adler 463a577b27 Fix a ton of speelling errors
arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Christian Brueffer 99d43aee11 Fix a few mandoc warnings.
MFC after:	1 week
2015-08-12 10:34:05 +00:00
Marcel Moolenaar 8f1d6b6915 Fix typo introduced in previous commit.
Pointed out by: Nikolai Lifanov <lifanov at mail.lifanov.com>
2015-08-07 18:40:44 +00:00
Marcel Moolenaar de93252622 o Fix a typo.
o  Describe the file formats mkimg can create.
2015-08-07 17:22:37 +00:00
Marcel Moolenaar e6679c1a71 Add the -c option for specifying the capacity of the disk image. When
a capcity is given, no partitions are required. When no partitions are
given, no scheme needs to be specified either. This makes it possible
to create an entirely empty disk image. To add an empty partitioning
table, specify the scheme.

Bump the version to 20150222.
2015-02-22 04:50:47 +00:00
Edward Tomasz Napierala 65dd075b31 Add missing commas to .Xr.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2014-11-14 08:58:06 +00:00
Marcel Moolenaar fb2f6c6c66 Update the usage message and the man page to account for the new long
options. Bump the version number to 20140927.
While here, use explicit fputc() calls to skip a line in the output.
This to avoid having to hunt for extra '\n' characters in the printf
format strings.

MFC after:	1 week
Relnotes:	yes
2014-09-27 17:58:03 +00:00
Marcel Moolenaar 752bf46955 Add support for adding empty partition entries. I.e. skip partition
numbers or names. This gives more control over the actual layout and
helps to construct BSD disklabels with /usr or /var at dedicated
partitions.

Obtained from:	Juniper Networks, Inc.
MFC after:	3 days
Relnotes:	yes
2014-09-12 20:05:08 +00:00
Marcel Moolenaar 264f86e1ad Document the -y option as a unit test option.
Add missing -v (and -y) to the usage message.

Requested by: eadler@
2014-07-04 18:47:25 +00:00
Marcel Moolenaar 91e9fb22ea Add a ful stop after FreeBSD's version in the history section.
Pointed out by: brueffer@ (thanks!)
2014-07-02 14:34:01 +00:00
Marcel Moolenaar 73f28b23c4 Prepare for merging to stable/10: update the history section. 2014-07-02 04:06:06 +00:00
Joel Dahl b6829dc82a Minor mdoc improvements. 2014-06-06 19:00:43 +00:00
Marcel Moolenaar aa30ba04c3 Create our temporary file in $TMPDIR, if the environment variable
is set. /tmp otherwise.

Submitted by:   Dan McGregor <danismostlikely@gmail.com>
2014-05-22 20:24:30 +00:00
Marcel Moolenaar f0e9dced5c MFuser/marcel/mkimg:
Add support for different output formats:
1.  The output file that was previously written is now called the raw format.
2.  Add the vmdk output format to create VMDK images.

When the format is not given, the raw output format is assumed.
2014-05-15 19:19:57 +00:00
Marcel Moolenaar a5eb4ea3ee Add mkimg, a utility for making disk images from raw partition contents.
The partitioning scheme can be one of the schemes supported by gpart.

Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2014-03-29 19:03:10 +00:00