xref: /minix/sbin/newfs_udf/newfs_udf.8 (revision 9f988b79)
1.\" $NetBSD: newfs_udf.8,v 1.18 2013/08/06 12:15:20 wiz Exp $
2.\"
3.\" Copyright (c) 2008 Reinoud Zandijk
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in
13.\"    the documentation and/or other materials provided with the
14.\"    distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
17.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
20.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27.\"
28.\"
29.Dd August 2, 2013
30.Dt NEWFS_UDF 8
31.Os
32.Sh NAME
33.Nm newfs_udf
34.Nd construct a new UDF file system
35.Sh SYNOPSIS
36.Nm
37.Op Fl cFM
38.Op Fl B Ar blockingsize
39.Op Fl L Ar loglabel
40.Op Fl P Ar discid
41.Op Fl p Ar percentage
42.Op Fl S Ar sectorsize
43.Op Fl s Ar size
44.Op Fl t Ar gmtoff
45.Op Fl V Ar max_udf
46.Op Fl v Ar min_udf
47.Ar special
48.Sh DESCRIPTION
49The
50.Nm
51utility creates an UDF file system on device
52.Ar special
53suitable for the media currently inserted.
54.Pp
55The options are as follow:
56.Bl -tag -width indent
57.It Fl B Ar blockingsize
58When creating image files, specify the blocking size or packetsize of the media
59to
60.Ar blockingsize .
61.It Fl c
62Perform a crude surface check first to weed out disc faults on rewritable
63media.
64.It Fl F
65Force file system construction on non-empty recordable media or create an
66image file.
67.It Fl L Ar loglabel
68Set the disc logical label to the specified
69.Ar loglabel .
70.It Fl M
71Disable metadata partition creation when selected UDF version or media dictates
72this.
73For strict conformance and interchange, don't disable this unless
74its causing problems.
75.It Fl P Ar discid
76Set the physical disc label to the specified
77.Ar discid .
78.Pp
79Prepend
80.Ar discid
81with volsetname separated with a ':' if wanted.
82For strict conformance and interchange, don't set this manually unless it has
83a unique hex number in the first 8 character positions.
84.It Fl p Ar percentage
85Percentage of partition to be initially reserved for metadata on the Metadata
86partition.
87It defaults to 20 %.
88.It Fl S Ar sectorsize
89Set the sectorsize for image files.
90For strict conformance and interchange, don't set this manually.
91.It Fl s Ar size
92For image files, set the file size to the humanized size
93.Ar size .
94.It Fl t Ar gmtoff
95Use the specified
96.Ar gmtoff
97as gmt time offset for recording times on the disc.
98.It Fl V Ar max_udf
99Select
100.Ar max_udf
101as the maximum UDF version to be supported.
102For UDF version 2.50, use
103.Dq 0x250
104or
105.Dq 2.50 .
106.It Fl v Ar min_udf
107Select
108.Ar min_udf
109as the minimum UDF version to be supported.
110For UDF version 2.01, use
111.Dq 0x201
112or
113.Dq 2.01 .
114.El
115.Sh NOTES
116The UDF file system is defined for the entire optical medium.
117It can only function on the entire CD/DVD/BD so the raw partition
118has to be specified for read/write actions.
119For
120.Nm
121this means specifying the raw device with the raw partition, i.e.
122.Pa /dev/rcd0d
123or
124.Pa /dev/rcd0c .
125.Pp
126Some rewritable optical media needs to be formatted first before it can be
127used by UDF.
128This can be done using
129.Xr mmcformat 8 .
130.Pp
131The default UDF version is version 2.01.
132.Sh EXAMPLES
133Create a file system, using the specified names on the device
134.Pa /dev/rcd0d
135with the default UDF version :
136.Bd -literal -offset indent
137newfs_udf -P "Encyclopedia:copy-nr-1" -L "volume 2" /dev/rcd0d
138.Ed
139.Pp
140Create a 4.8 GiB sparse file and configure it using
141.Xr vnconfig 8
142to be a 2048 sector size disc and create a new UDF file system on
143.Pa /dev/rvnd0d
144:
145.Bd -literal -offset indent
146dd if=/dev/zero of=bigdisk.2048.udf seek=9999999 count=1
147vnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1
148newfs_udf -L bigdisk /dev/rvnd0d
149.Ed
150.Pp
151Create a 2 GiB file and create a new UDF file system on it using the default
152512 byte sector size :
153.Bd -literal -offset indent
154newfs_udf -L bigdisk2 -F -s 2G bigdisk2.iso
155.Ed
156.Pp
157Create a 200 MiB file and create a new UDF file system on it using a sector size
158of 2048 :
159.Bd -literal -offset indent
160newfs_udf -L bigdisk2 -F -s 200M -S 2048 bigdisk3.iso
161.Ed
162.Pp
163Create a new UDF file system on the inserted USB stick using its
164native sectorsize of 512 :
165.Bd -literal -offset indent
166newfs_udf -L "My USB stick" /dev/rsd0d
167.Ed
168.Sh SEE ALSO
169.Xr disktab 5 ,
170.Xr disklabel 8 ,
171.Xr mmcformat 8 ,
172.Xr newfs 8
173.Sh HISTORY
174The
175.Nm
176command first appeared in
177.Nx 5.0 .
178.Sh AUTHORS
179.An Reinoud Zandijk Aq Mt reinoud@NetBSD.org
180.Sh BUGS
181The
182.Ar P
183and the
184.Ar S
185arguments have changed meaning.
186The meaning of
187.Ar S
188has been merged into
189.Ar P
190since
191.Nx 6.1 .
192