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