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       --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 or write pro‐
56              tected UDF disks. Some UDF disks  may  have  set  write  protect
57              flag.  Some media, like CD-ROM, DVD-ROM or BD-ROM are read-only.
58              Other media, like  CD-RW  or  DVD-RW,  are  write-once.  UDF  is
59              designed also for such media where updating Label or Identifiers
60              is not possible. But in some rare cases, it could make sense  to
61              try and overwrite the existing Label or Identifiers also for UDF
62              filesystem which has Access Type either Read-Only or  Recordable
63              (Write-Once). This is possible only if underlying media supports
64              overwriting. E.g. UDF image of CD-ROM stored  on  hard  disk  or
65              Read-Only  UDF  image  burned  to DVD-RAM or BD-RE discs. Option
66              --force ignores UDF Access Type and treats it  as  Overwritable.
67              Also  it  ignores  UDF  SoftWriteProtect  and HardWriteProtected
68              flags.
69
70
71       -n,--no-write
72              Not really, do not write to device. Just  simulate  and  display
73              what  would happen with device. Useful for determining which UDF
74              blocks would be overwritten.
75
76
77   IDENTIFIER OPTIONS
78       -u,--uuid= uuid
79              Specify the UDF uuid. Must be exactly 16  hexadecimal  lowercase
80              digits and is used for first 16 characters of --fullvsid option.
81              Special value random generates new uuid from local  time  and  a
82              random number. See section UDF LABEL AND UUID.
83
84
85       --lvid= new-logical-volume-identifier
86              Specify the new Logical Volume Identifier.
87
88
89       --vid= new-volume-identifier
90              Specify the new Volume Identifier.
91
92
93       --vsid= new-volume-set-identifier
94              Specify the new 17.–127. character of Volume Set Identifier. See
95              section UDF LABEL AND UUID.
96
97
98       --fsid= new-file-set-identifier
99              Specify the new File Set Identifier.
100
101
102       --fullvsid= new-full-volume-set-identifier
103              Specify the new Volume Set identifier. Overwrite previous --uuid
104              and --vsid options. See section UDF LABEL AND UUID.
105
106
107   ENCODING OPTIONS
108       --locale
109              Treat  identifier string options as strings encoded according to
110              current locale settings (default).  Must  be  specified  as  the
111              first argument.
112
113
114       --u8   Treat identifier string options as strings encoded in 8-bit OSTA
115              Compressed Unicode format without leading Compression  ID  byte,
116              which is equivalent to Latin1 (ISO-8859-1). Must be specified as
117              first argument.
118
119
120       --u16  Treat identifier string options as  strings  encoded  in  16-bit
121              OSTA  Compressed  Unicode  format without leading Compression ID
122              byte, which is equivalent to UTF-16BE. Note that it is not  pos‐
123              sible  to  include  zero byte in command line options, therefore
124              any character which has at least one zero byte  cannot  be  sup‐
125              plied (this applies to all Latin1 characters). Must be specified
126              as the first argument.
127
128
129       --utf8 Treat identifier string options as  strings  encoded  in  UTF-8.
130              Must be specified as the first argument.
131
132

UDF LABEL AND UUID

134       UDF  specification  does  not  say  anything  about a disk label but it
135       describes that UDF Logical Volume Identifier is an extremely  important
136       field  for media identification in a jukebox as that field is displayed
137       to the user. And based on this statement it is a  common  practice  for
138       the  majority  of UDF implementations to use UDF Logical Volume Identi‐
139       fier as a UDF disk label.
140
141       UDF specification does not have a  concept  of  disk  UUID  like  other
142       filesystems.  But  mandates  that the first 16 characters of UDF Volume
143       Set Identifier are unique, a non-fixed and a  non-trivial  value.  Plus
144       first eight characters are hexadecimal digits. Windows application for‐
145       mat.exe and Mac OS X application newfs_udf are known to  violates  this
146       requirement  and  set only the first 8 characters as unique (others are
147       fixed). Since, there are still a lot of UDF implementations  which  use
148       in  the  first  16 characters only hexadecimal digits and all compliant
149       UDF implementations have hexadecimal digits in the first 8  characters,
150       the  following algorithm for generating stable UUID was informally cho‐
151       sen and now is used by udftools, util-linux, grub2 and other projects:
152
153              0. If Volume Set Identifier has less then 8 characters then stop
154              with empty UUID
155              1.  Take  the first 16 bytes from UTF-8 encoded string of Volume
156              Set Identifier
157              2. If all bytes are hexadecimal digits then use their  lowercase
158              form as UUID
159              3.  If first 8 bytes are not all hexadecimal digits then convert
160              those 8 bytes to their hexadecimal representation (resulting  in
161              16 bytes) and use as UUID
162              4. Otherwise, compose UUID from two 8 byte parts:
163                     1.  part:  Use  the  lowercase  form of the first 8 bytes
164                     (which are hexadecimal digits)
165                     2. part: Convert next 4  bytes  (9.–12.  pos.)  to  their
166                     hexadecimal representation
167
168       Which  means  that this generated UUID has always 16 hexadecimal lower‐
169       case digits. In most cases, this UUID  matches  case-insensitively  the
170       first 16 characters of UDF Volume Set Identifier and for all disks com‐
171       pliant to the UDF specification the first 8 bytes of UUID matches case-
172       insensitively  the  first 8 characters of UDF Volume Set Identifier. In
173       that algorithm was chosen UTF-8 encoding because it is  the  only  com‐
174       monly  used  Unicode  transformation  to bytes with fixed points in all
175       hexadecimal digits.
176
177

EXIT STATUS

179       udflabel returns 0 if successful, non-zero if there are  problems  like
180       block device does not contain UDF filesystem or updating failed.
181
182

LIMITATIONS

184       udflabel  is  not  able to set new Label, Logical Volume Identifier and
185       File Set Identifier for disks with Virtual Allocation  Table  (used  by
186       Write Once media).
187
188       udflabel  prior  to version 2.2 was unable to print and process Unicode
189       strings with code points above U+FFFF correctly. When option --utf8 was
190       specified then input strings were limited to 3-byte UTF-8 sequences and
191       when option --u16 was specified then input strings were limited just to
192       UCS-2BE strings (subset of UTF-16BE).
193
194       udflabel  prior  to  version 2.2 ignored UDF SoftWriteProtect and Hard‐
195       WriteProtected flags and overwritten such disks without any notice.
196
197       udflabel prior to version 2.2 was not able to set a new Label,  Logical
198       Volume  Identifier and File Set Identifier for disks with Metadata Par‐
199       tition (used by UDF revisions higher then 2.01).
200
201       udflabel prior to version 2.1 was not able to read Label  correctly  if
202       the  disk  had  Virtual  Allocation Table stored outside of Information
203       Control Block.
204
205

AUTHOR

207       Pali Rohár <pali.rohar@gmail.com>
208
209

AVAILABILITY

211       udflabel is part of the udftools  package  since  version  2.0  and  is
212       available from https://github.com/pali/udftools/.
213
214

SEE ALSO

216       mkudffs(8), pktsetup(8), cdrwtool(1), udfinfo(1), wrudf(1)
217
218
219
220Commands                           udftools                        UDFLABEL(8)
Impressum