Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

About images larger than 4 GB #8

Closed
sxueck opened this issue Feb 17, 2023 · 8 comments
Closed

About images larger than 4 GB #8

sxueck opened this issue Feb 17, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@sxueck
Copy link

sxueck commented Feb 17, 2023

hi, I've found options for packaging images larger than 4g, perhaps we could use the cdrtools toolkit as a dependency, which provides an enhanced version of mkisofs, (supporting ISO9660 v 2) that would seamlessly replace the old mkisofs

PS:
https://downloads.sourceforge.net/cdrtools/

@nerun
Copy link
Owner

nerun commented Feb 18, 2023

Hi @sxueck,

Have you tried adding the -iso-level 3 option when using mkisofs or genisoimage? Apparently it allows ISO images larger than 4 GiB. This solution was adopted in PinguyBuilder. I will test it and add by default if works.

About cdrtools / mkisofs, these packages are not available in Debian repositories. In Debian 11 repos the package mkisofs is just a virtual package. In an installed Debian system mkisofs is a softlink link to genisoimage. The same thing happens in Linux Mint 21.1 (which i use).

@nerun nerun self-assigned this Feb 18, 2023
@nerun nerun added the enhancement New feature or request label Feb 18, 2023
@nerun
Copy link
Owner

nerun commented Feb 19, 2023

I have tested genisoimage and i was able to create an ISO image larger than 4GiB even without option -iso-level 3. I will study genisoimage changelog looking for a mention of this issue, maybe dev team has fixed it.

In addition, instead of the dichotomy cdrtools/mkisofs and cdrkit/genisoimage maybe we just should starting using xorrisofs as suggested by Debian.

@nerun
Copy link
Owner

nerun commented Feb 19, 2023

For the record: this discussion iso9660 limitation to 4GB in use with remastersys in KDE forum is also very interesting.

Also, from Remastersys old site: The 4GB limit explained - not a remastersys limitation

@nerun
Copy link
Owner

nerun commented Feb 19, 2023

This ends this discussion: Wikipedia: ISO9660.

It's very clear that ISO9660 was updated and no longer have a limit of 4GiB for both filesystems (a.k.a. image size) and single files (the ones inside image).

Under Specifications, Directories and files:

All numbers in ISO 9660 file systems except the single byte value used for the GMT offset are unsigned numbers. 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 InfraRecorder, ImgBurn and mkisofs as well as Roxio Toast 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.

It's obvious that filesystem and single files size are now limited to 8 TB (8,000 GB), what is 2 thousand more than previous 4 GiB limitation. Also, USB keys can be formated in exFAT (128 TB limit) instead of FAT32 (4 GB limit).

As far as I'm concerned, I'll add the iso-level option by default and keep the genisoimage with option to use xorrisofs. Manual pages of genisoimage show support to iso-level 3 and 4.

I have no intention or interest in adding support for software that is not available by default in the Debian (or Ubuntu/Mint) repositories.

@nerun nerun changed the title about package large 4G images About images large than 4 GiB Feb 19, 2023
@nerun nerun pinned this issue Feb 19, 2023
@nerun nerun changed the title About images large than 4 GiB About images larger than 4 GB Feb 19, 2023
@sxueck sxueck closed this as completed Feb 20, 2023
@sxueck
Copy link
Author

sxueck commented Feb 20, 2023

Yes that's right, I was just offering a thought, it would of course be best to use software included in the mirror source, using self-compiled software is arguably the "worst / bad" option, but of course compared to the 4g limit it might be slightly better, and finally thank you for choosing to reply over the weekend.

Also there seems to be a difference between 3 and 4 in iso-level, I found it when I was experimenting with my own machine, I may need to look it up.

@sxueck sxueck reopened this Feb 20, 2023
@nerun
Copy link
Owner

nerun commented Feb 20, 2023

Yeah, i dont know what is better, level 3 or 4. You are welcome. Thank you.

@sxueck
Copy link
Author

sxueck commented Feb 20, 2023

I get it,here offical man help documation

With level 1, files may only consist of one section and filenames are restricted to 8.3 characters.

With level 2, files may only consist of one section.

With level 3, no restrictions (other than ISO-9660:1988) do apply.
With all iso9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_). The maximum filename length is restricted to 31 characters, the directory nesting level is restricted to 8 and the maximum path length is limited to 255 characters.

Level 4 officially does not exists but mkisofs maps it to ISO-9660:1999 which is ISO-9660 version 2.
With level 4, an enhanced volume descriptor with version number and file structure version number set to 2 is emitted. There may be more than 8 levels of directory nesting, there is no need for a file to contain a dot and the dot has no more special meaning, file names do not have version numbers, the maximum length for files and directory is raised to 207. If Rock Ridge is used, the maximum ISO-9660 name length is reduced to 197.

iso-level 4 is the v2 version I'm talking about and should be the one you see here

@nerun
Copy link
Owner

nerun commented Feb 20, 2023

Fully implemented in: f189229.

@nerun nerun closed this as completed Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants