Hi,

i am the developer of xorriso.

The xorriso example shown produces a bootable ISO 9660 image,
which can either be burned to CD, DVD, or Blu-ray, or can be copied
to a hard-disk-like storage device, e.g. an USB stick.

The question here is about Ubuntu on a Trisquel forum.
So i'll answer by an Ubuntu example with pointing out differences
in the Trisquel ISO
  http://mirror.fsf.org/trisquel-images/trisquel-netinst_7.0_amd64.iso
It has similar boot equipment, except the lack of EFI USB stick booting
and the appended MBR partition 2 which contains an empty FAT filesystem.

With burn programs one has to take care that the image is burned
as is and not wrapped once more into a filesystem. Normally this
feature is called "image" burning in contrast to "projects".

  xorriso -as cdrecord -v dev=/dev/sr0 \
          "$HOME"/iso_mirrors/ubuntu_14.04_repacked.iso

When putting the ISO onto an USB stick, one has to use the base
device, e.g. /dev/sdc, and not some partition device (e.g. /dev/sdc1).
The image shall occupy the whole USB stick and not be copied into
a filesystem on the USB stick. It is advisable to first dd the whole
stick into a data file on disk before overwriting it by dd'ing the
ISO onto the stick base device.

  dd if=/dev/sdc | gzip >"$HOME"/iso_mirrors/dev_sdc_orig.gz

  dd if="$HOME"/iso_mirrors/ubuntu_14.04_repacked.iso bs=1M of=/dev/sdc

It would be interesting to learn what "startup CD creator" expects
as ISO and why it refuses on yours.

I cannot say much about
  https://help.ubuntu.com/community/InstallCDCustomization
except that the final ISO image production command makes the ISO
ready for booting only from CD, DVD, BD via BIOS. No USB stick,
no EFI without legacy emulation.

The xorriso command you found is more modern. It would match this
repack procedure

  # Create a playground directory
  mkdir "$HOME"/iso_mirrors

  # Get the ISOLINUX MBR template from the Ubuntu ISO image.
  # It will be needed when the new ISO gets packed up.
  dd if=ubuntu-14.04-desktop-amd64.iso bs=1 count=446 \
     of="$HOME"/iso_mirrors/ubuntu_14.04_isohdpfx.bin

  # Mount the ISO image and copy to a directory
  sudo mkdir /mnt/iso
  sudo mount -o loop ubuntu-14.04-desktop-amd64.iso /mnt/iso

  cp -a /mnt/iso "$HOME"/iso_mirrors
  mv "$HOME"/iso_mirrors/iso "$HOME"/iso_mirrors/ubuntu-14.04

  sudo umount /mnt/iso

  # >>> Now manipulate the files in "$HOME"/iso_mirrors/ubuntu-14.04
  # >>> as needed and appropriate.
  # >>> Sorry: I have no clue with that.
  # For testing the commands proposed her, just leave it unaltered and go on.

  # When all changes are done, pack up a new ISO
  xorriso -as mkisofs \
     -isohybrid-mbr "$HOME"/iso_mirrors/ubuntu_14.04_isohdpfx.bin \
     -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 -isohybrid-gpt-basdat \
     -o "$HOME"/iso_mirrors/ubuntu_14.04_repacked.iso \
     "$HOME"/iso_mirrors/ubuntu-14.04

  # Try out with qemu as virtual CD-ROM
  qemu-system-x86_64 -enable-kvm -m 512 \
                     -cdrom "$HOME"/iso_mirrors/ubuntu_14.04_repacked.iso

  # ... as virtual USB stick
  qemu-system-x86_64 -enable-kvm -m 512 \
                     -hdb "$HOME"/iso_mirrors/ubuntu_14.04_repacked.iso

  # ... with EFI instead of BIOS
  qemu-system-x86_64 -enable-kvm -m 512 \
                     -bios /usr/share/ovmf/OVMF.fd \
                     ...-cdrom...or...-hdb...

The bootloaders used for BIOS and EFI differ (ISOLINUX versus GRUB2).
So the boot menus differ substantially.

With trisquel-netinst_7.0_amd64.iso the same commands apply.
But the name of the ISOLINUX boot image and of the boot catalog file
differ. So xorriso needs slightly different arguments.
Ubuntu:
     -c isolinux/boot.cat \
     -b isolinux/isolinux.bin \
Trisquel:
     -c boot.cat \
     -b isolinux.bin \

The above xorriso example does not append the partition with empty FAT
filesystem. One could do by xorriso -as mkisof option -append_partition.
But currently i do not see the reason for its existence.

Booting via EFI (qemu + OVMF) does not work for me with the Trisquel ISO.
It ends up at a GRUB2 prompt. Insofar booting succeeded. But GRUB2 offers
no menu. Improvement over original Trisquel ISO: it boots to GRUB2 from
quemu -hdb. The original boots only from qemu -cdrom.


Have a nice day :)

Thomas

Reply via email to