xref: /netbsd-src/sbin/newfs_udf/newfs_udf.8 (revision 213144e1de7024d4193d04aa51005ba3a5ad95e7)
1.\" $NetBSD: newfs_udf.8,v 1.7 2009/12/23 09:18:48 mbalmer 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 December 23, 2009
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 L Ar loglabel
39.Op Fl P Ar discid
40.Op Fl S Ar setlabel
41.Op Fl s Ar size
42.Op Fl p Ar percentage
43.Op Fl t Ar gmtoff
44.Op Fl V Ar max_udf
45.Op Fl v Ar min_udf
46.Ar special
47.Sh DESCRIPTION
48The
49.Nm
50utility creates an UDF file system on device
51.Ar special
52suitable for the media currently inserted.
53.Pp
54The options are as follow:
55.Bl -tag -width indent
56.It Fl c
57Perform a crude surface check first to weed out disc faults on rewritable
58media.
59.It Fl F
60Force file system construction on non-empty recordable media.
61.It Fl L Ar loglabel
62Set the disc logical label to the specified
63.Ar loglabel .
64.It Fl P Ar discid
65Set the phyisical disc label to the specified
66.Ar discid .
67For strict conformance and interchange, don't set this manually.
68.It Fl S Ar setlabel
69Set the disc set label to the specified
70.Ar setlabel .
71For strict conformance and interchange, don't set this manually.
72.It Fl M
73Disable metadata partition creation when selected UDF version or media dictates
74this. For strict conformance and interchange, don't disable this unless its
75causing problems.
76.It Fl s Ar size
77Ignored for now.
78.It Fl p Ar percentage
79Percentage of partition to be initially reserved for metadata on the Metadata
80partition. It defaults to 20 %.
81.It Fl t Ar gmtoff
82Use the specified
83.Ar gmtoff
84as gmt time offset for recording times on the disc.
85.It Fl V Ar max_udf
86Select
87.Ar max_udf
88as the maximum UDF version to be supported.
89For UDF version 2.50, use
90.Dq 0x250
91or
92.Dq 2.50 .
93.It Fl v Ar min_udf
94Select
95.Ar min_udf
96as the minimum UDF version to be supported.
97For UDF version 2.01, use
98.Dq 0x201
99or
100.Dq 2.01 .
101.El
102.Sh NOTES
103The UDF file system is defined for the entire optical medium.
104It can only function on the entire CD/DVD/BD so the raw partition
105has to be specified for read/write actions.
106For
107.Nm
108this means specifying the raw device with the raw partition, i.e.
109.Pa /dev/rcd0d
110or
111.Pa /dev/rcd0c .
112.Pp
113Some rewritable optical media needs to be formatted first before it can be
114used by UDF.
115This can be done using
116.Xr mmcformat 8 .
117.Pp
118The default UDF version is version 2.01.
119.Sh EXAMPLES
120.Bd -literal -offset indent
121newfs_udf -S "Encyclopedia" -L "volume 2" -P "copy-nr-1" /dev/rcd0d
122.Ed
123.Pp
124Create a file system, using the specified names on the device
125.Pa /dev/rcd0d
126with the default UDF version.
127.Pp
128.Bd -literal -offset indent
129dd if=/dev/zero of=bigdisk.2048.udf seek=9999999 count=1
130vnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1
131newfs_udf -L bigdisk /dev/rvnd0d
132.Ed
133.Pp
134Create a 4.8 GiB sparse file and configure it using
135.Xr vnconfig 8
136to be a 2048 sector size disc and create a new UDF file system on
137.Pa /dev/rvnd0d .
138.Bd -literal -offset indent
139newfs_udf -L "My USB stick" /dev/rsd0d
140.Ed
141.Pp
142Create a new UDF file system on the inserted USB stick using its
143.Dq native
144sectorsize of 512.
145.Sh SEE ALSO
146.Xr disktab 5 ,
147.Xr disklabel 8 ,
148.Xr mmcformat 8 ,
149.Xr newfs 8
150.Sh HISTORY
151The
152.Nm
153command first appeared in
154.Nx 5.0 .
155.Sh AUTHORS
156.An Reinoud Zandijk Aq reinoud@NetBSD.org
157