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

Re: mkisofs (was: Installer image for installation via ssh)



Hi,

Curt wrote:
> > http://www.sgvulcan.com/2010/01/06/installing-debian-using-only-ssh/

Leandro Noferini wrote:
> In the article there is this command
>   mkisofs -o ../custom_install.iso -r -J -no-emul-boot -boot-load-size 4
>   -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat ../isonew
> But mkisofs does not exist in debian anymore.

As others said, these options are supposed to work with genisoimage
and with xorriso's mkisofs emulation.

They enable booting from CD or DVD, but not from USB stick.
Further they do not enable booting via EFI but only via legacy BIOS
or its emulation by EFI.

The xorriso arguments that were used to build a Debian installation ISO are
recorded in file /.disk/mkisofs of the ISO. 1048 characters, of which you
may omit the Jigdo specific options.
My renarration of this ISO production in the article is as follows:

  # The example names get mapped to their roles here
  orig_iso=/path/to/.../debian-9.3.0-amd64-netinst.iso
  mount_point=isoorig
  new_files=isonew
  new_iso=custom_install.iso
  mbr_template=isohdpfx.bin

The article proposes to do
  mount "$orig_iso" "$mount_point"
  mkdir "$new_files"
  rsync -a -H –exclude=TRANS.TBL "$mount_point"/ "$new_files"
and then to edit files underneath directory "$new_files".

Now for step 8, the mkisofs run.
We need an MBR template for booting via BISO from USB stick. The ISO bears
an MBR which will work fine with the rest of the ISOLINUX stuff in the ISO.
So we harvest this one by

  # Step 7 left us in "$new_files". Move up to parent.
  cd ..

  # Extract MBR template file to disk
  dd if="$orig_iso" bs=1 count=432 of="$mbr_template"

Now we can build the ISO

  xorriso -as mkisofs \
     -o "$new_iso" \
     -r -J -joliet-long \
     -V 'Debian 9.3.0 amd64 n' \
     -cache-inodes \
     -isohybrid-mbr "$mbr_template" \
     -c isolinux/boot.cat \
     -b isolinux/isolinux.bin \
       -boot-load-size 4 -boot-info-table -no-emul-boot \
     -eltorito-alt-boot \
     -e boot/grub/efi.img \
       -no-emul-boot -isohybrid-gpt-basdat \
     "$new_files"

The options of the mkisofs emulation of xorriso are explained in
  https://www.gnu.org/software/xorriso/man_1_xorrisofs.html


As for mkisofs, genisoimage, and xorriso:
- mkisofs fell into disgrace at Debian in 2006 because of the attitude
  of its developer
- genisoimage was then forked from a slighly older mkisofs version.
- xorriso was founded by me in 2007 as independent effort to integrate
  ISO 9660 production and CD/DVD/BD burning. It got a mkisofs emulation
  mode to keep migration effort low for the distros.

The (more or less former) maintainer of genisoimage lets xorriso do any
job that it can take over from genisoimage. (HFS for debian powerpc ISOs
is not in its repertoire, nor is UDF for DVD video.)


Have a nice day :)

Thomas


Reply to: