Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

71%
+3 −0
Q&A How to add a file to a >5GB bootable UDF ISO?

I have a moderately large ISO image (>5 GB)[1] to which I want to add a single file[2], and I want to do that on Linux (preferably using only software which is available in Debian's main and con...

0 answers  ·  posted 7mo ago by Canina‭

Question linux
#1: Initial revision by user avatar Canina‭ · 2023-10-20T17:55:42Z (7 months ago)
How to add a file to a >5GB bootable UDF ISO?
I have a moderately large ISO image (>5 GB)[^1] to which I want to add a single file[^2], and I want to do that on Linux (preferably using only software which is available in Debian's *main* and *contrib* sections). I also need to do so without breaking the bootability of the image.

After a lot of web searching, I found out that `xorriso` should be able to do exactly that, using either its `-add` or `-map` commands in combination with `-dev` or `-indev` to start from the existing ISO image, and I eventually settled on:

    $ xorriso -dev ./original.iso -update autounattend_specific.xml autounattend.xml -outdev /tmp/modified.iso -commit

This appears to successfully read the original ISO:

    Drive current: -dev './original.iso'
    Media current: stdio file, overwriteable
    Media status : is written , is appendable
    Boot record  : El Torito
    Media summary: 1 session, 2852630 data blocks, 5572m data, 4091g free
    Volume id    : 'CCCOMA_X64FRE_EN-US_DV9'

It also reports that the file is added, but then:

    Drive current: -outdev '/tmp/modified.iso'
    Media current: stdio file, overwriteable
    Media status : is blank
    Media summary: 0 sessions, 0 data blocks, 0 data, 15.5g free

and the output file created becomes 458752 bytes, which is clearly nowhere near large enough to contain the more than 5 GB of data from the original image. `xorriso` does note some issues relating to El-Torito and warns about them, but I get the feeling that my current problems aren't even related to that.

I do strongly suspect that I'm missing something, and that it's probably something obvious; but what?

More generally: **On Linux, how do I add a file to a bootable UDF ISO image and get a complete image file as output, while keeping the resulting image bootable?**


 [^1]: Specifically a Microsoft Windows 11 installation DVD image
 [^2]: Specifically the `autounattend.xml` file to automate installation