LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Modifying an ISO image before burn (https://www.linuxquestions.org/questions/linux-software-2/modifying-an-iso-image-before-burn-444549/)

ScottReed 05-13-2006 10:10 PM

Modifying an ISO image before burn
 
I've been tinkering with the Slax Live CD and want to add some modules to the /modules folder BEFORE I burn the ISO.

I found a tool for modifying an ISO called MySlax Creator, but its Windows based only.

Can anyone give me some direction as to how to modify ISO's before burning?

Thanks,
Scott

jiml8 05-13-2006 10:25 PM

You can establish a mountpoint and mount the iso, but you can't change it because it is the iso9660 filesystem which is read only.

So what you will need to do is mount the iso then copy all the contents of the iso to a standard directory (presumably ext2 or ext3). Make your changes, then use something like k3b to create a new iso.

You can mount the iso by creating a mountpoint, for instance as root:

mkdir /mnt/isomnt

Then mount -o loop -t iso9660 myiso.iso /mnt/isomnt.

Then create a new directory someplace;

mkdir ~/newisodir

Now, enter the iso

cd /mnt/isomnt

From this point copy everything to ~/newisodir, then cd to newisodir, make your changes, and start k3b.

Unmount the iso file, delete it, create a new one using k3b and the contents of newisodir, and you're done.

haertig 05-14-2006 12:47 AM

If you're going to be doing much of this, look into unionfs. It will save you some disk space - you only need room for the original iso and your changes. jiml8's method is more standard, but you will need twice the disk space (to store the original iso, and again to store you modified copy). Slax is so small that this disk space is negligable, so the real reason to use unionfs is because it's cool!

I have a base slax directory: /var/slax506kb-standard
Changes I make to it are stored here: /var/slax506kb-patches
And the final result (where I burn from, and write to) is here: /var/slax

I never write directly to the -standard or -patches directory, all writes, deletes, etc. are to /var/slax. They automatically go to the -patches directory. The -standard directory remains virgin slax. This is all after I run the unionfs mount command:
Code:

mount -t unionfs -o dirs=/var/slax506kb-patches:/var/slax506kb-standard=ro none /var/slax
The above description probably makes zero sense unless you know what unionfs is, and what it can do. Check unionfs capabilities out here: http://www.linuxjournal.com/article/7714 If you like it, download from here: http://www.fsl.cs.sunysb.edu/project-unionfs.html Slax itself uses unionfs, as does Knoppix, Kanotix, and probably most LiveCD distros these days.

ScottReed 05-14-2006 10:07 AM

thanks for both of your replies. both make sense, and are extremely helpful.

Scott


All times are GMT -5. The time now is 01:34 PM.