1

I've tried to create a bootable Ubuntu usb stick using the instructions from:
https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0
However, upon choosing "install ubuntu" after booring from said stick, there was no option to select the flash drive as the install destination. I was only able to:

  • Install Ubuntu on my Laptop's Hard Drive
  • Share that drive with my Windows installation
  • Choose partitions myself, in which case the to me unfamiliar drive/partition notation had me somewhat confused,

although I was able to make out that my USB Flash Drive was not listed.
What was listed were my SD Card and the Windows Bootloader (I think I got that name wrong there, take it with a grain of salt).

I'd like to be able to know how to install Ubuntu fully onto a USB.
Do I have to have Ubuntu already installed? Is the culprit the flash drive being the drive Ubuntu was running on?

2 Answers2

2

In case you still need some help with the issue:

As the other comment mentioned it, you can't install Ubuntu on the same USB you booted from (as far as I know).

Although many live USB creation tools enable you to choose a persistence mode, in which you can keep your files etc. I am not sure if you can enable it afterwards, but I doubt it. EDIT: I stand corrected. See the comments, you indeed can enable it afterwards!

In case you want to install it on another device, like a portable HDD or something, here is a quick rundown for the partitioning.

I set up my Linux distros via the manual partitioning, because I had several instances where Linux chose weird formats or crazy partitioning scheme.

You should be able to identify the overall device from the partition menu. Often the bootloader option in the bottom is able to tell you which /dev/sda is which device and hopefully you have your desired device with a category as "free space" (or you mark that device and create a new partition table, see link for images).

Then you proceed with the partitioning by entering your desired settings, choose the device for the bootloader and yeah, you're done. Here is a pretty good explanation. Beware that you still need some amount of space for the / (root) partition and swap. I did not test it, but I assume that the same rules apply for USB as for other disks, meaning that without enough swap space you won't be able to hibernate.

Hope that helps a bit.

mkV
  • 111
  • 1
    Actually, you can enable persistence afterwords. You just need to add persistence to the kernel boot parameters, and have an ext[2/3/4] image on the flash drive's root directory named casper-rw. Just for fun, you can also (optionally) have a separate file for your home directory: casper-home. – TSJNachos117 Jan 27 '19 at 01:57
  • I thought it would be quite a bit more complicated than that. Why can't all things in Linux be as easy? Thanks for the input. – mkV Jan 27 '19 at 01:59
  • 1
    In my experience, they usually are, assuming you can find the information on what to do. – TSJNachos117 Jan 27 '19 at 02:26
0

I'm going to take a guess and say that Ubuntu doesn't like being fully installed on a FAT32 filesystem. Since GNU/Linux systems like Ubuntu are meant to be Unix-like, you probably want a filesystem that supports Unix-like read/write/execute permissions.

To that end, ext4 is the most tried and true filesystem, and has the best support for GRUB (the bootloader) that I've seen. Since this is a flash drive, it might pay to consider f2fs, as it's designed to put as little wear and tear on flash drives (and other flash-based storage devices, such as memory cards and SSDs) as possible, although I don't know how well with works if GRUB. If nothing else, consider using ext4 for your /boot partition.

Perhaps if the partition that Ubuntu is installed "live" on didn't fill the entire drive, you could make another partition (perhaps using ext4 or f2fs as your file system) and install Ubuntu on that. If your computer has a DVD drive, you could also consider booting from a DVD and use that to format and install Ubuntu on the flash drive.

The only other thing I can think of is to use a second flash drive. Boot with flash drive A, and install Ubuntu on flash drive B.

TSJNachos117
  • 1,444
  • 2
  • 15
  • 19