How to multisession a disc with UDF only?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
HyperBear
Level 2
Level 2
Posts: 65
Joined: Thu May 04, 2023 3:39 am

How to multisession a disc with UDF only?

Post by HyperBear »

The multisessioning tool growisofs can create UDF file systems that co-exist with ISO9660, but can not continue a UDF-only file system. mkudffs can only create new UDF file systems, not burn new sessions to a disc based on an existing UDF file system.

Is there any tool for Linux that can multisession an UDF-only file system?

I am not talking about packet writing.

Why not just use UDF? UDF because it doesn't downgrade file names (example below) and has no 2 GB limit.

I started a multisession disc using:

Code: Select all

growisofs -Z /dev/sr1 -iso-level 3 -full-iso9660-filenames -allow-limited-size  -udf -V "volume name" "folder to be written to disc"
(volume and folder name changed)

In the command, I forgot to specify -r for Rock Ridge (which allows preserving original file names and supports Unix-like permissions), and the ISO9660 tree only contains garbage uppercase-only file names like EXAMPLE_NAME.MP4. In addition, ISO9660 appears to have a 2 GB file size limit (after all, it was made for 700 MB CD-ROMs). Rock Ridge and Joliet don't get around the 2 GB limit because they are not standalone file systems, only extensions for ISO9660, so UDF is required to store files above 2 GB.

Therefore, it would be desirable to create the next session on the disc based on the existing UDF file system. But it appears growisofs does not do that.

Instead, growisofs appears to re-generate the UDF file tree from the ISO9660 file tree when resuming sessions. Therefore, it is not possible to create a new session without losing files over 2 GB and losing the original file names.

The -allow-limited-size allows files that exceed 2 GB to be referenced from the ISO9660 tree, but with an incorrect size. Wikipedia suggests the file size limit is 4 GB and "ISO 9660 Level 3" can get around this with duplicate entries of the same file, but if that is true, growisofs and genisoimage have not implemented it.

How to resume a multisession disc based on the UDF tree?

----

For reference, ISO9660 is the file system created for CD-ROMs where as UDF is far more modern and was made for DVDs but is also used on Blu-rays due to its futureproofness. Both file systems can co-exist on the same disc (UDF bridge format).
scdbackup
Level 3
Level 3
Posts: 118
Joined: Thu Jun 04, 2015 2:00 am

Re: How to multisession a disc with UDF only?

Post by scdbackup »

Hi,

(I answered the same question on
https://www.linuxquestions.org/question ... ?p=6522412
which makes the same incorrect claims about ISO 9660 size limits.
This is a shorter version of my answer, without quoting
https://en.wikipedia.org/wiki/ISO_9660# ... _and_files )

There is no 2GB limit in the ISO 9660 / ECMA-119 specification.
2 GiB was an old Linux limit when file size was stored in signed
32 bit integers.

The limit of "Level of interchange" 1 and 2 is 4 GiB - 1.
The limit for level 3 is the maximum size of an ISO 9660 filesystem,
i.e. nearly 8 TiB. This is achieved by having multiple directory records
for the same file name (aka multi-extent).

(Released xorriso has a filesystem limit of 4 TiB because of libburn
and own use of 32 bit signed integers. This will be raised to the
theoretical maximum of 8 TiB in the next release.)

Mounting and reading level 3 is supported at least by Linux and by
MS-Windows. If the operating system does not support multiple extents
then xorriso can still copy multi-extent files out of the ISO filesystem.

xorriso in its native command mode enables level 3 by default.
For its mkisofs emulation it uses the traditional default 1, which can
be overridden by option "-iso--level 3".

You are invited to try:

Code: Select all

# To address your DVD or Blu-ray dive as target device do:
iso=/dev/sr1
# But before using slow optical media, try with an image file on fast disk.
# (Make sure this file does not exist yet.)
iso=/...some.large.filesystem.../test.iso

# Choose some large test files
file1=/.../some_large_file
file2=/.../some_other_large_file

# Write first session
xorriso -outdev "$iso" -map "$file1" /file1

# Write second session
xorriso -dev "$iso" -map "$file2" /file2

# Mount on a GNU/Linux system
mount_point=/mnt/iso
sudo mount "$iso" "$mount_point"
ls -l "$mount_point"
You will see /mnt/iso/file1 and /mnt/iso/file2 with their large sizes
(as long as they are below 4 TiB, that is). Use "wc" to count their
bytes if you do not believe the sizes given by "ls -l".

Have a nice day :)

Thomas
Post Reply

Return to “Software & Applications”