From a29a3c1c2937891ac64754b3aa8a6e60fb9819fe Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 27 Apr 2016 20:32:01 -0400 Subject: added efi test script successfully booted the generated isohybrid image on both EFI macbook pro and BIOS thinkpad; also qemu -cdrom and qemu -hda --- xorriso.test-efi.sh | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 xorriso.test-efi.sh diff --git a/xorriso.test-efi.sh b/xorriso.test-efi.sh new file mode 100755 index 0000000..99c60db --- /dev/null +++ b/xorriso.test-efi.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +outdev=test-efi.iso +indev=debian-live-8.4.0-amd64-standard.iso +volid=SamizdatLive +gpg_iso_path=gnupghome +gnupghome=gnupghome +secrets=secrets + +if [ $# = 0 ]; then + set -- debian-live-8.4.0-amd64-standard.btrfs layer.btrfs +fi + +for fs; do + [ -f "$fs" ] || exit 1 + shift + set -- "$@" "rootfs/${fs##*/}=$fs" +done + +die() { printf '%s\n' "$*"; exit 1; } + +make_gnupghome() +{ + [ -d "$gnupghome" ] && return + local reset=$- + set -e + [ ! -d "$gnupghome".tmp ] || die "Error: refusing to overwrite $gnupghome.tmp" + [ ! -d "$secrets".tmp ] || die "Error: refusing to overwrite $secrets.tmp" + mkdir -p "$gnupghome".tmp "$secrets".tmp + local PATH="$HOME"/src/samizdat/src:"$PATH" NO_USE_RAMFS=y + NEW_GNUPGHOME="$gnupghome".tmp SECRETS_DIRECTORY="$secrets".tmp ~/src/samizdat/src/samizdat-make-key --adam + mv "$secrets".tmp "$secrets" + mv "$gnupghome".tmp "$gnupghome" + set -$reset +} + +make_gnupghome + +set -ex + +# http://www.syslinux.org/wiki/index.php?title=Isohybrid +# xorriso -as mkisofs \ +# -o output.iso \ +# -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \ +# -c isolinux/boot.cat \ +# -b isolinux/isolinux.bin \ +# -no-emul-boot -boot-load-size 4 -boot-info-table \ +# -eltorito-alt-boot \ +# -e isolinux/efiboot.img \ +# -no-emul-boot \ +# -isohybrid-gpt-basdat \ +# CD_root + +# http://ftp.nluug.nl/os/Linux/distr/slackware/slackware64-current/isolinux/ +# http://ftp.nluug.nl/os/Linux/distr/slackware/slackware64-current/isolinux/efiboot.img + +xorriso \ + -drive_class clear_list all \ + -outdev "$outdev"~ \ + -report_about mishap \ + -return_with sorry 0 \ + -volid "$volid" \ + -pathspecs on \ + \ + \ + -add "${gpg_iso_path}=${gnupghome}" -- \ + -add linux=isolinux/linux -- \ + \ + \ + -as mkisofs -graft-points \ + -b boot/grub/i386-pc/eltorito.img \ + -no-emul-boot -boot-info-table \ + --embedded-boot /home/d/src/grb/rescue/embedded.img \ + --protective-msdos-label \ + boot=/home/d/src/grb/rescue/iso/boot + +# -add isolinux -- \ +# -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \ +# -isohybrid-gpt-basdat + +# -add boot/eltorito.img=/home/d/src/grb/rescue/iso/boot/grub/i386-pc/eltorito.img -- \ + +mv -f "$outdev"~ "$outdev" -- cgit v1.2.3