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

Re: I know Wheezy is ancient but...



Am 22.05.19 um 14:36 schrieb andy pugh:
> All I am really trying to do is create an exact copy of the existing ISO
> with the /etc/apt/sources.list pointing at the archive server rather than
> at a non-existent URL.
> is it possible to just edit a file inside a .iso image? I imagine it isn't
> trivial as everything is zipped up.

It's a multi-step process, but it is doable. A rough overview of the
steps required:

You loop-mount the ISO so you can access its contents.

Then, as root, you use unsquashfs to unpack the squashfs file to a
writable directory.

That will give you a writable copy of the live-system's file system
(without the RAMdisk overlay, etc. - of course), where you can
add/change/delete files.

If you also want to install or remove packages, you should bind-mount
/proc, /sys, /dev and possibly other directories required by apt/dpkg
and the package management's preinstall/postinstall scripts; after that,
you can chroot into that directory.

After you're done, umount your bind-mounts, and use mksquashfs to create
a new squashfs file.

Then you need to recreate the ISO (genisoimage or xorriso), and make
sure to add the files required to boot from it as well.

Creating an image that can be booted from CD/DVD as well as from a USB
device is possible with xorriso, but not with genisoimage.

I'm sure if you have questions regarding the details of one of the
steps, you'll find help on this list.

Kind Regards,
Stefan Baur


Reply to: