1MKUDFFS(8)                  System Manager's Manual                 MKUDFFS(8)
2
3
4

NAME

6       mkudffs — create a UDF filesystem
7
8

SYNOPSIS

10       mkudffs [ options ] device [ blocks-count ]
11
12

DESCRIPTION

14       mkudffs  is  used  to  create  a  UDF filesystem on a device (usually a
15       disk). device is the special file corresponding  to  the  device  (e.g.
16       /dev/hdX)  or  file  image. blocks-count is the number of blocks on the
17       device. If omitted, mkudffs automagically figures the filesystem  size.
18       The order of options matters. Encoding option must be first and options
19       to override default settings implied by the media type or UDF  revision
20       should be after the option they are overriding.
21
22

OPTIONS

24       -h,--help
25              Display the usage and list of options.
26
27
28       -l,--label= label
29              Specify  the UDF label. UDF label is synonym for specifying both
30              --lvid and --vid options. If omitted, mkudffs label is LinuxUDF.
31              (Option available since mkudffs 1.1)
32
33
34       -u,--uuid= uuid
35              Specify  the  UDF uuid. It must be exactly 16 hexadecimal lower‐
36              case digits and is used for first 16  characters  of  --fullvsid
37              option.  If  omitted,  mkudffs uuid is generated from local time
38              and a random number. (Option available since mkudffs 1.1)
39
40
41       -b,--blocksize= block-size
42              Specify the size of blocks in bytes. Valid block size for a  UDF
43              filesystem  is  power of two in range from 512 to 32768 and must
44              match a device logical (sector) size. If omitted, mkudffs  block
45              size  is  set  to device logical block (sector) size. If logical
46              block (sector) size is unknown (e.g. when creating  disk  image)
47              then  for  --media-type=hd  is used block size 512 and for other
48              media types 2048.
49
50
51       -m,--media-type= media-type
52              Specify the media type. Must be specified before --udfrev. Valid
53              media types are:
54
55                   hd (default)    HD (Hard Disk)
56
57                   worm            WORM (Write Once Read Many)
58
59                   mo              MO (Magneto Optical)
60
61                   cd              CD-ROM (CD Read-Only Memory)
62
63                   cdr             CD-R (CD Recordable)
64
65                   cdrw            CD-RW (CD Read-Write)
66
67                   dvd             DVD-ROM (DVD Read-Only Memory)
68
69                   dvdr            DVD-R (DVD Recordable)
70
71                   dvdrw           DVD-RW (DVD Read-Write)
72
73                   dvdram          DVD-RAM (DVD Random Access Memory)
74
75                   bdr             BD-R (Blu-ray Disc Recordable)
76
77              (Short  option variant -m and values cd, dvdr, bdr are available
78              since mkudffs 2.0)
79
80
81       -r,--udfrev= udf-revision
82              Specify the UDF revision to use, either in hexadecimal BCD (e.g.
83              0x0201) or decimal (e.g. 2.01) format. Valid revisions are 1.01,
84              1.02, 1.50, 2.00, 2.01, 2.50 and 2.60. If omitted,  mkudffs  UDF
85              revision  is  2.01,  except for Blu-ray Discs which is 2.50. UDF
86              revisions higher then 2.01  are  experimental.  Option  must  be
87              specified  after --media-type. (Values in decimal format and UDF
88              revisions higher then 2.01 are supported since mkudffs 2.0,  UDF
89              revision 1.01 is supported since mkudffs 2.1)
90
91
92       -n,--no-write
93              Not  really,  do  not write to device. Just simulate and display
94              what would happen with device. Useful for determining the calcu‐
95              lated  location of different UDF blocks. (Option available since
96              mkudffs 2.0)
97
98
99       --new-file
100              Create a new image file specified by  device  with  blocks-count
101              and  fail  if file already exists. If omitted, mkudffs creates a
102              new image file only in case  it  does  not  exist  yet.  (Option
103              available since mkudffs 2.0)
104
105
106       --lvid= logical-volume-identifier
107              Specify the Logical Volume Identifier. If omitted, mkudffs Logi‐
108              cal Volume Identifier is LinuxUDF. Most UDF implementations uses
109              this identifier as a disk label.
110
111
112       --vid= volume-identifier
113              Specify  the Volume Identifier. If omitted, mkudffs Volume Iden‐
114              tifier is LinuxUDF.
115
116
117       --vsid= volume-set-identifier
118              Specify the 17.–127. character  of  Volume  Set  Identifier.  If
119              omitted, mkudffs Volume Set Identifier is LinuxUDF.
120
121
122       --fsid= file-set-identifier
123              Specify  the  File  Set Identifier. If omitted, mkudffs File Set
124              Identifier is LinuxUDF.
125
126
127       --fullvsid= full-volume-set-identifier
128              Specify the  full  Volume  Set  Identifier.  Overwrite  previous
129              --uuid and --vsid options. (Option available since mkudffs 1.1)
130
131
132       --uid= uid
133              Specify  the  uid of the root (/) directory. If omitted, mkudffs
134              uid is 0. Special value -1 means invalid or not  specified  uid.
135              (Option available since mkudffs 1.1)
136
137
138       --gid= gid
139              Specify  the  gid of the root (/) directory. If omitted, mkudffs
140              gid is 0. Special value -1 means invalid or not  specified  gid.
141              (Option available since mkudffs 1.1)
142
143
144       --mode= mode
145              Specify  permissions  in  octal mode bits of the root (/) direc‐
146              tory. If omitted, mkudffs mode is 0755. (Option available  since
147              mkudffs 2.0)
148
149
150       --bootarea= fill
151              Specify how to fill UDF boot area which is the first 32kB of the
152              disk and is not used by UDF itself. Option mbr make  sense  only
153              when  running  mkudffs on whole disk, not on just one partition.
154              Valid options are:
155
156                   preserve      preserve existing UDF boot area, do not touch
157                                 it (default for media type different from hd)
158
159                   erase         erase  existing  UDF  boot  area,  fill it by
160                                 zeros (default for hd media  type  on  parti‐
161                                 tions and on removable disks)
162
163                   mbr           put MBR table with one partition which starts
164                                 at sector 0 (includes MBR itself)  and  spans
165                                 whole disk device, needed only for non-remov‐
166                                 able hard disks  used  on  Microsoft  Windows
167                                 systems  (default  for  hd media type on non-
168                                 removable hard disk without partitions),  see
169                                 section WHOLE DISK VS PARTITION
170
171              (Option available since mkudffs 2.0)
172
173
174       --strategy= strategy
175              Specify  the  allocation strategy to use. Valid strategies are 4
176              and  4096.  If  omitted,  mkudffs  strategy  is  based  on   the
177              --media-type.
178
179
180       --spartable, --spartable= spartable-number
181              Enable  usage  Sparing Table. Optionally specify also the number
182              of sparing tables. Valid numbers are  1–4.  When  the  spartable
183              number  is  omitted  then two tables are written to the disc. If
184              the option is omitted then usage of Sparing Table depends on the
185              media  type. (Option prior to mkudffs 2.0 was available only for
186              cdrw media type)
187
188
189       --sparspace= num-of-entires
190              Specify the number of entries in Sparing Table. If omitted,  the
191              default  number  of  entries  is  1024, but depends on the media
192              type. (Option available since mkudffs 2.0)
193
194
195       --packetlen= length
196              Packet length in a number of blocks used for alignment. All con‐
197              tinuous UDF structures would be aligned to packets. It specifies
198              also the size of the Sparing Space and packet length in  Sparing
199              Table. It should match the device ECC/packet length. If omitted,
200              default value for DVD discs is 16 blocks, for CD/BD discs it  is
201              32  blocks  and  otherwise 1 block. (Option prior to mkudffs 2.1
202              was available only for cdrw and dvdrw media types)
203
204
205       --vat  Enable usage of Virtual  Allocation  Table  (VAT).  If  omitted,
206              usage depends on the media type. (Option available since mkudffs
207              2.0)
208
209
210       --closed
211              Close disc with Virtual Allocation Table. AVDP is  written  also
212              to  the end of the disc. By default, the disc with Virtual Allo‐
213              cation Table is not closed.
214
215
216       --space= space
217              Specify the Space Set. Unallocated Space Set is used  for  media
218              which  blocks  may  be allocated immediately. Freed Space Set is
219              used  for  media  which  blocks  needs  to  be  specially   pre‐
220              pared/erased before allocation. In Space Table is stored list of
221              unallocated extents. In Space Bitmap is stored bitmap of unallo‐
222              cated blocks. Not used for VAT.
223
224                   freedbitmap     Freed Bitmap
225
226                   freedtable      Freed Table
227
228                   unallocbitmap   Unallocated Bitmap (default)
229
230                   unalloctable    Unallocated Table
231
232
233       --ad= ad
234              Specify the Allocation Descriptors of the root (/) directory.
235
236                   inicb           Allocation Descriptors in ICB (default)
237
238                   short           Short Allocation Descriptors
239
240                   long            Long Allocation Descriptors
241
242
243       --noefe
244              Don't  Use  Extended  File  Entries  for the root (/) directory.
245              Affects only  UDF  2.00  or  higher.  Must  be  specified  after
246              --udfrev.
247
248
249       --locale
250              Treat  identifier string options as strings encoded according to
251              the current locale settings (default). Must be specified as  the
252              first argument. (Option available since mkudffs 2.0)
253
254
255       --u8   Treat identifier string options as strings encoded in 8-bit OSTA
256              Compressed Unicode format, equivalent  to  Latin1  (ISO-8859-1).
257              Must be specified as first argument.
258
259
260       --u16  Treat  identifier  string  options  as strings encoded in 16-bit
261              OSTA Compressed Unicode format, equivalent to UCS-2BE. Note that
262              it is not possible to include zero byte in command line options,
263              therefore any character which has at least one zero byte  cannot
264              be  supplied  (this  applies  to all Latin1 characters). Must be
265              specified as the first argument.
266
267
268       --utf8 Treat identifier string options as  strings  encoded  in  UTF-8.
269              Must be specified as the first argument.
270
271

