UDFLABEL(8)
π NAME π
okay so udflabel(8) from the System Manager's Manual is literally here to show or change a UDF filesystem label. bestie, it's giving filesystem label main character energy. π
π SYNOPSIS π
udflabel [encoding-options] [block-options] [identifier-options] device
[new-label]
πΈ DESCRIPTION πΈ
When udflabel is invoked without identifier-options and without specifying new-label, then it shows the current label of the UDF filesystem on device to standard output, terminated by a new line. Otherwise it updates the UDF filesystem (up to the revision 2.60) on device with the new specified identifiers from identifier-options. Specifying new-label is a synonym for both --lvid and --vid, see section UDF LABEL AND UUID. periodt. π
β¨ OPTIONS β¨
π GENERAL OPTIONS π
-h,--helpβ Display the usage and the list of options. slay, the classic lil helper. β¨
π§± BLOCK OPTIONS π§±
-b,--blocksize=block-size β Specify the size of blocks in bytes. Valid block size for a UDF filesystem is a power of two in the range from512to32768and must match a device logical (sector) size. If omitted,udflabeltries to autodetect block size. First it tries logical (sector) size and then all valid block sizes. π--startblock=start-block β Specify the block location where the UDF filesystem starts. It is used for calculating the block location of the Volume Recognition Sequence (32 kBafter the start block) and the first Anchor Volume Descriptor Pointer (256blocks after the start block).
Normally start block is 0, but for Multisession UDF optical discs it is the block location where the last session of Multisession UDF disc starts.
If omitted, udflabel for optical disc tries to detect start block of the last session from disc Table Of Contents. Otherwise value 0 is used.
For accessing some previous session of Multisession UDF optical disc, it is required to specify correct block where that previous session starts. And also to specify where that session ends via --lastblock option.
For Multisession UDF disc images stored in file there is no way to detect where the last session starts and therefore it is necessary to specify the correct start block location manually from the original optical disc Table Of Contents.
(Option available since udflabel 2.3) π
--lastblock=last-block β Specify the block location where the UDF filesystem ends. It is used for calculating the block location of second and third Anchor Volume Descriptor Pointer (256blocks prior the last block and the last block itself).
Normally last block is number of disk blocks minus one, but for Multisession UDF optical discs when reading different session than the last one (specified by --startblock) it is the block location where the specified session ends.
If omitted, udflabel for optical disc tried to detect the last recorded block with fallback to the last block of device or disk file image.
For accessing some previous session of Multisession UDF optical disc, it is required to specify correct value for both --startblock and --lastblock options.
(Option available since udflabel 2.3) π
--vatblock=vat-block β Specify the block location of the Virtual Allocation Table. Virtual Allocation Table is present only on UDF disks with Virtual Partition Map and must be at the last written/recorded disk block.
If omitted, udflabel for optical disc tries to detect the last recorded block with fallback to the last block of block device or disk file image or block specified by --lastblock. In most cases, this fallback does not have to work and for disk file images with Virtual Allocation Table it is necessary to specify the correct location.
Virtual Allocation Table contains Logical Volume Identifier (UDF Label). π¦
--forceβ Force updating UDF disks without write support or write protected UDF disks. Some UDF disks may have set write protect flag. Some media, likeCD-ROM,DVD-ROMorBD-ROMare read-only. Other media, likeCD-RWorDVD-RW, are write-once. UDF is designed also for such media where updating Label or Identifiers is not possible. But in some rare cases, it could make sense to try and overwrite the existing Label or Identifiers also for UDF filesystem which has Access Type either Read-Only or Recordable (Write-Once). This is possible only if underlying media supports overwriting. E.g. UDF image ofCD-ROMstored on hard disk or Read-Only UDF image burned toDVD-RAMorBD-REdiscs. Option--forceignores UDF Access Type and treats it as Overwritable. Also it ignores UDF SoftWriteProtect and HardWriteProtected flags. π this is giving risky but iconic.-n,--no-writeβ Not really, do not write to device. Just simulate and display what would happen with device. Useful for determining which UDF blocks would be overwritten. no cap, it's the safe lil preview vibe. π
π IDENTIFIER OPTIONS π
-u,--uuid=uuid β Specify the UDF uuid. Must be exactly16hexadecimal lowercase digits and is used for first16characters of--fullvsidoption. Special valuerandomgenerates new uuid from local time and a random number. See sectionUDF LABEL AND UUID. π--lvid=new-logical-volume-identifier β Specify the new Logical Volume Identifier. β¨--vid=new-volume-identifier β Specify the new Volume Identifier. πΈ--vsid=new-volume-set-identifier β Specify the new17.β127.character of Volume Set Identifier. See sectionUDF LABEL AND UUID. π--fsid=new-file-set-identifier β Specify the new File Set Identifier. π¦--fullvsid=new-full-volume-set-identifier β Specify the new Volume Set identifier. Overwrite previous--uuidand--vsidoptions. See sectionUDF LABEL AND UUID. π--owner=new-owner-name β Specify the new Owner name, person who created the medium or filesystem. It is stored in UDF Logical Volume Info1, part of UDF Implementation Use Volume Descriptor. (Option available sinceudflabel 2.3) π«Ά--organization=new-organization-name β Specify the new Organization name responsible for creating the medium or filesystem. It is stored in UDF Logical Volume Info2, part of UDF Implementation Use Volume Descriptor. (Option available sinceudflabel 2.3) π--contact=new-contact-information β Specify the new Contact information for the medium or filesystem. It is stored in UDF Logical Volume Info3, part of UDF Implementation Use Volume Descriptor. (Option available sinceudflabel 2.3) π--appid=new-application-identifier β Specify the new Application Identifier which identifies application that created medium or filesystem. It is stored in UDF Primary Volume Descriptor. This identifier can be empty or must start with*and contain only7bit ASCIIcharacters. (Option available sinceudflabel 2.3) β--impid=new-developer-identifier β Specify the new Developer Identifier for Implementation Identifier. It is unique identification of the implementation which created medium or filesystem. It is stored in UDF Primary Volume Descriptor. This identifier must start with*and contain only7bit ASCIIcharacters. (Option available sinceudflabel 2.3) π₯
π€ ENCODING OPTIONS π€
--localeβ Treat identifier string options as strings encoded according to current locale settings (default). Must be specified as the first argument. π--u8β Treat identifier string options as strings encoded in 8-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent to Latin1 (ISO-8859-1). Must be specified as first argument. πΈ--u16β Treat identifier string options as strings encoded in 16-bit OSTA Compressed Unicode format without leading Compression ID byte, which is equivalent toUTF-16BE. Note that it is not possible to include zero byte in command line options, therefore any character which has at least one zero byte cannot be supplied (this applies to all Latin1 characters). Must be specified as the first argument. π«Ά--utf8β Treat identifier string options as strings encoded inUTF-8. Must be specified as the first argument. π
π UDF LABEL AND UUID π
Okay so bestie, the UDF spec literally never says anything about a disk label? But it does say that the UDF Logical Volume Identifier is an extremely important field for media identification in a jukebox, because that's the field that gets shown to the user. And based on that, it's just common practice for basically every UDF implementation to use the UDF Logical Volume Identifier as the UDF disk label. Slay.
Now, UDF doesn't have the whole disk UUID concept like other filesystems. But it does mandate that the first 16 characters of the UDF Volume Set Identifier are unique, non-fixed, and non-trivial. Plus the first eight characters have to be hexadecimal digits. Windows application format.exe and Mac OS X application newfs_udf are known to violate this requirement and only set the first 8 characters as unique (the rest are fixed). And since there are still a lot of UDF implementations that use only hexadecimal digits in the first 16 characters, and all compliant UDF implementations have hexadecimal digits in the first 8 characters, the following algorithm for generating a stable UUID was informally chosen and is now used by udftools, util-linux, grub2, and other projects:
0. If Volume Set Identifier has less then 8 characters then stop
with empty UUID
1. Take the first 16 bytes from UTF-8 encoded string of Volume
Set Identifier
2. If all bytes are hexadecimal digits then use their lowercase
form as UUID
3. If first 8 bytes are not all hexadecimal digits then convert
those 8 bytes to their hexadecimal representation (resulting in
16 bytes) and use as UUID
4. Otherwise, compose UUID from two 8 byte parts:
1. part: Use the lowercase form of the first 8 bytes
(which are hexadecimal digits)
2. part: Convert next 4 bytes (9.β12. pos.) to their
hexadecimal representation
Which means this generated UUID always has 16 hexadecimal lowercase digits. In most cases, this UUID matches case-insensitively the first 16 characters of the UDF Volume Set Identifier, and for all disks compliant to the UDF specification, the first 8 bytes of the UUID match case-insensitively the first 8 characters of the UDF Volume Set Identifier. They chose UTF-8 encoding for this algorithm because it's the only commonly used Unicode transformation to bytes with fixed points in all hexadecimal digits. Iykyk. π
π¦ EXIT STATUS π¦
udflabel returns 0 if successful, and non-zero if there are problems β like the block device does not contain a UDF filesystem, or the updating failed. No cap, that's the vibe check. π
β οΈ LIMITATIONS β οΈ
udflabelis not able to set new Label, Logical Volume Identifier and File Set Identifier for disks with Virtual Allocation Table (used by Write Once media). πudflabelprior to version2.3was unable to handle Multisession UDF discs correctly. It always accessed only the first session (the oldest one) and not the last session (the most recent). Imagine that. πudflabelprior to version2.2was unable to print and process Unicode strings with code points aboveU+FFFFcorrectly. When option--utf8was specified, then input strings were limited to 3-byte UTF-8 sequences, and when option--u16was specified, then input strings were limited just to UCS-2BE strings (subset of UTF-16BE). Ancient history, bestie.udflabelprior to version2.2ignored UDFSoftWriteProtectandHardWriteProtectedflags and overwritten such disks without any notice. That's literally so dangerous, do not recommend. π¨udflabelprior to version2.2was not able to set a new Label, Logical Volume Identifier and File Set Identifier for disks with Metadata Partition (used by UDF revisions higher then2.01). Glow-up era.udflabelprior to version2.1was not able to read Label correctly if the disk had Virtual Allocation Table stored outside of Information Control Block. Fixed now though, periodt.
βοΈ AUTHOR βοΈ
This iconic piece of software was written by Pali RohΓ‘r <pali.rohar@gmail.com>. Give them their flowers, bestie. ππ
π¦ AVAILABILITY π¦
udflabel is part of the udftools package since version 2.0 and is available from https://github.com/pali/udftools/. Go get it. ποΈβ¨
π SEE ALSO π
That's the whole page, bestie! This manual page comes from the udftools package, section 8 (UDFLABEL(8)) β the footer didn't give a date, so consider it timeless. ππ¦πΈ
π¦ where this page comes from
- alpine 3.24: udftools-doc 2.3-r2 Β· GPL-2.0-or-later
- arch rolling: udftools 2.3-3 Β· GPL
- debian bookworm: udftools 2.3-1 Β· GPL-2.0-or-later
- debian trixie: udftools 2.3-2 Β· GPL-2.0-or-later
- fedora 43: udftools 2.3-12.fc43 Β· GPL-2.0-or-later
- fedora 44: udftools 2.3-13.fc44 Β· GPL-2.0-or-later
- nixos 26.05: udftools 2.3
- nixpkgs unstable: udftools 2.3
- opensuse-leap 16.0: udftools 2.3-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: udftools 2.3-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: udftools 2.3-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: udftools 2.3-160000.2.2 Β· GPL-2.0-or-later
- ubuntu jammy: udftools 2.3-1 Β· GPL-2.0-or-later
- ubuntu noble: udftools 2.3-1build2 Β· GPL-2.0-or-later
- ubuntu questing: udftools 2.3-2
- ubuntu resolute: udftools 2.3-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: udftools 2.3-2build1 Β· GPL-2.0-or-later
- Copyright (C) 2017-2021 Pali RohΓ‘r <pali.rohar@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms