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

COMPATIBILITY

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

EXIT STATUS

405       mkudffs returns 0 if successful, non-zero if there are problems.
406
407

LIMITATIONS

409       mkudffs  cannot  create  UDF 2.50 Metadata partition, therefore it does
410       not support UDF revisions higher than 2.01 for  non  Write  Once  media
411       yet.  So  there  is  no  support for Blu-ray discs which needs UDF 2.50
412       (except for Blu-ray Disc Recordable which  does  not  require  Metadata
413       partition).
414
415       mkudffs prior to version 2.2 was unable to process Unicode strings with
416       code points above U+FFFF. When option --utf8 was specified  then  input
417       strings  were  limited  to 3-byte UTF-8 sequences and when option --u16
418       was specified then input strings were limited just to  UCS-2BE  strings
419       (subset of UTF-16BE).
420
421

BUGS

423       mkudffs prior to version 1.1 was unable to process non-ASCII characters
424       from identifier strings in --utf8 mode, --vsid  option  was  completely
425       broken and --blocksize must have been manually specified for hard disks
426       as default value was hardcoded for optical disks. mkudffs prior to ver‐
427       sion 2.0 generated broken and unreadable cdr disc images.
428
429

AUTHOR

431       Ben Fennema
432       Pali Rohár <pali.rohar@gmail.com>
433
434

AVAILABILITY

436       mkudffs  is  part  of  the  udftools  package  and  is  available  from
437       https://github.com/pali/udftools/.
438
439

SEE ALSO

441       pktsetup(8), udflabel(8), cdrwtool(1), udfinfo(1), wrudf(1)
442
443
444
445System Management Commands         udftools                         MKUDFFS(8)
Impressum