[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mounting ISO9660 read-write?



Grant Edwards wrote:
>>I've tried a couple of iterations of mount with no success. Any
>>ideas? Is there some property of the CD image that keeps me
>>from mounting it read-write?
>
>
> IIRC, the last time I looked into this, a 9660 filesystem can't
> be mounted r/w under Linux.  The entire design of the
> filesystem's structure is predicated on the assumption that
> it's read-only, and it would take a lot of work to make it
> writable (e.g. you may have to shuffle the whole fs around
> everytime a write happens).
>
> What I do is:
>
>  1) mount it r/o
>  2) duplicate it using cp -a or tar
>  3) modify the copy
>  4) create a new ISO image.
>
> That's fine for small filesystems, but for a full CD, it's a
> royal PITA. If anybody knows an easier way, pipe up...
>
Hi Guys,

The way I have managed to alter an iso to reburn is to use exclude flags
in mkisofs, where i have the replacement files in a separate directory
with the same file hierarchy, you can then use the ignore option on the
original file and include the new path in the creation of the new iso. I
can't recall the exact options but it went something like this, x for
exclude, b for boot file, ie the file used for booting the original iso,
original_iso_path is the original iso, replacement_path has the
replacement for badfile.xxx (RTFM to be sure 'cause its been a while
since I tried it. If it is a Debian CD I am not sure what happens with
the MD5 sum (or whether it is checked automatically at install)... it
may need recalculation and replacement.):

mkisofs -o outfile.iso -x original_iso_path/badfile.xxx -b
original_iso_path/boot.file original_iso_path/ replacement_path/

(plus any other options required, like rockridge etc.)

HTH
Barney.

PS. obviously, the original CD can probably be just mounted and not
ripped to an iso initially.

PPS. the -graft-points might be useful also, I just noticed it in the
man page.



Reply to: