0

I've learnt how to install ubuntu on USB drives. In the tutorials, they say that I have to partition my USB drive. I wonder if I can still use my USB for standard uses? (like storing data)

Note: I would like to install ubuntu on my USB, not live boot using it.

  • 1
    Short answer: No. –  May 12 '19 at 04:45
  • Yes, you can make the first partition Fat32 or NTFS which will allow sharing files between a Windows computer and the Full install USB drive. The USB drive can still be used for storing and transporting files.https://askubuntu.com/questions/1119700/how-to-fully-install-ubuntu-on-usb-flashdrive/1119713#1119713 and https://askubuntu.com/questions/873004/ubuntu-on-a-usb-stick-boot-in-both-bios-and-uefi-modes/1118412#1118412 – C.S.Cameron May 12 '19 at 04:59
  • C.S.Cameron, can you explain more about that please? I am totally a beginner. – user9989615 May 12 '19 at 05:30
  • Basically you will have partition for ubuntu, not taking whole usb space, and partition to store data - fat32 or ntfs - so it will be accessable in windows and ubuntu. – LeonidMew May 12 '19 at 08:33
  • @user9989615: Please comment if any explanation is needed in the answer below. I you use Windows you may need to install mkusb to and run it from a live or persistent thumb drive made using UNetbootin or Rufus.. – C.S.Cameron May 12 '19 at 17:57
  • Thanks guys, I think I know what to do now. I am trying it soon. – user9989615 May 13 '19 at 14:08

1 Answers1

0

Full Install to USB - BIOS/UEFI

If you plan on using your bootable USB on various computers it should boot on both BIOS and UEFI computers.

It is also good if there is a common partition on the drive that the various computers can access.

If Apple is involved the partition should be FAT32, if the drive is over 32GB the drive FS should be NTFS.

Mkusb makes a great base for a Full Install USB drive able to boot from both BIOS and UEFI:

  • Use mkusb to make a Live system on the Installer USB (2GB or larger).

  • Use mkusb to make a Persistent system on the Target USB using default settings with ~25GB persistence if available, (remaining NTFS partition is used as Windows accessible data partition).

enter image description here

  • As soon as mkusb finishes, open GParted and delete sdx4, the ISO9660 partition and expand sdx5 into the recovered space, (sdx being the device name of the Target drive).

enter image description here

  • Create a extra ext4 partition sdx6 for /home if a separate home directory is desired, (Optional).

enter image description here

  • Unplug or remove HDD before proceeding further, (optional but recommended, highly recommended in UEFI mode).

  • Boot Installer drive, select Try.

  • Insert Target drive

  • Start Install Ubuntu...

  • Select "Something else".

  • Select sdx5, (on the target drive), and click Change.

enter image description here

  • Select Use as: ext4, Format and Mount point: /.

Don't touch any other partitions (unless adding an optional /home partition to sdx4).

enter image description here

  • Select sdx5 as Device for boot loader installation.

  • Complete installation.

  • Cut or copy grub.cfg from sdx5/boot/grub and paste to sdx3/boot/grub, overwriting the existing grub.cfg file.

  • Boot the target drive and run sudo update-grub to add all drives to boot menu.

  • Do not install any propriety drivers, (ie Nvidia), on pre-18.04 installs.

C.S.Cameron
  • 19,519
  • Well, I still have a question. I saw people install the ubuntu .iso file in a USB and it will be able to boot. Then what is the use to install Ubuntu on the USB? – user9989615 May 28 '19 at 11:21
  • @user9989615: A Full install Boots faster than an ISO file, it is more Stable, it is Updateable and Upgradeable, has better Security and Security options, you can use Proprietary drivers with it, (Nvidia), It has Unlimited "Persistence", and Hibernation works. However a Full install does not work as a installation USB. See: https://askubuntu.com/questions/156026/difference-between-livecd-liveusb-full-install-and-persistence/396219#396219 – C.S.Cameron May 28 '19 at 17:06