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

NAME

6       udflabel — show or change UDF filesystem label
7
8

SYNOPSIS

10       udflabel [encoding-options] [block-options] [identifier-options] device
11       [new-label]
12
13

DESCRIPTION

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

OPTIONS

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       --startblock= start-block
39              Specify  the  block location where the UDF filesystem starts. It
40              is used for calculating the block location of the Volume  Recog‐
41              nition  Sequence (32 kB after the start block) and the first An‐
42              chor Volume Descriptor  Pointer  (256  blocks  after  the  start
43              block).
44
45              Normally  start  block  is  0,  but for Multisession UDF optical
46              discs it is the block location where the last session of  Multi‐
47              session UDF disc starts.
48
49              If  omitted,  udflabel  for  optical  disc tries to detect start
50              block of the last session from disc Table Of Contents. Otherwise
51              value 0 is used.
52
53              For  accessing some previous session of Multisession UDF optical
54              disc, it is required to specify correct block where that  previ‐
55              ous  session starts. And also to specify where that session ends
56              via --lastblock option.
57
58              For Multisession UDF disc images stored in file there is no  way
59              to detect where the last session starts and therefore it is nec‐
60              essary to specify the correct start block location manually from
61              the original optical disc Table Of Contents.
62
63              (Option available since udflabel 2.3)
64
65
66       --lastblock= last-block
67              Specify  the block location where the UDF filesystem ends. It is
68              used for calculating the block location of second and third  An‐
69              chor  Volume Descriptor Pointer (256 blocks prior the last block
70              and the last block itself).
71
72              Normally last block is number of disk blocks minus one, but  for
73              Multisession  UDF  optical  discs when reading different session
74              than the last one (specified by --startblock) it  is  the  block
75              location where the specified session ends.
76
77              If  omitted,  udflabel for optical disc tried to detect the last
78              recorded block with fallback to the last block of device or disk
79              file image.
80
81              For  accessing some previous session of Multisession UDF optical
82              disc, it is required to specify correct value for both  --start‐
83              block and --lastblock options.
84
85              (Option available since udflabel 2.3)
86
87
88       --vatblock= vat-block
89              Specify the block location of the Virtual Allocation Table. Vir‐
90              tual Allocation Table is present only on UDF disks with  Virtual
91              Partition  Map  and  must  be  at the last written/recorded disk
92              block.
93
94              If omitted, udflabel for optical disc tries to detect  the  last
95              recorded  block  with fallback to the last block of block device
96              or disk file image or block specified by  --lastblock.  In  most
97              cases, this fallback does not have to work and for disk file im‐
98              ages with Virtual Allocation Table it is  necessary  to  specify
99              the correct location.
100
101              Virtual Allocation Table contains Logical Volume Identifier (UDF
102              Label).
103
104
105       --force
106              Force updating UDF disks without write  support  or  write  pro‐
107              tected  UDF  disks.  Some  UDF  disks may have set write protect
108              flag. Some media, like CD-ROM, DVD-ROM or BD-ROM are  read-only.
109              Other  media,  like  CD-RW or DVD-RW, are write-once. UDF is de‐
110              signed also for such media where updating Label  or  Identifiers
111              is  not possible. But in some rare cases, it could make sense to
112              try and overwrite the existing Label or Identifiers also for UDF
113              filesystem  which has Access Type either Read-Only or Recordable
114              (Write-Once). This is possible only if underlying media supports
115              overwriting.  E.g.  UDF  image  of CD-ROM stored on hard disk or
116              Read-Only UDF image burned to DVD-RAM  or  BD-RE  discs.  Option
117              --force  ignores  UDF Access Type and treats it as Overwritable.
118              Also it  ignores  UDF  SoftWriteProtect  and  HardWriteProtected
119              flags.
120
121
122       -n,--no-write
123              Not  really,  do  not write to device. Just simulate and display
124              what would happen with device. Useful for determining which  UDF
125              blocks would be overwritten.
126
127
128   IDENTIFIER OPTIONS
129       -u,--uuid= uuid
130              Specify  the  UDF uuid. Must be exactly 16 hexadecimal lowercase
131              digits and is used for first 16 characters of --fullvsid option.
132              Special  value  random  generates new uuid from local time and a
133              random number. See section UDF LABEL AND UUID.
134
135
136       --lvid= new-logical-volume-identifier
137              Specify the new Logical Volume Identifier.
138
139
140       --vid= new-volume-identifier
141              Specify the new Volume Identifier.
142
143
144       --vsid= new-volume-set-identifier
145              Specify the new 17.–127. character of Volume Set Identifier. See
146              section UDF LABEL AND UUID.
147
148
149       --fsid= new-file-set-identifier
150              Specify the new File Set Identifier.
151
152
153       --fullvsid= new-full-volume-set-identifier
154              Specify the new Volume Set identifier. Overwrite previous --uuid
155              and --vsid options. See section UDF LABEL AND UUID.
156
157
158       --owner= new-owner-name
159              Specify the new Owner name, person who  created  the  medium  or
160              filesystem.  It  is  stored in UDF Logical Volume Info1, part of
161              UDF Implementation  Use  Volume  Descriptor.  (Option  available
162              since udflabel 2.3)
163
164
165       --organization= new-organization-name
166              Specify  the  new Organization name responsible for creating the
167              medium or filesystem. It is stored in UDF Logical Volume  Info2,
168              part of UDF Implementation Use Volume Descriptor. (Option avail‐
169              able since udflabel 2.3)
170
171
172       --contact= new-contact-information
173              Specify the new Contact information for the medium  or  filesys‐
174              tem.  It  is stored in UDF Logical Volume Info3, part of UDF Im‐
175              plementation Use Volume Descriptor. (Option available since  ud‐
176              flabel 2.3)
177
178
179       --appid= new-application-identifier
180              Specify the new Application Identifier which identifies applica‐
181              tion that created medium or filesystem. It is stored in UDF Pri‐
182              mary  Volume  Descriptor.  This  identifier can be empty or must
183              start with * and contain only  7bit  ASCII  characters.  (Option
184              available since udflabel 2.3)
185
186
187       --impid= new-developer-identifier
188              Specify  the new Developer Identifier for Implementation Identi‐
189              fier. It is unique identification of  the  implementation  which
190              created medium or filesystem. It is stored in UDF Primary Volume
191              Descriptor. This identifier must start with * and  contain  only
192              7bit ASCII characters. (Option available since udflabel 2.3)
193
194
195   ENCODING OPTIONS
196       --locale
197              Treat  identifier string options as strings encoded according to
198              current locale settings (default).  Must  be  specified  as  the
199              first argument.
200
201
202       --u8   Treat identifier string options as strings encoded in 8-bit OSTA
203              Compressed Unicode format without leading Compression  ID  byte,
204              which is equivalent to Latin1 (ISO-8859-1). Must be specified as
205              first argument.
206
207
208       --u16  Treat identifier string options as  strings  encoded  in  16-bit
209              OSTA  Compressed  Unicode  format without leading Compression ID
210              byte, which is equivalent to UTF-16BE. Note that it is not  pos‐
211              sible  to  include  zero byte in command line options, therefore
212              any character which has at least one zero byte  cannot  be  sup‐
213              plied (this applies to all Latin1 characters). Must be specified
214              as the first argument.
215
216
217       --utf8 Treat identifier string options as  strings  encoded  in  UTF-8.
218              Must be specified as the first argument.
219
220

