1UDFLABEL(8) System Manager's Manual UDFLABEL(8)
2
3
4
6 udflabel — show or change UDF filesystem label
7
8
10 udflabel [encoding-options] [block-options] [identifier-options] device
11 [new-label]
12
13
15 When udflabel is invoked without identifier-options and without speci‐
16 fying new-label then it shows current label of UDF filesystem on device
17 to standard output terminated by new line. Otherwise it updates UDF
18 filesystem (up to the revision 2.60) on device with new specified iden‐
19 tifiers from identifier-options. Specifying new-label is synonym for
20 both --lvid and --vid, see section UDF LABEL AND UUID.
21
22
24 GENERAL OPTIONS
25 -h,--help
26 Display the usage and the list of options.
27
28
29 BLOCK OPTIONS
30 -b,--blocksize= block-size
31 Specify the size of blocks in bytes. Valid block size for a UDF
32 filesystem is a power of two in the range from 512 to 32768 and
33 must match a device logical (sector) size. If omitted, udflabel
34 tries to autodetect block size. First it tries logical (sector)
35 size and then all valid block sizes.
36
37
38 --vatblock= vat-block
39 Specify the block location of the Virtual Allocation Table. Vir‐
40 tual Allocation Table is present only on UDF disks with Virtual
41 Partition Map and must be at the last written/recorded disk
42 block.
43
44 If omitted, udflabel for optical disc tries to detect the last
45 recorded block with fallback to the last block of block device
46 or disk file image. In most cases, this fallback does not have
47 to work and for disk file images with Virtual Allocation Table
48 it is necessary to specify the correct location.
49
50 Virtual Allocation Table contains Logical Volume Identifier (UDF
51 Label).
52
53
54 --force
55 Force updating UDF disks without write support. Some media, like
56 CD-ROM, DVD-ROM or BD-ROM are read-only. Other media, like CD-RW
57 or DVD-RW, are write-once. UDF is designed also for such media
58 where updating Label or Identifiers is not possible. But in some
59 rare cases, it could make sense to try and overwrite the exist‐
60 ing Label or Identifiers also for UDF filesystem which has
61 Access Type either Read-Only or Recordable (Write-Once). This is
62 possible only if underlying media supports overwriting. E.g. UDF
63 image of CD-ROM stored on hard disk or Read-Only UDF image
64 burned to DVD-RAM or BD-RE discs. Option --force ignores UDF
65 Access Type and treats it as Overwritable.
66
67
68 -n,--no-write
69 Not really, do not write to device. Just simulate and display
70 what would happen with device. Useful for determining which UDF
71 blocks would be overwritten.
72
73
74 IDENTIFIER OPTIONS
75 -u,--uuid= uuid
76 Specify the UDF uuid. Must be exactly 16 hexadecimal lowercase
77 digits and is used for first 16 characters of --fullvsid option.
78 Special value random generates new uuid from local time and a
79 random number. See section UDF LABEL AND UUID.
80
81
82 --lvid= new-logical-volume-identifier
83 Specify the new Logical Volume Identifier.
84
85
86 --vid= new-volume-identifier
87 Specify the new Volume Identifier.
88
89
90 --vsid= new-volume-set-identifier
91 Specify the new 17.–127. character of Volume Set Identifier. See
92 section UDF LABEL AND UUID.
93
94
95 --fsid= new-file-set-identifier
96 Specify the new File Set Identifier.
97
98
99 --fullvsid= new-full-volume-set-identifier
100 Specify the new Volume Set identifier. Overwrite previous --uuid
101 and --vsid options. See section UDF LABEL AND UUID.
102
103
104 ENCODING OPTIONS
105 --locale
106 Treat identifier string options as strings encoded according to
107 current locale settings (default). Must be specified as the
108 first argument.
109
110
111 --u8 Treat identifier string options as strings encoded in 8-bit OSTA
112 Compressed Unicode format, equivalent to Latin1 (ISO-8859-1).
113 Must be specified as first argument.
114
115
116 --u16 Treat identifier string options as strings encoded in 16-bit
117 OSTA Compressed Unicode format, equivalent to UCS-2BE. Note that
118 it is not possible to include zero byte in command line options,
119 therefore any character which has at least one zero byte cannot
120 be supplied (this applies to all Latin1 characters). Must be
121 specified as the first argument.
122
123
124 --utf8 Treat identifier string options as strings encoded in UTF-8.
125 Must be specified as the first argument.
126
127
129 UDF specification does not say anything about a disk label but it
130 describes that UDF Logical Volume Identifier is an extremely important
131 field for media identification in a jukebox as that field is displayed
132 to the user. And based on this statement it is a common practice for
133 the majority of UDF implementations to use UDF Logical Volume Identi‐
134 fier as a UDF disk label.
135
136 UDF specification does not have a concept of disk UUID like other
137 filesystems. But mandates that the first 16 characters of UDF Volume
138 Set Identifier are unique, a non-fixed and a non-trivial value. Plus
139 first eight characters are hexadecimal digits. Windows application for‐
140 mat.exe and Mac OS X application newfs_udf are known to violates this
141 requirement and set only the first 8 characters as unique (others are
142 fixed). Since, there are still a lot of UDF implementations which use
143 in the first 16 characters only hexadecimal digits and all compliant
144 UDF implementations have hexadecimal digits in the first 8 characters,
145 the following algorithm for generating stable UUID was informally cho‐
146 sen and now is used by udftools, util-linux, grub2 and other projects:
147
148 0. If Volume Set Identifier has less then 8 characters then stop
149 with empty UUID
150 1. Take the first 16 bytes from UTF-8 encoded string of Volume
151 Set Identifier
152 2. If all bytes are hexadecimal digits then use their lowercase
153 form as UUID
154 3. If first 8 bytes are not all hexadecimal digits then convert
155 those 8 bytes to their hexadecimal representation (resulting in
156 16 bytes) and use as UUID
157 4. Otherwise, compose UUID from two 8 byte parts:
158 1. part: Use the lowercase form of the first 8 bytes
159 (which are hexadecimal digits)
160 2. part: Convert next 4 bytes (9.–12. pos.) to their
161 hexadecimal representation
162
163 Which means that this generated UUID has always 16 hexadecimal lower‐
164 case digits. In most cases, this UUID matches case-insensitively the
165 first 16 characters of UDF Volume Set Identifier and for all disks com‐
166 pliant to the UDF specification the first 8 bytes of UUID matches case-
167 insensitively the first 8 characters of UDF Volume Set Identifier. In
168 that algorithm was chosen UTF-8 encoding because it is the only com‐
169 monly used Unicode transformation to bytes with fixed points in all
170 hexadecimal digits.
171
172
174 udflabel returns 0 if successful, non-zero if there are problems like
175 block device does not contain UDF filesystem or updating failed.
176
177
179 udflabel is not able to set new Label, Logical Volume Identifier and
180 File Set Identifier for disks with Metadata Partition (used by UDF
181 revisions higher then 2.01) or Virtual Allocation Table (used by Write
182 Once media).
183
184 udflabel prior to version 2.1 was not able to read Label correctly if
185 the disk has Virtual Allocation Table stored outside of Information
186 Control Block.
187
188
190 Pali Rohár <pali.rohar@gmail.com>
191
192
194 udflabel is part of the udftools package since version 2.0 and is
195 available from https://github.com/pali/udftools/.
196
197
199 mkudffs(8), pktsetup(8), cdrwtool(1), udfinfo(1), wrudf(1)
200
201
202
203Commands udftools UDFLABEL(8)