minix/sbin/newfs_udf/newfs_udf.8
Jean-Baptiste Boric 9f988b7934 Import makefs from NetBSD
Change-Id: I0ebcc9d0168df9d26cfb0af0fce2bc894ce688af
2015-10-07 12:39:44 +02:00

192 lines
5.2 KiB
Groff

.\" $NetBSD: newfs_udf.8,v 1.18 2013/08/06 12:15:20 wiz Exp $
.\"
.\" Copyright (c) 2008 Reinoud Zandijk
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in
.\" the documentation and/or other materials provided with the
.\" distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
.Dd August 2, 2013
.Dt NEWFS_UDF 8
.Os
.Sh NAME
.Nm newfs_udf
.Nd construct a new UDF file system
.Sh SYNOPSIS
.Nm
.Op Fl cFM
.Op Fl B Ar blockingsize
.Op Fl L Ar loglabel
.Op Fl P Ar discid
.Op Fl p Ar percentage
.Op Fl S Ar sectorsize
.Op Fl s Ar size
.Op Fl t Ar gmtoff
.Op Fl V Ar max_udf
.Op Fl v Ar min_udf
.Ar special
.Sh DESCRIPTION
The
.Nm
utility creates an UDF file system on device
.Ar special
suitable for the media currently inserted.
.Pp
The options are as follow:
.Bl -tag -width indent
.It Fl B Ar blockingsize
When creating image files, specify the blocking size or packetsize of the media
to
.Ar blockingsize .
.It Fl c
Perform a crude surface check first to weed out disc faults on rewritable
media.
.It Fl F
Force file system construction on non-empty recordable media or create an
image file.
.It Fl L Ar loglabel
Set the disc logical label to the specified
.Ar loglabel .
.It Fl M
Disable metadata partition creation when selected UDF version or media dictates
this.
For strict conformance and interchange, don't disable this unless
its causing problems.
.It Fl P Ar discid
Set the physical disc label to the specified
.Ar discid .
.Pp
Prepend
.Ar discid
with volsetname separated with a ':' if wanted.
For strict conformance and interchange, don't set this manually unless it has
a unique hex number in the first 8 character positions.
.It Fl p Ar percentage
Percentage of partition to be initially reserved for metadata on the Metadata
partition.
It defaults to 20 %.
.It Fl S Ar sectorsize
Set the sectorsize for image files.
For strict conformance and interchange, don't set this manually.
.It Fl s Ar size
For image files, set the file size to the humanized size
.Ar size .
.It Fl t Ar gmtoff
Use the specified
.Ar gmtoff
as gmt time offset for recording times on the disc.
.It Fl V Ar max_udf
Select
.Ar max_udf
as the maximum UDF version to be supported.
For UDF version 2.50, use
.Dq 0x250
or
.Dq 2.50 .
.It Fl v Ar min_udf
Select
.Ar min_udf
as the minimum UDF version to be supported.
For UDF version 2.01, use
.Dq 0x201
or
.Dq 2.01 .
.El
.Sh NOTES
The UDF file system is defined for the entire optical medium.
It can only function on the entire CD/DVD/BD so the raw partition
has to be specified for read/write actions.
For
.Nm
this means specifying the raw device with the raw partition, i.e.
.Pa /dev/rcd0d
or
.Pa /dev/rcd0c .
.Pp
Some rewritable optical media needs to be formatted first before it can be
used by UDF.
This can be done using
.Xr mmcformat 8 .
.Pp
The default UDF version is version 2.01.
.Sh EXAMPLES
Create a file system, using the specified names on the device
.Pa /dev/rcd0d
with the default UDF version :
.Bd -literal -offset indent
newfs_udf -P "Encyclopedia:copy-nr-1" -L "volume 2" /dev/rcd0d
.Ed
.Pp
Create a 4.8 GiB sparse file and configure it using
.Xr vnconfig 8
to be a 2048 sector size disc and create a new UDF file system on
.Pa /dev/rvnd0d
:
.Bd -literal -offset indent
dd if=/dev/zero of=bigdisk.2048.udf seek=9999999 count=1
vnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1
newfs_udf -L bigdisk /dev/rvnd0d
.Ed
.Pp
Create a 2 GiB file and create a new UDF file system on it using the default
512 byte sector size :
.Bd -literal -offset indent
newfs_udf -L bigdisk2 -F -s 2G bigdisk2.iso
.Ed
.Pp
Create a 200 MiB file and create a new UDF file system on it using a sector size
of 2048 :
.Bd -literal -offset indent
newfs_udf -L bigdisk2 -F -s 200M -S 2048 bigdisk3.iso
.Ed
.Pp
Create a new UDF file system on the inserted USB stick using its
native sectorsize of 512 :
.Bd -literal -offset indent
newfs_udf -L "My USB stick" /dev/rsd0d
.Ed
.Sh SEE ALSO
.Xr disktab 5 ,
.Xr disklabel 8 ,
.Xr mmcformat 8 ,
.Xr newfs 8
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 5.0 .
.Sh AUTHORS
.An Reinoud Zandijk Aq Mt reinoud@NetBSD.org
.Sh BUGS
The
.Ar P
and the
.Ar S
arguments have changed meaning.
The meaning of
.Ar S
has been merged into
.Ar P
since
.Nx 6.1 .