COMPATIBILITY

273   OPERATING SYSTEMS SUPPORT
274       UDF  filesystem is natively supported by large amount of operating sys‐
275       tems. See following compatibility table:
276
277
278       ┌────────────────────────────┬──────────────────────────┐
279       │     Operating system       │ Maximum UDF revision for │
280       ├─────────┬──────────────────┼────────────┬─────────────┤
281       │  Name   │     Version      │    read    │    write    │
282       ├─────────┼──────────────────┼────────────┼─────────────┤
283       │         │ 2.3.17 – 2.4.5   │    2.00    │    2.00     │
284       │Linux    │ 2.4.6 – 2.6.25   │    2.01    │    2.01     │
285       │         │ 2.6.26 (and new) │    2.50    │    2.01     │
286       ├─────────┼──────────────────┼────────────┼─────────────┤
287       │         │ 98/Me            │    1.02    │    none     │
288       │Windows  │ 2000             │    1.50    │    none     │
289       │         │ XP               │    2.01    │    none     │
290       │         │ Vista (and new)  │    2.60    │    2.50     │
291       ├─────────┼──────────────────┼────────────┼─────────────┤
292       │Mac OS   │ 8.1 – 8.5        │    1.02    │    none     │
293       │         │ 8.6 – 9.2        │    1.50    │    1.50     │
294       ├─────────┼──────────────────┼────────────┼─────────────┤
295       │         │ 10.0 – 10.3      │    1.50    │    1.50     │
296       │Mac OS X │ 10.4             │    2.01    │    2.01     │
297       │         │ 10.5 (and new)   │    2.60    │    2.50     │
298       ├─────────┼──────────────────┼────────────┼─────────────┤
299       │FreeBSD  │ 5 (and new)      │    1.50    │    none     │
300       ├─────────┼──────────────────┼────────────┼─────────────┤
301       │NetBSD   │ 4.0              │    2.60    │    none     │
302       │         │ 5.0 (and new)    │    2.60    │    2.60     │
303       ├─────────┼──────────────────┼────────────┼─────────────┤
304       │         │ 3.8 – 3.9        │    1.02    │             │
305       │OpenBSD  │ 4.0 – 4.6        │    1.50    │    none     │
306       │         │ 4.7 (and new)    │    2.60    │             │
307       ├─────────┼──────────────────┼────────────┼─────────────┤
308       │Solaris  │ 7 (and new)      │    1.50    │    1.50     │
309       ├─────────┼──────────────────┼────────────┼─────────────┤
310       │AIX      │ 5.2 (and new)    │    2.01    │    2.01     │
311       └─────────┴──────────────────┴────────────┴─────────────┘
312       Note that Windows 98 and Windows Me can read UDF filesystem  only  from
313       CD and DVD optical discs, not from hard disks.
314
315
316   BLOCK SIZE
317       In  most cases, operating systems are unable to mount UDF filesystem if
318       UDF block size differs from logical sector size of  the  device.  Typi‐
319       cally  hard  disks  have  sector  size 512 bytes and optical media 2048
320       bytes. Therefore UDF block size must match the logical sector  size  of
321       the device.
322
323       Linux  kernel  prior to version 2.6.30 used hardcoded UDF block size of
324       2048 bytes independently of logical sector size, therefore it  was  not
325       able  to automatically mount UDF filesystem if block size differed from
326       2048. Since 2.6.30 and prior to 4.11 Linux kernel used a logical sector
327       size  of  the device as UDF block size, plus it tried fallback to 2048.
328       Since 4.11 it uses logical sector size and fallbacks to any valid block
329       size  between  logical  sector  size  and 4096. Therefore since version
330       2.6.30 Linux kernel can automatically mount UDF  filesystems  correctly
331       if  UDF block size matches device logical sector size and since version
332       4.11 can automatically also mount devices which sector  size  does  not
333       match  UDF  block  size. In any case and also for Linux kernel prior to
334       version 2.6.30, different UDF block size (which  is  not  autodetected)
335       can be manually specified via bs=blocksize mount parameter.
336
337
338   WHOLE DISK VS PARTITION
339       UDF  filesystem  is supposed to be formatted on the whole media and not
340       to the partitioned hard disk. Mac OS X systems enforce  this  rule  and
341       reject  to automatically mount UDF filesystem unless it is formatted on
342       the whole unpartitioned hard disk. Possible partition table  (e.g.  MBR
343       or  GPT)  on  disk  with  valid UDF filesystem is ignored. On the other
344       hand, Microsoft Windows systems are unable to detect non-removable hard
345       disks  without  MBR or GPT partition table. Removable disks do not have
346       this restriction. A consequence is that non-removable hard  disks  for‐
347       matted  to UDF by Windows Vista+ are not recognized by Mac OS X systems
348       and vice-versa. Note that manual mount of UDF partition on  partitioned
349       hard  disk  on Mac OS X system is possible and working (e.g. by running
350       commands:   mkdir   /Volumes/DriveName   &&   mount_udf    /dev/disk1s1
351       /Volumes/DriveName).  But  there  is  no known way to mount an unparti‐
352       tioned non-removable disk on Windows system.
353
354       Thanks to reserved and unused UDF boot area (first 32kB of UDF filesys‐
355       tem)  it  is possible to deal with this problem, by putting MBR on such
356       non-removable hard disk just for compatibility  reasons  with  Windows.
357       Such  MBR  table  would  contain one partition which starts at sector 0
358       (includes MBR itself) and spans whole disk device. So  the  whole  disk
359       device  and  also  the  first partition on disk points to same sectors.
360       Therefore UDF filesystem can be mounted either from whole  disk  device
361       (needed  for  Mac OS X systems) or from first partition (needed for Mi‐
362       crosoft Windows systems).
363
364       Linux kernel ignores MBR table if contains partition  which  starts  at
365       sector  0.  Normally  Linux  kernel can detect and mount UDF filesystem
366       either on a partition or on whole disk device. It  does  not  have  any
367       restrictions.
368
369       mkudffs option --bootarea=mbr put such MBR table for compatibility with
370       Microsoft Windows systems into disk when formatting.
371
372
373   LINUX LABEL BUGS
374       In most cases Logical Volume Identifier is used as UDF label. But Linux
375       libblkid  prior  to  version  2.26  used  Volume  Identifier. Therefore
376       mkudffs --label for compatibility reasons set both Logical Volume Iden‐
377       tifier and Volume Identifier.
378
379       Linux  libblkid  prior  to version 2.30 incorrectly processed non-ASCII
380       identifier strings encoded in 8-bit  OSTA  Compressed  Unicode  format.
381       Therefore  mkudffs since version 2.0 for compatibility reasons tries to
382       encode a non-ASCII identifier strings in 16-bit OSTA Compressed Unicode
383       format and then fallbacks to 8-bit format.
384
385       For  more  information about UDF Label and UUID see udflabel(8) section
386       UDF LABEL AND UUID.
387
388

EXIT STATUS

390       mkudffs returns 0 if successful, non-zero if there are problems.
391
392

LIMITATIONS

394       mkudffs cannot create UDF 2.50 Metadata partition,  therefore  it  does
395       not  support  UDF  revisions  higher than 2.01 for non Write Once media
396       yet. So there is no support for Blu-ray  discs  which  needs  UDF  2.50
397       (except  for  Blu-ray  Disc  Recordable which does not require Metadata
398       partition).
399
400

BUGS

402       mkudffs prior to version 1.1 was unable to process non-ASCII characters
403       from  identifier  strings  in --utf8 mode, --vsid option was completely
404       broken and --blocksize must have been manually specified for hard disks
405       as default value was hardcoded for optical disks. mkudffs prior to ver‐
406       sion 2.0 generated broken and unreadable cdr disc images.
407
408

AUTHOR

410       Ben Fennema
411       Pali Rohár <pali.rohar@gmail.com>
412
413

AVAILABILITY

415       mkudffs  is  part  of  the  udftools  package  and  is  available  from
416       https://github.com/pali/udftools/.
417
418

SEE ALSO

420       pktsetup(8), udflabel(8), cdrwtool(1), udfinfo(1), wrudf(1)
421
422
423
424System Management Commands         udftools                         MKUDFFS(8)
Impressum