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.
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 comment thread