[Top][All Lists]

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

Re: [Bug-xorriso] Updating iso files

From: Thomas Schmitt
Subject: Re: [Bug-xorriso] Updating iso files
Date: Sat, 11 Aug 2018 23:06:34 +0200


Vincent wrote:
> everything I could find on the net regarding iso files is that they are read
> only. However, after coming across the xorriso man page it looks like it
> might be possible to modify iso files, though I rarely see USB devices
> mentioned.

An USB stick or a data file can well perform the random access writing
as is appropropriate for a DVD+RW. So yes, xorriso can operate directly
on USB sticks.

> If you dd this file to an USB stick could you later update files either
> directly in the iso file or by sort of appending new files and hiding the
> older versions?

Not directly but by appending a new superblock, directory tree, and the
data blocks of newly introduced or changed data files.

>  am wondering if you could update the kernel, initrd
> without creating a  completely new iso file?

Yes. See man 1 xorriso, example "Manipulate an existing ISO image on the
same medium". Online:

You would replace "/dev/sr2" by e.g. "stdio:/dev/sdc".
The prefix "stdio:" tells xorriso that you are aware that this is not
an optical drive but possibly a valuable hard disk.

Triple check your device address. Consider to write into
ban commands for your precious disks like
  -drive_class banned   /dev/sda*
  -drive_class banned   /dev/sdb*

There remain potential obstacles with Live operating system ISOs:

- They often contain checksum lists of the data files. You'd need to
  update those lists or cryptographically sign changed files.

- The files in such an ISO are not independent. Your change may not
  break the expectations of the unchanged files.

- Bootability may become tricky to keep. With EFI there is a partition
  table involved. You will have to test whether a xorriso run preserves
  by default those aspects of the boot equipment which the computer
  firmware needs to boot the USB stick.
  If it does not boot after the xorriso, then you will have to tell me
  where to find the ISO for examination.

> It would be even more useful to
> do the same for the squashed file system without creating a new one

Theoretically it would be possible to have the data blocks of a file
in several different sessions. But xorriso does not do that. It always
adds whole data files.

So if you change the biggest data file in the ISO, a freshly repacked
ISO may be needed. xorriso can help with that, too. Ask for advise if
you decide to go that way.

Have a nice day :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]