LinuxQuestions.org
Visit Jeremy's Blog.
Go Back LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
 Search this Thread
Old08-23-2024, 11:37 AM  #1
exerceo
Member
 
Registered: Oct 2022
Posts: 57

Rep: Reputation: 18
Question Is there any tool for multisessioning UDF on Linux?


[Log in to get rid of this advertisement]
While growisofs and genisoimage can create UDF file systems, they require the existence of an ISO9660 file system to resume a disc, meaning to create more than one session. It can not resume UDF-only file systems that have no co-existing ISO9660 tree. It also can not resume file systems that have files above 2 GB, which is a limitation of ISO9660. And xorriso can only work with ISO9660. mkudffs can, as the name implies, only create new UDF file systems.

Is there any multisessioning tool that can work with UDF-only discs?

I am not talking about packet writing (which is also poorly supported on Linux), but sequential multisession writing.

On Windows, there are plenty of tools for this since the 2000s: ImgBurn, Nero, CDBurnerXP. Please don't tell me nothing has been developed for this for Linux in over two decades.

(For reference, ISO9660 was made for CD-ROM, where as UDF for DVD and Blu-ray and any future media, since its file size limitation is in the exabyte realm.)
 
Old08-23-2024, 01:20 PM  #2
exerceo
Member
 
Registered: Oct 2022
Posts: 57

Original Poster
Rep: Reputation: 18
Exclamation Pre-empting question

Before anyone asks "Why don't you just use Rock Ridge?":

Rock Ridge is not a file system of its own. It is an extension for ISO9660. What it does is enable longer file names and Unix-style permissions (rwxrwxrwx), but it does not get past the 2 GB limit of ISO9660 (which was designed for 700MB CD-ROMs to begin with).

Joliet is also an extension for ISO9660, not a file system. Its official specification has a 64-character limit. However, it technically supports up to 103 characters according to Wikipedia, but some devices might not recognize file names beyond 64 characters (e.g. a DVD player I tested it with). Still, this is well below the 255 characters supported by Rock Ridge and UDF.

This means ISO9660 is useless for storing files beyond 2 GB. According to Wikipedia, the limit is 4.2 GB and duplicate entries of the same file can get past that limit, but growisofs and genisoimage appear to not have implemented this.

genisoimage and growisofs can create a hybrid file system where ISO9660 and UDF reference the same files. But they can only create multisession from ISO9660 file systems. It can not expand an existing UDF file system and can not convert UDF into a hybrid (ISO9660+UDF) file system.

In other words, you can not have both files over 2 GB and multisession. If you want to create a disc with files over 2 GB, you need to fill the entire disc in one go, or you waste any unused space.

Last edited by exerceo; 08-23-2024 at 01:53 PM. Reason: post was unfinished
 
Old08-23-2024, 06:22 PM  #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,204
Blog Entries: 6

Rep: Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862Reputation: 1862
https://www.man7.org/linux/man-pages...udfinfo.1.html
Search for Multisession.

I've never tried to make a multisession UDF disk.
 
Old08-24-2024, 01:22 AM  #4
scdbackup
Member
 
Registered: Oct 2013
Posts: 161

Rep: Reputation: Disabled
Hi,

exerceo wrote:
> Rock Ridge [...] does not get past the 2 GB limit of ISO9660

There is no such 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 overriden by option [code] -iso--level 3[code].


> According to https://en.wikipedia.org/wiki/ISO_9660#Directories_and_files
> the limit is 4.2 GB

No. It mentions 4.2 GB as limit for a single extent:

"* Level 3: [...] Files are also allowed to consist of multiple
non-contiguous sections (with some restrictions as to order).
[...]
As the length of a file's extent on disc is stored in a 32 bit value,
it allows for a maximum length of just over 4.2 GB (more precisely, one
byte less than 4 GiB). It is possible to circumvent this limitation
by using the multi-extent (fragmentation) feature of ISO 9660 Level 3
to create ISO 9660 file systems and single files up to 8 TB. With this,
files larger than 4 GiB can be split up into multiple extents
(sequential series of sectors), each not exceeding the 4 GiB limit.
For example, the free software such as [...] mkisofs [...] are able
to create ISO 9660 file systems that use multi-extent files to store
files larger than 4 GiB on appropriate media such as recordable DVDs.
[...] Linux supports multiple extents."


> In other words, you can not have both files over 2 GB and multisession.

You are invited to try:

Code:
# To address a DVD or Blu-ray dive as target device do:
iso=/dev/sr0
# 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
test -e "$iso" && rm "$iso"
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
 
2 members found this post helpful.
Old08-24-2024, 05:04 AM  #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,221

Rep: Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150Reputation: 4150
Thank you Thomas - nice to get real information rather than uninformed conjecture perpetrated yet again.
 
Old08-24-2024, 05:57 AM  #6
scdbackup
Member
 
Registered: Oct 2013
Posts: 161

Rep: Reputation: Disabled
Hi,

syg00 wrote:
> nice to get real information rather than uninformed conjecture
> perpetrated yet again.

There are reasons why people can get to these wrong assessments:

The web is full of misinformation, including references to the totally
outdated Linux file size limit of 2 GiB - 1.

exerceo, the original poster of this thread, possibly tried with growisofs
and genisoimage, which seems to indeed ignore option "-iso-level 3". See
https://www.linuxquestions.org/quest...ile-4g-581814/

I just verified that it indeed refuses on a file of 8 GiB
Code:
$ genisoimage -iso-level 3 -o test.iso file_of_8_GB
...
File file_of_8_GB is larger than 4GiB-1.
-allow-limited-size was not specified. There is no way do represent this file size. Aborting.
But as above old thread from 2007 mentions, mkisofs usually obeys this
option.

