1MKUDFFS(8) System Manager's Manual MKUDFFS(8)
2
3
4
6 mkudffs — create a UDF filesystem
7
8
10 mkudffs [ options ] device [ blocks-count ]
11
12
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
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. De‐
54 fault 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 --owner= owner-name
137 Specify the Owner name, person creating the medium or filesys‐
138 tem. It is stored in UDF Logical Volume Info1, part of UDF Im‐
139 plementation Use Volume Descriptor. (Option available since
140 mkudffs 2.3)
141
142
143 --organization= organization-name
144 Specify the Organization name responsible for creating the
145 medium or filesystem. It is stored in UDF Logical Volume Info2,
146 part of UDF Implementation Use Volume Descriptor. (Option avail‐
147 able since mkudffs 2.3)
148
149
150 --contact= contact-information
151 Specify the Contact information for the medium or filesystem. It
152 is stored in UDF Logical Volume Info3, part of UDF Implementa‐
153 tion Use Volume Descriptor. (Option available since mkudffs 2.3)
154
155
156 --uid= uid
157 Specify the uid of the root (/) directory. If omitted, mkudffs
158 uid is 0. Special value -1 means invalid or not specified uid.
159 (Option available since mkudffs 1.1)
160
161
162 --gid= gid
163 Specify the gid of the root (/) directory. If omitted, mkudffs
164 gid is 0. Special value -1 means invalid or not specified gid.
165 (Option available since mkudffs 1.1)
166
167
168 --mode= mode
169 Specify permissions in octal mode bits of the root (/) direc‐
170 tory. If omitted, mkudffs mode is 0755. (Option available since
171 mkudffs 2.0)
172
173
174 --read-only
175 This option specify that the whole UDF disk should be treated as
176 read-only. It sets SoftWriteProtect domain flag in Logical Vol‐
177 ume Descriptor and in File Set Descriptor. Plus for overwritable
178 media types (hd, dvdram, dvdrw) set UDF Access Type to read-
179 only. (Option available since mkudffs 2.2)
180
181
182 --bootarea= fill
183 Specify how to fill UDF boot area which is the first 32kB of the
184 disk and is not used by UDF itself. Option mbr make sense only
185 when running mkudffs on whole disk, not on just one partition.
186 Valid options are:
187
188 preserve preserve existing UDF boot area, do not touch
189 it (default for media type different from hd)
190
191 erase erase existing UDF boot area, fill it by ze‐
192 ros (default for hd media type on partitions
193 and on removable disks)
194
195 mbr put MBR table with one partition which starts
196 at sector 0 (includes MBR itself) and spans
197 whole disk device, needed only for non-remov‐
198 able hard disks used on Microsoft Windows
199 systems (default for hd media type on non-re‐
200 movable hard disk without partitions), see
201 section WHOLE DISK VS PARTITION
202
203 mbr:sec-size same as mbr but explicitly set MBR sector
204 size to sec-size value, default sec-size is
205 device logical block (sector) size with fall‐
206 back to size 512 bytes
207
208 (Option available since mkudffs 2.0)
209
210
211 --strategy= strategy
212 Specify the allocation strategy to use. Valid strategies are 4
213 and 4096. If omitted, mkudffs strategy is based on the --me‐
214 dia-type.
215
216
217 --spartable, --spartable= spartable-number
218 Enable usage Sparing Table. Optionally specify also the number
219 of sparing tables. Valid numbers are 1–4. When the spartable
220 number is omitted then two tables are written to the disc. If
221 the option is omitted then usage of Sparing Table depends on the
222 media type. (Option prior to mkudffs 2.0 was available only for
223 cdrw media type)
224
225
226 --sparspace= num-of-entires
227 Specify the number of entries in Sparing Table. If omitted, the
228 default number of entries is 1024, but depends on the media
229 type. (Option available since mkudffs 2.0)
230
231
232 --packetlen= length
233 Packet length in a number of blocks used for alignment. All con‐
234 tinuous UDF structures would be aligned to packets. It specifies
235 also the size of the Sparing Space and packet length in Sparing
236 Table. It should match the device ECC/packet length. If omitted,
237 default value for DVD discs is 16 blocks, for CD/BD discs it is
238 32 blocks and otherwise 1 block. (Option prior to mkudffs 2.1
239 was available only for cdrw and dvdrw media types)
240
241
242 --vat Enable usage of Virtual Allocation Table (VAT). If omitted, us‐
243 age depends on the media type. (Option available since mkudffs
244 2.0)
245
246
247 --startblock= start-block
248 Specify the block location where the UDF filesystem starts.
249
250 Normally start block is 0, but when creating second or higher
251 session for Multisession UDF optical disc it is the block loca‐
252 tion where that new session starts.
253
254 When updating existing Multisession UDF image file, mkudffs
255 overwrites only data blocks for a new session at start block po‐
256 sition in the image file.
257
258 When creating a new UDF image file, mkudffs stores only data
259 blocks for a new session at beginning of the image file. There‐
260 fore data for start block would be written to the zero block in‐
261 stead of the start block. Such image without leading blocks
262 (where are located previous sessions) is suitable for burning a
263 new session to the optical disc. But it cannot be read or de‐
264 tected by any UDF tool until leading zero blocks (or previous
265 sessions) are prepended to the image file.
266
267 For calculating position where a new session of particular opti‐
268 cal disc should start is required to use software which would be
269 used for burning newly created image. So for example, if for
270 burning is used wodim(1) then second value on output from wodim
271 -msinfo call is start block. Accordingly for cdrecord(1) call
272 cdrecord -msinfo or for cdrdao(1) call cdrdao msinfo or for xor‐
273 riso(1) call xorriso -as cdrecord dev=/dev/cdrw -msinfo.
274
275 (Option available since mkudffs 2.3)
276
277
278 --minblocks= min-num-of-blocks
279 Specify minimal number of blocks to write on disc with Virtual
280 Allocation Table.
281
282 This option affects block position where is written Virtual Al‐
283 location Table. And in case option --closed is used then also
284 it affects block position of the second Anchor Volume Descriptor
285 Pointer.
286
287 Default value for cdr media type is 300. This is safe default to
288 allow burning CD-R disc image in Track-at-Once mode. This mode
289 requires to burn image with minimal size of 300 sectors. Burning
290 CD-R discs in other modes (e.g. Disc-at-Once or Packet-Writing)
291 may allow to allow to use also smaller disc images.
292
293 For all other media types there is no default minimal limit.
294
295 (Option available since mkudffs 2.3)
296
297
298 --closed
299 Close disc with Virtual Allocation Table. AVDP is written also
300 to the end of the disc. By default, the disc with Virtual Allo‐
301 cation Table is not closed.
302
303
304 --space= space
305 Specify the Space Set. Unallocated Space Set is used for media
306 which blocks may be allocated immediately. Freed Space Set is
307 used for media which blocks needs to be specially pre‐
308 pared/erased before allocation. In Space Table is stored list of
309 unallocated extents. In Space Bitmap is stored bitmap of unallo‐
310 cated blocks. Not used for VAT.
311
312 freedbitmap Freed Bitmap
313
314 freedtable Freed Table
315
316 unallocbitmap Unallocated Bitmap (default)
317
318 unalloctable Unallocated Table
319
320
321 --ad= ad
322 Specify the Allocation Descriptors of the root (/) directory.
323
324 inicb Allocation Descriptors in ICB (default)
325
326 short Short Allocation Descriptors
327
328 long Long Allocation Descriptors
329
330
331 --noefe
332 Don't Use Extended File Entries for the root (/) directory. Af‐
333 fects only UDF 2.00 or higher. Must be specified after --udfrev.
334
335
336 --locale
337 Treat identifier string options as strings encoded according to
338 the current locale settings (default). Must be specified as the
339 first argument. (Option available since mkudffs 2.0)
340
341
342 --u8 Treat identifier string options as strings encoded in 8-bit OSTA
343 Compressed Unicode format without leading Compression ID byte,
344 which is equivalent to Latin1 (ISO-8859-1). Must be specified as
345 first argument.
346
347
348 --u16 Treat identifier string options as strings encoded in 16-bit
349 OSTA Compressed Unicode format without leading Compression ID
350 byte, which is equivalent to UTF-16BE. Note that it is not pos‐
351 sible to include zero byte in command line options, therefore
352 any character which has at least one zero byte cannot be sup‐
353 plied (this applies to all Latin1 characters). Must be specified
354 as the first argument.
355
356
357 --utf8 Treat identifier string options as strings encoded in UTF-8.
358 Must be specified as the first argument. (Prior to mkudffs 2.0
359 this was default option)
360
361
363 OPERATING SYSTEMS SUPPORT
364 UDF filesystem is natively supported by large amount of operating sys‐
365 tems. See following compatibility table:
366
367
368 ┌────────────────────────────┬──────────────────────────┐
369 │ Operating system │ Maximum UDF revision for │
370 ├─────────┬──────────────────┼────────────┬─────────────┤
371 │ Name │ Version │ read │ write │
372 ├─────────┼──────────────────┼────────────┼─────────────┤
373 │ │ 2.3.17 – 2.4.5 │ 2.00 │ 2.00 │
374 │Linux │ 2.4.6 – 2.6.25 │ 2.01 │ 2.01 │
375 │ │ 2.6.26 (and new) │ 2.50 │ 2.01 │
376 ├─────────┼──────────────────┼────────────┼─────────────┤
377 │ │ 98/Me │ 1.02 │ none │
378 │Windows │ 2000 │ 1.50 │ none │
379 │ │ XP │ 2.01 │ none │
380 │ │ Vista (and new) │ 2.60 │ 2.50 │
381 ├─────────┼──────────────────┼────────────┼─────────────┤
382 │Mac OS │ 8.1 – 8.5 │ 1.02 │ none │
383 │ │ 8.6 – 9.2 │ 1.50 │ 1.50 │
384 ├─────────┼──────────────────┼────────────┼─────────────┤
385 │ │ 10.0 – 10.3 │ 1.50 │ 1.50 │
386 │Mac OS X │ 10.4 │ 2.01 │ 2.01 │
387 │ │ 10.5 (and new) │ 2.60 │ 2.50 │
388 ├─────────┼──────────────────┼────────────┼─────────────┤
389 │FreeBSD │ 5 (and new) │ 1.50 │ none │
390 ├─────────┼──────────────────┼────────────┼─────────────┤
391 │NetBSD │ 4.0 │ 2.60 │ none │
392 │ │ 5.0 (and new) │ 2.60 │ 2.60 │
393 ├─────────┼──────────────────┼────────────┼─────────────┤
394 │ │ 3.8 – 3.9 │ 1.02 │ │
395 │OpenBSD │ 4.0 – 4.6 │ 1.50 │ none │
396 │ │ 4.7 (and new) │ 2.60 │ │
397 ├─────────┼──────────────────┼────────────┼─────────────┤
398 │Solaris │ 7 (and new) │ 1.50 │ 1.50 │
399 ├─────────┼──────────────────┼────────────┼─────────────┤
400 │AIX │ 5.2 (and new) │ 2.01 │ 2.01 │
401 └─────────┴──────────────────┴────────────┴─────────────┘
402 Note that Windows 98 and Windows Me can read UDF filesystem only from
403 CD and DVD optical discs, not from hard disks.
404
405
406 BLOCK SIZE
407 In most cases, operating systems are unable to mount UDF filesystem if
408 UDF block size differs from logical sector size of the device. Typi‐
409 cally hard disks have sector size 512 bytes and optical media 2048
410 bytes. Therefore UDF block size must match the logical sector size of
411 the device.
412
413 Linux kernel prior to version 2.6.30 used hardcoded UDF block size of
414 2048 bytes independently of logical sector size, therefore it was not
415 able to automatically mount UDF filesystem if block size differed from
416 2048. Since 2.6.30 and prior to 4.11 Linux kernel used a logical sector
417 size of the device as UDF block size, plus it tried fallback to 2048.
418 Since 4.11 it uses logical sector size and fallbacks to any valid block
419 size between logical sector size and 4096. Therefore since version
420 2.6.30 Linux kernel can automatically mount UDF filesystems correctly
421 if UDF block size matches device logical sector size and since version
422 4.11 can automatically also mount devices which sector size does not
423 match UDF block size. In any case and also for Linux kernel prior to
424 version 2.6.30, different UDF block size (which is not autodetected)
425 can be manually specified via bs=blocksize mount parameter.
426
427
428 WHOLE DISK VS PARTITION
429 UDF filesystem is supposed to be formatted on the whole media and not
430 to the partitioned hard disk. Mac OS X systems enforce this rule and
431 reject to automatically mount UDF filesystem unless it is formatted on
432 the whole unpartitioned hard disk. Possible partition table (e.g. MBR
433 or GPT) on disk with valid UDF filesystem is ignored. On the other
434 hand, Microsoft Windows systems are unable to detect non-removable hard
435 disks without MBR or GPT partition table. Removable disks do not have
436 this restriction. A consequence is that non-removable hard disks for‐
437 matted to UDF by Windows Vista+ are not recognized by Mac OS X systems
438 and vice-versa. Note that manual mount of UDF partition on partitioned
439 hard disk on Mac OS X system is possible and working (e.g. by running
440 commands: mkdir /Volumes/DriveName && mount_udf /dev/disk1s1
441 /Volumes/DriveName). But there is no known way to mount an unparti‐
442 tioned non-removable disk on Windows system.
443
444 Thanks to reserved and unused UDF boot area (first 32kB of UDF filesys‐
445 tem) it is possible to deal with this problem, by putting MBR on such
446 non-removable hard disk just for compatibility reasons with Windows.
447 Such MBR table would contain one partition which starts at sector 0
448 (includes MBR itself) and spans whole disk device. So the whole disk
449 device and also the first partition on disk points to same sectors.
450 Therefore UDF filesystem can be mounted either from whole disk device
451 (needed for Mac OS X systems) or from first partition (needed for Mi‐
452 crosoft Windows systems).
453
454 Linux kernel ignores MBR table if contains partition which starts at
455 sector 0. Normally Linux kernel can detect and mount UDF filesystem ei‐
456 ther on a partition or on whole disk device. It does not have any re‐
457 strictions.
458
459 mkudffs option --bootarea=mbr put such MBR table for compatibility with
460 Microsoft Windows systems into disk when formatting.
461
462
463 LINUX LABEL BUGS
464 In most cases Logical Volume Identifier is used as UDF label. But Linux
465 libblkid prior to version 2.26 used Volume Identifier. Therefore
466 mkudffs --label for compatibility reasons set both Logical Volume Iden‐
467 tifier and Volume Identifier.
468
469 Linux libblkid prior to version 2.30 incorrectly processed non-ASCII
470 identifier strings encoded in 8-bit OSTA Compressed Unicode format.
471 Therefore mkudffs since version 2.0 for compatibility reasons tries to
472 encode a non-ASCII identifier strings in 16-bit OSTA Compressed Unicode
473 format and then fallbacks to 8-bit format.
474
475 For more information about UDF Label and UUID see udflabel(8) section
476 UDF LABEL AND UUID.
477
478
480 mkudffs returns 0 if successful, non-zero if there are problems.
481
482
484 mkudffs cannot create UDF 2.50 Metadata partition, therefore it does
485 not support UDF revisions higher than 2.01 for non Write Once media
486 yet. So there is no support for Blu-ray discs which needs UDF 2.50 (ex‐
487 cept for Blu-ray Disc Recordable which does not require Metadata parti‐
488 tion).
489
490 mkudffs prior to version 2.2 was unable to process Unicode strings with
491 code points above U+FFFF. When option --utf8 was specified then input
492 strings were limited to 3-byte UTF-8 sequences and when option --u16
493 was specified then input strings were limited just to UCS-2BE strings
494 (subset of UTF-16BE).
495
496
498 mkudffs prior to version 1.1 was unable to process non-ASCII characters
499 from identifier strings in --utf8 mode, --vsid option was completely
500 broken and --blocksize must have been manually specified for hard disks
501 as default value was hardcoded for optical disks. mkudffs prior to ver‐
502 sion 2.0 generated broken and unreadable cdr disc images.
503
504
506 Ben Fennema
507 Pali Rohár <pali.rohar@gmail.com>
508
509
511 mkudffs is part of the udftools package and is available from
512 https://github.com/pali/udftools/.
513
514
516 pktsetup(8), udflabel(8), cdrwtool(1), udfinfo(1), wrudf(1)
517
518
519
520System Management Commands udftools MKUDFFS(8)