0

I am trying to create a uefi only bootable version of the Ubuntu 17.04 Live CD on a Kingston 32GB USB stick while running on 17.04. When I check the stick with parted I get the following result:

Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? i                                                          
Model: Kingston DataTraveler 3.0 (scsi)
Disk /dev/sdg: 124GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags: 

Number  Start   End     Size    File system  Name   Flags
 1      2048B   6143B   4096B                Apple
 2      1597MB  1599MB  2359kB               EFI

When I check it with fdisk I get the following result:

Disk /dev/sdg: 28.9 GiB, 31004295168 bytes, 60555264 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: 0x1b571474

Device     Boot   Start     End Sectors  Size Id Type
/dev/sdg1  *          0 3142655 3142656  1.5G  0 Empty
/dev/sdg2       3118960 3123567    4608  2.3M ef EFI (FAT-12/16/32)

The results from the two checks appear to be inconsistent. Parted claims that the partition type is mac but also says that there is a conflict between the physical block size reported on the stick and Linux's assumption. Also no partition is shown that could hold the boot image. Fdisk, however shows a partition type of Dos for partition 1 as I would expect and also shows the correct size for the partition if it contains the boot image.

The stick is bootable and exhibits UEFI like behavior, e.g. the UEFI boot dialog is shown and I can apparently successfully, generate a 17.04 operating system.

However, when I boot the stick it hangs before displaying the boot dialog. I am trying to narrow down or eliminate the anomalous conditions surrounding this situation so I would like to create a UEFI only stick with a GPT partition table. I have searched the Internet but have found no reliable way of doing this.

I want to eliminate this as a potential problem source before delving further into the generated system boot problem. I am particularly concerned with the possibility that the stick may not be fully booted in UEFI mode which a number of posts have suggested could be a possible trouble spot.

Can anyone suggest a reliable way of creating such a USB stick?

Jonathan
  • 1,280
  • hmm... Disk /dev/sdg: 124GB (from the parted output) – wjandrea Jun 15 '17 at 22:25
  • This is 4 times the real size and appears to happen because parted reports a logical block size of 2048 instead of 512 bytes. – Jonathan Jun 15 '17 at 22:33
  • Don't worry about the partition table; the .iso file uses a Frankenstein's Monster sort of format in order to be a one-size-fits-all sort of file. Beyond that, see this question or this one. You need to install GRUB differently on a USB flash drive than on a hard disk, and the Ubuntu installer isn't set up to make this easy. – Rod Smith Jun 16 '17 at 01:14
  • I am trying to create a USB stick that runs the Ubuntu Installer. Does this change the picture at all? I want the installer to run in UEFI mode reliably. – Jonathan Jun 16 '17 at 01:49

1 Answers1

1

SDC creates an iso9660 partition with a read only clone of the OS on it.

Many systems will not see an ISO9660 partition.

If you want a customizable flash drive try mkusb, it can build a drive with FAT32 boot partition, ext4 OS partition, ext4 casper-rw persistence partition and NTFS data partition that both Windows and Linux can see.

Mkusb does UEFI, BIOS, MSDOS or GTP. https://help.ubuntu.com/community/mkusb

C.S.Cameron
  • 19,519