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

Re: Editing Squeeze and Jessie distribution ISO's



Hi,

Richard Owlett wrote:
> I'm investigating creating customized installation DVD's &/or flash drives.
> [...]
>   1. the references I've found so far are years old.
>     a. any recent pages?
>     b. does it make a difference [possible side effects of adopting systemd]?

Possibly you have better chances with these questions on the
debian-cd mailing list. (Although i've recently seen Steve McIntyre
posting here.)
  https://lists.debian.org/debian-cd/

I personally know about the ISOs but not about the software
which boots up from them and installs Debian.


>   2. Is there a practical limit on the ISO file size?

The limit with libisofs is 4 TiB, because of some signed
32 bit integers in the API. Theoretically it could be 8 TiB.
Dunno whether the Linux kernel could stand it.


> It could be convenient
> to have all packages from the 13 DVD set of Jessie on the flash drive.

Looks like the collection now even bursts out of a single
50 GB Blu-ray. There are two ISOs in
  http://cdimage.debian.org/debian-cd/8.1.0/amd64/jigdo-dlbd/
(Nevertheless the possibly most convenient way to get everything
 in two large chunks.)


> My changes would be:
>   * custom preseed.cfg [goal for one user would be no installer questions]
>   * custom set of packages in pool directory.

If you exactly know what you want to achieve in the directory
tree of the ISO, then xorriso will be able to help.

I see two possible strategies:

- You describe the changes in the ISO in terms of remove, rename,
  add, or overwrite operations (the latter two from original files
  on hard disk).
  This would be for a new augmented ISO

     xorriso -indev original.iso -outdev new.iso -joliet on \
             ...editing.commands... ...bootability.commands...

  or for an enlargement of the original ISO

     xorriso -dev original.iso -joliet on \
             ...editing.commands... ...bootability.commands...

  We'd need to discuss what editing exactly you want to perform
  with the ISO. (man xorriso : -rm_r, -mv, -map or -add )

- You provide a directory tree on hard disk which contains all
  files from the bootable ISO image of a media set, plus all files
  which you want to add to it. Then you perform a conventional
  -as mkisofs run, like debian-cd does.
  This would be

     xorriso -as mkisofs -o new.iso -J ...bootability.options... \
             /path/to/prepared/directory/tree

The bootability options of -as mkisofs can be taken from the
Debian-specific file /.disk/mkisofs in the bootable ISO image
of the media set.
There are a lot of Jigdo related options which you will not
need and would be difficult to replay anyway.

The bootability options may also be read from such an ISO
by xorriso versions >= 1.4.0 (from a GNU xorriso source tarball).

For the first strategy, one asks for generic xorriso commands

  xorriso -hfsplus on -indev debian-8.1.0-amd64-netinst.iso \
          -report_el_torito cmd

For the second strategy one asks for xorriso -as mkisofs options:

  xorriso -hfsplus on -indev debian-8.1.0-amd64-netinst.iso \
          -report_el_torito as_mkisofs

which reports 

  -V 'Debian 8.1.0 amd64 1'
  --modification-date='2015060614194000'
  -isohybrid-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt,zero_apm:'debian-8.1.0-amd64-netinst.iso'
  -partition_cyl_align on
  -partition_offset 0
  -partition_hd_cyl 64
  -partition_sec_hd 32
  -apm-block-size 2048
  -c '/isolinux/boot.cat'
  -b '/isolinux/isolinux.bin'
  -no-emul-boot
  -boot-load-size 4
  -boot-info-table
  -eltorito-alt-boot
  -e '/boot/grub/efi.img'
  -no-emul-boot
  -boot-load-size 832
  -isohybrid-gpt-basdat
  -isohybrid-apm-hfsplus

Volume id (-V) and modification date might serve as disk label
or pseudo-UUID, which might be needed by the boot loader and
the first stages of the operating system. So better keep them
as they are in the bootable original ISO.
The little beauty "-isohybrid-mbr --interval:..." cuts out the
isohybrid MBR from the original ISO, cleans it a bit, and then
re-uses it for the new ISO.
(See also man 1 xorrisofs.)


Have a nice day :)

Thomas


Reply to: