xref: /netbsd-src/sbin/newfs_udf/newfs_udf.8 (revision 5d1c7f9125c38adbd024ba054c0eb3f6f296e6e9)
1*5d1c7f91Swiz.\" $NetBSD: newfs_udf.8,v 1.18 2013/08/06 12:15:20 wiz Exp $
2e979c658Sreinoud.\"
3e979c658Sreinoud.\" Copyright (c) 2008 Reinoud Zandijk
4e979c658Sreinoud.\" All rights reserved.
5e979c658Sreinoud.\"
6e979c658Sreinoud.\" Redistribution and use in source and binary forms, with or without
7e979c658Sreinoud.\" modification, are permitted provided that the following conditions
8e979c658Sreinoud.\" are met:
9e979c658Sreinoud.\" 1. Redistributions of source code must retain the above copyright
10e979c658Sreinoud.\"    notice, this list of conditions and the following disclaimer.
11e979c658Sreinoud.\" 2. Redistributions in binary form must reproduce the above copyright
12e979c658Sreinoud.\"    notice, this list of conditions and the following disclaimer in
13e979c658Sreinoud.\"    the documentation and/or other materials provided with the
14e979c658Sreinoud.\"    distribution.
15e979c658Sreinoud.\"
16e979c658Sreinoud.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
17e979c658Sreinoud.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18e979c658Sreinoud.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19e979c658Sreinoud.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY
20e979c658Sreinoud.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21e979c658Sreinoud.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
22e979c658Sreinoud.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23e979c658Sreinoud.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24e979c658Sreinoud.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25e979c658Sreinoud.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26e979c658Sreinoud.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27e979c658Sreinoud.\"
28e979c658Sreinoud.\"
291b036985Sreinoud.Dd August 2, 2013
30e979c658Sreinoud.Dt NEWFS_UDF 8
31e979c658Sreinoud.Os
32e979c658Sreinoud.Sh NAME
33e979c658Sreinoud.Nm newfs_udf
34e979c658Sreinoud.Nd construct a new UDF file system
35e979c658Sreinoud.Sh SYNOPSIS
36e979c658Sreinoud.Nm
37d23e9308Swiz.Op Fl cFM
3843ccd8ccSwiz.Op Fl B Ar blockingsize
39e979c658Sreinoud.Op Fl L Ar loglabel
40e979c658Sreinoud.Op Fl P Ar discid
411f03b589Swiz.Op Fl p Ar percentage
42c7950296Sreinoud.Op Fl S Ar sectorsize
43d23e9308Swiz.Op Fl s Ar size
44e979c658Sreinoud.Op Fl t Ar gmtoff
45d23e9308Swiz.Op Fl V Ar max_udf
46d23e9308Swiz.Op Fl v Ar min_udf
47e979c658Sreinoud.Ar special
48e979c658Sreinoud.Sh DESCRIPTION
49e979c658SreinoudThe
50e979c658Sreinoud.Nm
51e979c658Sreinoudutility creates an UDF file system on device
52e979c658Sreinoud.Ar special
53e979c658Sreinoudsuitable for the media currently inserted.
54e979c658Sreinoud.Pp
55e979c658SreinoudThe options are as follow:
56e979c658Sreinoud.Bl -tag -width indent
5743ccd8ccSwiz.It Fl B Ar blockingsize
5843ccd8ccSwizWhen creating image files, specify the blocking size or packetsize of the media
5943ccd8ccSwizto
6043ccd8ccSwiz.Ar blockingsize .
61e979c658Sreinoud.It Fl c
62e979c658SreinoudPerform a crude surface check first to weed out disc faults on rewritable
63e979c658Sreinoudmedia.
64e979c658Sreinoud.It Fl F
65c7950296SreinoudForce file system construction on non-empty recordable media or create an
66c7950296Sreinoudimage file.
67e979c658Sreinoud.It Fl L Ar loglabel
68e979c658SreinoudSet the disc logical label to the specified
69e979c658Sreinoud.Ar loglabel .
701f03b589Swiz.It Fl M
711f03b589SwizDisable metadata partition creation when selected UDF version or media dictates
721f03b589Swizthis.
731f03b589SwizFor strict conformance and interchange, don't disable this unless
741f03b589Swizits causing problems.
75e979c658Sreinoud.It Fl P Ar discid
761f03b589SwizSet the physical disc label to the specified
77e979c658Sreinoud.Ar discid .
7867b0bef8Sreinoud.Pp
79c7950296SreinoudPrepend
80c7950296Sreinoud.Ar discid
81c7950296Sreinoudwith volsetname separated with a ':' if wanted.
8267b0bef8SreinoudFor strict conformance and interchange, don't set this manually unless it has
83*5d1c7f91Swiza unique hex number in the first 8 character positions.
841f03b589Swiz.It Fl p Ar percentage
851f03b589SwizPercentage of partition to be initially reserved for metadata on the Metadata
861f03b589Swizpartition.
871f03b589SwizIt defaults to 20 %.
88c7950296Sreinoud.It Fl S Ar sectorsize
89c7950296SreinoudSet the sectorsize for image files.
90d23e9308SwizFor strict conformance and interchange, don't set this manually.
91d23e9308Swiz.It Fl s Ar size
92c7950296SreinoudFor image files, set the file size to the humanized size
93c7950296Sreinoud.Ar size .
94e979c658Sreinoud.It Fl t Ar gmtoff
95e979c658SreinoudUse the specified
96e979c658Sreinoud.Ar gmtoff
97e979c658Sreinoudas gmt time offset for recording times on the disc.
98d23e9308Swiz.It Fl V Ar max_udf
99d23e9308SwizSelect
100d23e9308Swiz.Ar max_udf
101d23e9308Swizas the maximum UDF version to be supported.
102d23e9308SwizFor UDF version 2.50, use
103d23e9308Swiz.Dq 0x250
104d23e9308Swizor
105d23e9308Swiz.Dq 2.50 .
106d23e9308Swiz.It Fl v Ar min_udf
107d23e9308SwizSelect
108d23e9308Swiz.Ar min_udf
109d23e9308Swizas the minimum UDF version to be supported.
110d23e9308SwizFor UDF version 2.01, use
111d23e9308Swiz.Dq 0x201
112d23e9308Swizor
113d23e9308Swiz.Dq 2.01 .
114e979c658Sreinoud.El
115e979c658Sreinoud.Sh NOTES
116d23e9308SwizThe UDF file system is defined for the entire optical medium.
117d23e9308SwizIt can only function on the entire CD/DVD/BD so the raw partition
118d23e9308Swizhas to be specified for read/write actions.
119d23e9308SwizFor
120e979c658Sreinoud.Nm
121d23e9308Swizthis means specifying the raw device with the raw partition, i.e.
122e979c658Sreinoud.Pa /dev/rcd0d
123e979c658Sreinoudor
124e979c658Sreinoud.Pa /dev/rcd0c .
125e979c658Sreinoud.Pp
126e979c658SreinoudSome rewritable optical media needs to be formatted first before it can be
127d23e9308Swizused by UDF.
128d23e9308SwizThis can be done using
129e979c658Sreinoud.Xr mmcformat 8 .
130e979c658Sreinoud.Pp
131d23e9308SwizThe default UDF version is version 2.01.
132e979c658Sreinoud.Sh EXAMPLES
133052045adSreinoudCreate a file system, using the specified names on the device
134052045adSreinoud.Pa /dev/rcd0d
135052045adSreinoudwith the default UDF version :
136e979c658Sreinoud.Bd -literal -offset indent
137c7950296Sreinoudnewfs_udf -P "Encyclopedia:copy-nr-1" -L "volume 2" /dev/rcd0d
138e979c658Sreinoud.Ed
139e979c658Sreinoud.Pp
140052045adSreinoudCreate a 4.8 GiB sparse file and configure it using
141052045adSreinoud.Xr vnconfig 8
142052045adSreinoudto be a 2048 sector size disc and create a new UDF file system on
143052045adSreinoud.Pa /dev/rvnd0d
144052045adSreinoud:
145e979c658Sreinoud.Bd -literal -offset indent
146e979c658Sreinouddd if=/dev/zero of=bigdisk.2048.udf seek=9999999 count=1
147e979c658Sreinoudvnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1
148e979c658Sreinoudnewfs_udf -L bigdisk /dev/rvnd0d
149e979c658Sreinoud.Ed
150e979c658Sreinoud.Pp
151c7950296SreinoudCreate a 2 GiB file and create a new UDF file system on it using the default
152c7950296Sreinoud512 byte sector size :
153c7950296Sreinoud.Bd -literal -offset indent
154c7950296Sreinoudnewfs_udf -L bigdisk2 -F -s 2G bigdisk2.iso
155c7950296Sreinoud.Ed
156c7950296Sreinoud.Pp
157c7950296SreinoudCreate a 200 MiB file and create a new UDF file system on it using a sector size
158c7950296Sreinoudof 2048 :
159c7950296Sreinoud.Bd -literal -offset indent
160c7950296Sreinoudnewfs_udf -L bigdisk2 -F -s 200M -S 2048 bigdisk3.iso
161c7950296Sreinoud.Ed
162c7950296Sreinoud.Pp
163052045adSreinoudCreate a new UDF file system on the inserted USB stick using its
164c7950296Sreinoudnative sectorsize of 512 :
165e979c658Sreinoud.Bd -literal -offset indent
166e979c658Sreinoudnewfs_udf -L "My USB stick" /dev/rsd0d
167e979c658Sreinoud.Ed
168933037aaSreinoud.Sh SEE ALSO
169933037aaSreinoud.Xr disktab 5 ,
170933037aaSreinoud.Xr disklabel 8 ,
171933037aaSreinoud.Xr mmcformat 8 ,
172933037aaSreinoud.Xr newfs 8
173933037aaSreinoud.Sh HISTORY
174933037aaSreinoudThe
175933037aaSreinoud.Nm
176933037aaSreinoudcommand first appeared in
177933037aaSreinoud.Nx 5.0 .
178933037aaSreinoud.Sh AUTHORS
179933037aaSreinoud.An Reinoud Zandijk Aq Mt reinoud@NetBSD.org
180b3717818Swiz.Sh BUGS
181b3717818SwizThe
182b3717818Swiz.Ar P
183b3717818Swizand the
184b3717818Swiz.Ar S
185b3717818Swizarguments have changed meaning.
186b3717818SwizThe meaning of
187b3717818Swiz.Ar S
188b3717818Swizhas been merged into
189b3717818Swiz.Ar P
190b3717818Swizsince
191b3717818Swiz.Nx 6.1 .
192