1

I'm trying to partition a USB drive with a bootable partition using Kubuntu 18.04.1 and a data partition. What I'm trying to accomplish is the following:

  1. Use GPT partition table to UEFI Boot

  2. 2GB partition to write the Kubuntu.iso to an boot from

  3. The boot partition should NOT be persistent, in other words it would act like I booted from a CD/DVD-ROM I burned with the .iso

  4. Boot with UEFI Boot: Enabled and Secure Boot: Enabled

  5. nGB partition formatted as NTFS to use between (K)ubuntu, CentOS, and Windows


What did work so far:

  1. As expected, simply DD-ing the Kubuntu.iso to my flash drive and booting from the USB drive with UEFI Boot Enabled and Secure Boot Enabled. But this leaves much wasted space on the drive and gparted and partition manager do NOT show the device with any partition table. The Windows partition utility (the name escapes me) does see how much space is being used. Trying to partition the unused space breaks the drive. When I try to boot from it, it simply gives me a GRUB prompt. I feel this might be close.

  2. I created an MBR partition table with two primary partitions and toggling the boot flag on the 2GB partition I created. The 2GB partition is typed as a FAT32. I then followed the advice found here and a link there in. Basically I partition the drive as described above and:

    isohybrid --partok Kubuntu.iso      //this is supposed to make the .iso bootable from a partition
    dd if=Kubuntu.iso of=/dev/sdX1      //write the modified .iso to the partiton
    install-mbr /dev/sdX                //part of the system-utils package found on Ubuntu repositories.
    

However, I have to have UEFI Boot Disabled and therefore Secure Boot Disabled. I at least think meeting the above requirements is plausible. I suspect that even If I were to use this method with GPT I could boot with UEFI Boot Enabled, but Secure Boot might have to be Disabled due to modifying the Kubuntu.iso. I'm not sure if isohybrid modifies any of the binary's that get loaded at boot.


What else I've tried:

I've tried a similar method found here https://askubuntu.com/a/423402, but instead of a MBR I created a GPT table with the same partition layout then:

isohybrid --partok Kubuntu.iso         //this is supposed to make the .iso bootable from a partition
dd if=Kubuntu.iso of=/dev/sdX1         //write the modified .iso to the partiton

and tried

isohybrid --uefi --partok Kubuntu.iso  //this is supposed to make the .iso bootable from a partition
dd if=Kubuntu.iso of=/dev/sdX1         //write the modified .iso to the partiton

No combination of UEFI Boot: Enabled with Secure Boot: Enabled||Disabled would boot from the the flash drive.

zx485
  • 2,426
  • Sounds like a case for mkusb https://help.ubuntu.com/community/mkusb It will make a Live USB to your spec. – C.S.Cameron Aug 11 '18 at 20:20
  • Unfortunately this doesn't create a drive any differently then DDing an .iso image to /dev/sdX device. It still results with no partition table recognized by partition manager where I can add a larger partition for data. It even states in the mkusb page that after you create a live USB, you can restore it by using gparted. – inquisitivejorge5 Aug 11 '18 at 23:34
  • Mkusb makes a FAT32 Boot partition and boots UEFI or BIOS. It makes a read only ISO9660 partition for the OS, it can make an ext4 casper-rw persistence partition not limited to 4GB, and it also can make a NTFS data partition usable by Linux and Windows, as large as there is room on the USB – C.S.Cameron Aug 12 '18 at 01:06

0 Answers0