I'm trying to make a iso, based on Ubuntu 18.04, that boots in both Bios and UEFI mode. I have it booting in Bios mode but having a problem getting it booting in UEFI mode. When I burn it to a USB stick, I get a UEFI partition within the ISO9660 USB. When I try to boot it in UEFI mode I get a grub prompt.
Results of fdisk -l
larry@larry-Satellite-C55-A:~/foxclone$ fdisk -l foxclone025-02.iso
Disk foxclone025-02.iso: 660 MiB, 692060160 bytes, 1351680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x45d15306
Device Boot Start End Sectors Size Id Type
foxclone025-02.iso1 * 0 1351679 1351680 660M 0 Empty
foxclone025-02.iso2 276 5203 4928 2.4M ef EFI (FAT-12/16/32)
The method to create the EFI partition was:
#! /bin/sh
BOOT_IMG_DATA=$($HOME/foxclone/newiso -d)
BOOT_IMG=efi.img
mkdir -p $(dirname $BOOT_IMG)
truncate -s 4M $BOOT_IMG
mkfs.vfat $BOOT_IMG
mkdir -p $BOOT_IMG_DATA/efi/boot
grub-mkimage \
-C xz \
-O x86_64-efi \
-p /boot/grub \
-o $BOOT_IMG_DATA/efi/boot/bootx64.efi \
boot linux search normal configfile \
part_gpt btrfs fat iso9660 loopback \
test keystatus gfxmenu regexp probe \
efi_gop efi_uga all_video gfxterm font \
echo read ls cat png jpeg halt reboot
mcopy -i $BOOT_IMG -s $BOOT_IMG_DATA/efi ::
The method to build the iso was:
#!/bin/bash
orig_iso="$HOME"/foxclone/foxclone025-01.iso
new_iso="$HOME"/foxclone/foxclone025-02.iso
new_files=$HOME/foxclone/newiso
mbr_template=isohdpfx.bin
xorriso -as mkisofs \
-r -V 'Foxclone' \
-o "$new_iso" \
-J -J -joliet-long -cache-inodes \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-boot-load-size 4 -boot-info-table -no-emul-boot \
-eltorito-alt-boot \
-e --interval:appended_partition_2:all:: \
-append_partition 2 0xef efi.img \
-no-emul-boot -isohybrid-gpt-basdat \
"$new_files"
Results of dumpet
larry@larry-Satellite-C55-A:~/foxclone$ dumpet -i foxclone025-02.iso
Validation Entry:
Header Indicator: 0x01 (Validation Entry)
PlatformId: 0x00 (80x86)
ID: ""
Checksum: 0x55aa
Key bytes: 0x55aa
Boot Catalog Default Entry:
Entry is bootable
Boot Media emulation type: no emulation
Media load segment: 0x0 (0000:7c00)
System type: 0 (0x00)
Load Sectors: 4 (0x0004)
Load LBA: 38 (0x00000026)
Section Header Entry:
Header Indicator: 0x91 (Final Section Header Entry)
PlatformId: 0xef (EFI)
Section Entries: 1
ID: ""
Boot Catalog Section Entry:
Entry is bootable
Boot Media emulation type: no emulation
Media load address: 0 (0x0000)
System type: 0 (0x00)
Load Sectors: 8192 (0x2000)
Load LBA: 275968 (0x00043600)
I'd appreciate some help on this, Larry