Ubuntu – Difficulties creating a Persistent LiveUSB key for Ubuntu 16.04

live-usbpartitioning

I have a 128 GB USB key on which I would like to install Ubuntu 16.04.3 as a Persistent LiveUSB.

I have tried three different solutions, and run into difficulties each time:

  • LiveLinux on Windows 10 limits the size of the persistent sector to 4 GB, and, worse, the USB key is not recognized as a bootable drive
  • mkusb decided that Zenity would not work in the environment provided by my (non-persistent) LiveUSB key, and when I tried to use version 11 instead, it failed to mount the USB key after installation.

Are there any other solutions available? Or is there a step-by-step Idiot's Guide that will help me troubleshoot one of the above methods, so that I can coax it into working for me?

Or is it simply that 128 GB is too big?

Ideally, I would like to have a partition on the USB key which I can use for copying files to and from Windows machines, but right now, I will settle for anything that allows me to keep my preferred key board layout and other personal settings from one startup to the next.


UPDATE: I have successfully installed a Persistent LiveUSB version of Ubuntu on an 8 GB USB key using mkusb. First, I had to create a non-persistent version using Ubuntu 16.04.3, where mkusb was able to launch Zenity.
* The built-in Startup Disk Creator did create a working LiveUSB key, but it simply has a button for Make Startup Disk which seems to provide no persistence.

Best Answer

Ok, I understand you in two different ways. First one is that you simply need Ubuntu on a USB stick, so that you can install it to some system using that same USB stick. In other words, the USB stick replaces the installation DVD. This would be done like this:

  • download the desired ISO-image of Ubuntu. This could be ubuntu-17.10-desktop-amd64.iso.
  • Insert the USB stick into your computer and type sudo fdisk -l to find the device name your USB stick has in your system. If I put a USB stick in my system, the name will be /dev/sdc.
  • Copy the ISO-image to your USB stick using sudo dd if=/path/to/your/iso/ubuntu-17.10-desktop-amd64.iso of=/dev/sdc. You'll have to adapt the path and the drive to your system. Oh, and pay attention to the drive. If it fdisk shows you something like /dev/sdc1 and /dev/sdc2, then you still use only /dev/sdc without the number behind, because you want to overwrite all the partitions on the stick.
  • Reboot your system and boot from your USB stick.

The other way your question could be interpreted, is that you want to use your USB stick as main or secondary drive. This should be fairly simple. Use gparted to partition your USB stick. For instance a 2 GB SWAP, a 50 GB ext4, and the rest with a third partition with ntfs. You'll use the SWAP and the ext4 partition for Ubuntu and the ntfs partition for file exchange between Windows and Linux.