xorriso's mkisofs emulation obeys, too:
Code:
$ ls -l file_of_8_GB
-rw-r--r-- 1 ... ... 8086618112 Aug 24 12:14 file_of_8_GB

$ xorrisofs -iso-level 3 -o test.iso file_of_8_GB
...
Written to medium : 3948727 sectors at LBA 0
Writing to 'stdio:test.iso' completed successfully.

$ sudo mount test.iso /mnt/iso
...
mount: /dev/loop0 is write-protected, mounting read-only

$ ls -l /mnt/iso
total 7897088
-rw-r--r-- 1 ... ... 8086618112 Aug 24 12:14 file_of_8_GB

$ wc /mnt/iso/file_of_8_GB
  31087708  165244132 8086618112 /mnt/iso/file_of_8_GB
People who prefer to use growisofs for multi-session burning, instead
of native xorriso as shown in my previous post, may use xorrisofs
instead of genisoimage or mkisofs by:
Code:
export MKISOFS="xorrisofs"
export GENISOIMAGE="xorrisofs"
growisofs -Z /dev/sr0 -iso-level 3 ...options.and.input.files...
growisofs -M /dev/sr0 -iso-level 3 ...options.and.input.files...
Original growisofs looks at variable MKISOFS, Debian's at GENISOMAGE.
See
https://sources.debian.org/src/dvd%2...ode.patch/#L28

The Debian developer who forked genisoimage and wodim in 2006 meanwhile
deprecated both for most puposes. Only genisoimage runs with option "-udf"
or "-hfs", and exotic wodim CD write options like "-xa" or "-raw96r" are
still valid reasons to use these programs. Your mileage may vary.

Debian still makes its inofficial ISOs for the "powerpc" architecture
by genisoimage because they need option "-hfs". All official ISOs, e.g.
for "amd64", "i386", "arm64", are made by xorrisofs.

Have a nice day

Thomas

Last edited by scdbackup; 08-24-2024 at 06:15 AM. Reason: Replaced a filename by the one mentioned in the example
 
1 members found this post helpful.
OldToday, 03:18 PM  #7
exerceo
Member
 
Registered: Oct 2022
Posts: 57

Original Poster
Rep: Reputation: 18
Post udfinfo does not write any data

Quote:
Originally Posted by teckk View Post
https://www.man7.org/linux/man-pages...udfinfo.1.html
Search for Multisession.

I've never tried to make a multisession UDF disk.
udfinfo is, as the name implies, for showing information about a UDF file system. It does not write any data.

My goal is to write multisession data.

(I will respond to the other posts shortly, I just wanted to get this one out of the way.)
 
OldToday, 04:18 PM  #8
exerceo
Member
 
Registered: Oct 2022
Posts: 57

Original Poster
Rep: Reputation: 18
Lightbulb

Quote:
Originally Posted by scdbackup View Post
Hi,

exerceo wrote:
> Rock Ridge [...] does not get past the 2 GB limit of ISO9660

There is no such 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).
Then how come the growisofs manual states this?

Quote:
-allow-limited-size
When processing files larger than 2GiB which cannot be easily represented in ISO9660, add them with a shrunk visible file size to ISO9660 and with the correct visible file size to the UDF system. The result is an in‐
consistent filesystem and users need to make sure that they really use UDF rather than ISO9660 driver to read a such disk. Implies enabling -udf.
Is this an error?


Quote:
Originally Posted by scdbackup View Post
(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 overriden by option [code] -iso--level 3[code].
I see.

Quote:
Originally Posted by scdbackup View Post
> According to https://en.wikipedia.org/wiki/ISO_9660#Directories_and_files
> the limit is 4.2 GB

No. It mentions 4.2 GB as limit for a single extent:

"* Level 3: [...] Files are also allowed to consist of multiple
non-contiguous sections (with some restrictions as to order).
[...]
As the length of a file's extent on disc is stored in a 32 bit value,
it allows for a maximum length of just over 4.2 GB (more precisely, one
byte less than 4 GiB). It is possible to circumvent this limitation
by using the multi-extent (fragmentation) feature of ISO 9660 Level 3
to create ISO 9660 file systems and single files up to 8 TB. With this,
files larger than 4 GiB can be split up into multiple extents
(sequential series of sectors), each not exceeding the 4 GiB limit.
For example, the free software such as [...] mkisofs [...] are able
to create ISO 9660 file systems that use multi-extent files to store
files larger than 4 GiB on appropriate media such as recordable DVDs.
[...] Linux supports multiple extents."
But it appears genisoimage and growisofs don't make use of this ability.

Quote:
Originally Posted by scdbackup View Post
> In other words, you can not have both files over 2 GB and multisession.

You are invited to try:

Code:
# To address a DVD or Blu-ray dive as target device do:
iso=/dev/sr0
# 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
test -e "$iso" && rm "$iso"
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
Unfortunately, xorriso does not support UDF.

Nonetheless, thanks for your response, Thomas. These are interesting insights.
 
  


Reply

Tags
blu-ray, dvd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
ThreadThread StarterForumRepliesLast Post
Why is there still no support for creating UDF 2.5/2.6 images in Linux?TobiSGDLinux - Software405-21-2012 11:05 PM
Can't mount UDF Disks in CentOS - UDF-fs: No fileset foundspoovyLinux - Desktop405-29-2010 12:06 PM
is there any way to support for udf 2.5wyzgregLinux - Kernel109-05-2008 02:59 PM
Is there any Automated Test tool which works with Linux/Linux GUI?eposSUSE / openSUSE104-16-2008 03:08 AM
Is there a CD-RW UDF plugin for Linux?lectraplayerLinux - Newbie204-18-2003 10:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Open Source Consulting | Domain Registration