8

I am trying to customize ubuntu-14.04.2-server-amd64.iso, but I am unable to make it uefi bootable.

First I tried with original iso file:

dd if=/path/to/iso/ubuntu-14.04.2-server-amd64.iso of=/dev/sdc bs=16M

Everything is good at this point - I can boot flash in UEFI.

I have extracted iso content to /path/to/tmp folder and then I am trying to re-create iso (right now unmodified), but new iso does not work with uefi.

I am re-creating iso with this command:

mkisofs -r -V "Custom Ubuntu Install CD" -cache-inodes \
        -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat \
        -no-emul-boot -boot-load-size 4 -boot-info-table \
        -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
        -o /path/to/tmp.iso /path/to/tmp

Then I am using same dd command to put new iso on usb. What is right command to make it uefi bootable?

3
  • Someone posted in another thread. If UEFI only, then can just extract ISO with 7-zip (or any extraction tool) to FAT32 formatted drive. Will not boot in BIOS mode
    – oldfred
    May 18, 2015 at 15:24
  • Is it me or does the -e flag not exist?
    – lucidbrot
    May 6, 2020 at 11:32
  • It seems like the -e flag stands for -eltorito-boot on fedora. Source: Syslinux Wiki
    – lucidbrot
    May 6, 2020 at 13:05

2 Answers 2

11

You could use xorriso. I don't remember why but I think this is not possible with mkisofs.

Try:

xorriso -as mkisofs \
  -isohybrid-mbr /usr/lib/syslinux/mbr/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 /path/to/tmp.iso \
  /path/to/tmp

This will produce an hybrid MBR/EFI iso

http://www.syslinux.org/wiki/index.php/Isohybrid

4
  • 4
    I had to install isolinux package to get isohdpfx.bin and it was under different path - /usr/lib/ISOLINUX/isohdpfx.bin. Thanks! May 18, 2015 at 15:19
  • yeah. I used that when running 14.10. You use 15.04.
    – solsTiCe
    May 18, 2015 at 16:34
  • 3
    Thank you for flying xorriso. From the SYSLINUX point of view it is safer to re-use the first 512 bytes of the ISO image as long as you do not replace the ISOLINUX files inside the ISO by files from the SYSLINUX installation. Obtain MBR template by: dd if=ubuntu-14.04.2-server-amd64.iso bs=512 count=1 of=my_isohdpfx.bin Mention it in xorriso run by: -isohybrid-mbr my_isohdpfx.bin May 19, 2015 at 8:24
  • thanks, this solved the issue when the iso (output of mkisofs) was booting with EFI on virtualbox, but couldn't boot on a regular flash usb with dd. using xorriso was the trick, solve the headache :)
    – t-bltg
    Apr 16, 2017 at 22:11
2

You can create a small (2,8 MB floppy) UEFI disc with:

mkfs.msdos -C /tmp/uefi.iso 2880
sudo mount /tmp/uefi.iso /mnt
sudo cp /tmp/your_uefi_files/* /mnt/
sudo umount /mnt

Then reboot your system, press ESC or F10 or F11 and choose UEFI shell. To switch to the UEFI filesystem type:

fs0:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .