0

I created a Live USB on an empty 32GB USB stick from Ubuntu 17.04 ISO with Startup Disk Creator (when using mkusb, same result): Gparted says its a 118.89GB disk and it cannot create a partition in the unallocated space. I want a partition to store data when in a Live session. The USB boots successfully.
Pictures before, after and the error:

gparted before gparted after gparted error

The same result when using older (X/L)Ubuntu ISO's.
Anybody experiencing the same issue and found a solution ??

  • 1
    dd or tools that use dd do not make standard partitioned drives. It is a hybrid for both DVD & flash drive. You need to use one of the standard tools or if you just want UEFI only, you can do that entirely yourself. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formated flash & set boot flag. http://askubuntu.com/questions/395879/how-to-create-uefi-only-bootable-usb-live-media – oldfred Apr 27 '17 at 03:02
  • I would say that the problem is a bug in gparted, which does not understand the hybrid partition table and file system that comes with the Ubuntu iso files. But for example lsblk reports the correct size. – sudodus May 03 '17 at 10:33
  • @sudodus: the problem wasn't so much the reporting of the wrong size but gparted was then not able to delete the buggy partition and create a 'normal' one. The reference in oldfred's comment pointed me in the right direction and I created a script that creates a bootdisk and makes it bootable. –  May 03 '17 at 10:53
  • Your two lines to create a boot disk is nice. I upvoted it :-) – sudodus May 03 '17 at 12:49
  • If you want to save things in a more powerful way, you should add the label casper-rw to the ext4 partition. Then it will be overlayed onto the root partition of the live system, and you will get a persistent live drive, where you can also install application programs and tweak your user interface. I made a tool for that purpose, mkusb, that you might try. See these links, https://askubuntu.com/questions/850530/persistant-casper-rw-drive-not-booting/850538#850538, https://help.ubuntu.com/community/mkusb, https://help.ubuntu.com/community/mkusb/persistent – sudodus May 03 '17 at 13:00
  • @sudodus: I do get your point but that is not how I intend to use a Live USB. I like to keep the Live USB partition static,as I use it rarely, and the 2nd partition dynamic, as I use it frequently (between Windows and Linux, or Linux and VM's). That way I can overwrite the Live USB with another ISO without thinking twice about saving data in the Live partition. –  May 03 '17 at 14:45
  • You are happy with your current system. Fine :-) How do you make Windows read the ext4 partition? Do you use any of the tools described in the following link? https://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/ – sudodus May 03 '17 at 15:31
  • Yes, DiskInternals Linux Reader. Though I have mixed feelings about it. I am considering changing the EXT4 to NTFS/FAT32. –  May 03 '17 at 15:37
  • [Based on my experience with mkusb which creates persistent live drives with both a 'usbdata' partition with NTFS (for exchange of data with computers running Windows) and a 'casper-rw' partition with ext4 (for persistence)] I would recommend NTFS in your case (unless you want to exchange data with a computer running MacOS; in that case I would recommend FAT32). NTFS has journaling and can manage files bigger than 4 GB, and these are important advantages compared to FAT32. – sudodus May 04 '17 at 03:02

1 Answers1

2

The comment by @oldfred set me on the right track. I formatted a USB disk with 2 partitions; 4GB FAT32 and 120GB ext4. I mounted the 4GB and issued the commands:

$ 7z x -y ubuntu-17.04-desktop-amd64.iso -o"/media/'myname'/'disk-id'"
$ sudo parted /dev/sdb set 1 boot on

Now I can boot the Live USB and mount the 2nd partition in case I want to save data during the Live Ubuntu 17.04 session.

  • Would you like to detail what you needed to do to fix the problem? At the moment, this is not an answer, it's a comment – Baldrickk May 03 '17 at 11:12
  • I followed the link provided by oldfred and used the instructions given. Are you saying I edit my answer and re-publish that link in my answer ? –  May 03 '17 at 11:17
  • Yes, something to explain what you did eould be better than referring to a comment. Just a short summarty would be good. Comments should be treated as temporary and liable to disapear, and answers should provide an actual answer for anyone with the same question. – Baldrickk May 03 '17 at 11:23
  • @https://askubuntu.com/users/680858/willem-k: Note to self. Write down sudodus details for future reference. –  May 05 '17 at 22:27
  • @Willem K: Note to self. Write down sudodus details for future reference. –  May 05 '17 at 22:28