Can't create bootable USB flash drive.

Asked by Babah

Can't create bootable USB flash drive from custom .iso.

After write image to flash drive, I can't boot PC from this USB drive.
I write image to drive via Disk utility (standard Ubuntu utilities) and dd.
But when i try to boot PC from this drive I see just command line like:

GNU GRUB version 2.02~beta2-36ubuntu3.1

grub>_

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Babah (babahcv) said :
#1

Hello i find one difference
I found one difference in custom and original iso

#################Original iso#################
fdisk -lu ubuntu-16.04.1-desktop-amd64.iso
Disk ubuntu-16.04.1-desktop-amd64.iso: 1,4 GiB, 1513308160 bytes, 2955680 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: 0x40a863e7

Device Boot Start End Sectors Size Id Type
ubuntu-16.04.1-desktop-amd64.iso1 * 0 2955679 2955680 1,4G 0 Empty
ubuntu-16.04.1-desktop-amd64.iso2 2927216 2931951 4736 2,3M ef EFI (FAT

#################Custom iso#################
fdisk -lu ubuntu-16.04.1-2016.09.08.1-desktop-amd64.isoDisk ubuntu-16.04.1-2016.09.08.1-desktop-amd64.iso: 1,2 GiB, 1299550208 bytes, 2538184 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

Revision history for this message
Babah (babahcv) said :
#2

Hello.
I find how to resolve this issue.

Need to install syslinux-utils and run in terminal $ sudo isohybrid /path/to/custom_iso.iso
 or add to utilities.py new string:

hybrid = 'isohybrid "%s" .' % (
        model.custom_iso_image_volume_id, model.custom_iso_image_filepath)
    execute_asynchronous(thread, hybrid, model.custom_live_iso_directory)

But this solution don't work for UEFI mode, i can't create second partition (EFI) in .ISO file:

ubuntu-16.04.1-desktop-amd64.iso1 * 0 2955679 2955680 1,4G 0 Empty
ubuntu-16.04.1-desktop-amd64.iso2 2927216 2931951 4736 2,3M ef EFI (FAT

Maybe this information can help you for update CUBIC Repackage Functions

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

Cubic uses files from your host machine to create the EFI iso.

  For Ubuntu 15.04+, you must have...
  /usr/lib/ISOLINUX/isohdpfx.bin and /boot/grub/efi.img

  For Ubuntu 14.04, you must have...
  /usr/lib/syslinux/isohdpfx.bin and /boot/grub/efi.img

Cubic will automatically create an EFI iso, whenever these files are available.

If you install any of the official Ubuntu flavors in EFI mode on your host system, you should have these files.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#4

Cubic uses files from your host machine to create the EFI iso.

  For Ubuntu 15.04+, you must have...
  /usr/lib/ISOLINUX/isohdpfx.bin and /boot/grub/efi.img

  For Ubuntu 14.04, you must have...
  /usr/lib/syslinux/isohdpfx.bin and /boot/grub/efi.img

Cubic will automatically create an EFI iso, whenever these files are available.

If you install any of the official Ubuntu flavors in EFI mode on your host system, you should have these files.

Revision history for this message
jingrx (jingrx) said :
#5

I get the same result.
so should I use cubic on a EFI-installed host?

Revision history for this message
Cubic PPA (cubic-wizard) said :
#6

For Ubuntu 15.04+, make sure you have the following package installed:
                    isolinux

For Ubuntu 14.04, make sure you have the following package installed:
                    syslinux-common

And, yes, Cubic checks if you have an EFI install in order to generate an EFI ISO.
(This is done by checking that "/boot/grub/efi.img" exists; the file "/boot/grub/efi.img" exists when you have an EFI install).