UDF LABEL AND UUID

222       UDF  specification  does not say anything about a disk label but it de‐
223       scribes that UDF Logical Volume Identifier is  an  extremely  important
224       field  for media identification in a jukebox as that field is displayed
225       to the user. And based on this statement it is a  common  practice  for
226       the  majority  of UDF implementations to use UDF Logical Volume Identi‐
227       fier as a UDF disk label.
228
229       UDF specification does not have a  concept  of  disk  UUID  like  other
230       filesystems.  But  mandates  that the first 16 characters of UDF Volume
231       Set Identifier are unique, a non-fixed and a  non-trivial  value.  Plus
232       first eight characters are hexadecimal digits. Windows application for‐
233       mat.exe and Mac OS X application newfs_udf are known to  violates  this
234       requirement  and  set only the first 8 characters as unique (others are
235       fixed). Since, there are still a lot of UDF implementations  which  use
236       in  the  first  16 characters only hexadecimal digits and all compliant
237       UDF implementations have hexadecimal digits in the first 8  characters,
238       the  following algorithm for generating stable UUID was informally cho‐
239       sen and now is used by udftools, util-linux, grub2 and other projects:
240
241              0. If Volume Set Identifier has less then 8 characters then stop
242              with empty UUID
243              1.  Take  the first 16 bytes from UTF-8 encoded string of Volume
244              Set Identifier
245              2. If all bytes are hexadecimal digits then use their  lowercase
246              form as UUID
247              3.  If first 8 bytes are not all hexadecimal digits then convert
248              those 8 bytes to their hexadecimal representation (resulting  in
249              16 bytes) and use as UUID
250              4. Otherwise, compose UUID from two 8 byte parts:
251                     1.  part:  Use  the  lowercase  form of the first 8 bytes
252                     (which are hexadecimal digits)
253                     2. part: Convert next 4  bytes  (9.–12.  pos.)  to  their
254                     hexadecimal representation
255
256       Which  means  that this generated UUID has always 16 hexadecimal lower‐
257       case digits. In most cases, this UUID  matches  case-insensitively  the
258       first 16 characters of UDF Volume Set Identifier and for all disks com‐
259       pliant to the UDF specification the first 8 bytes of UUID matches case-
260       insensitively  the  first 8 characters of UDF Volume Set Identifier. In
261       that algorithm was chosen UTF-8 encoding because it is  the  only  com‐
262       monly  used  Unicode  transformation  to bytes with fixed points in all
263       hexadecimal digits.
264
265

EXIT STATUS

267       udflabel returns 0 if successful, non-zero if there are  problems  like
268       block device does not contain UDF filesystem or updating failed.
269
270

LIMITATIONS

272       udflabel  is  not  able to set new Label, Logical Volume Identifier and
273       File Set Identifier for disks with Virtual Allocation  Table  (used  by
274       Write Once media).
275
276       udflabel  prior  to  version  2.3 was unable to handle Multisession UDF
277       discs correctly. It always accessed only the first session (the  oldest
278       one) and not the last session (the most recent).
279
280       udflabel  prior  to version 2.2 was unable to print and process Unicode
281       strings with code points above U+FFFF correctly. When option --utf8 was
282       specified then input strings were limited to 3-byte UTF-8 sequences and
283       when option --u16 was specified then input strings were limited just to
284       UCS-2BE strings (subset of UTF-16BE).
285
286       udflabel  prior  to  version 2.2 ignored UDF SoftWriteProtect and Hard‐
287       WriteProtected flags and overwritten such disks without any notice.
288
289       udflabel prior to version 2.2 was not able to set a new Label,  Logical
290       Volume  Identifier and File Set Identifier for disks with Metadata Par‐
291       tition (used by UDF revisions higher then 2.01).
292
293       udflabel prior to version 2.1 was not able to read Label  correctly  if
294       the  disk  had  Virtual  Allocation Table stored outside of Information
295       Control Block.
296
297

AUTHOR

299       Pali Rohár <pali.rohar@gmail.com>
300
301

AVAILABILITY

303       udflabel is part of the udftools  package  since  version  2.0  and  is
304       available from https://github.com/pali/udftools/.
305
306

SEE ALSO

308       mkudffs(8), pktsetup(8), cdrwtool(1), udfinfo(1), wrudf(1)
309
310
311
312Commands                           udftools                        UDFLABEL(8)
Impressum