1

Okay, I am stuck.

I have an Ubuntu LiveUSB installed. Per gparted, it is Partition Table: msdos, File system fat32, mount point /cdrom. I created the LiveUSB from Windows.

What I'd like is a full installed and independently bootable Ubuntu USB -- not a live, not a persistent, but a full install. And bootable (added) at least from UEFI computers.

  • I understand an ext4 is not recommended because of journaling.

How can I make this happen?

I've tried:

  1. gparted the USB to partition msdos, but "Install Ubuntu 16.04.1 LTS" says must install on an ext partition -- will not allow installation on a FAT32 partition.

  2. dozens of options trying gpt partition tables with Install Ubuntu, but nothing seems to work.

  3. Installation through Install Ubuntu, then trying to push grub on the /fat32 partition.

Can anyone help?

  • Why FAT32? You are trying to install from and to the same drive? Also seriously, an installation on a 2GB drive? – Tom Yan Aug 29 '17 at 02:29
  • F2FS might be a good choice for thumb drive installation. – Tom Yan Aug 29 '17 at 02:30
  • Hi Tom, thanks for the note. I removed the 2gb reference, that was only for the LiveUSB. I have a 64GB that I'm trying to make the real install. wrt FAT32, that was the standard install for LiveUSB, not what I selected. I'll try F2FS.... but the big problem is... how can this be made bootable by all systems? – Mark Satterfield Aug 29 '17 at 02:39
  • Not sure I get you but the drive was pre-formatted FAT32 doesn't mean you can not refornat it or even repartition it. Also I have to be frank that I don't know much about the Ubuntu installer so it might indeed prevent you from choosing a non-ext4 filesystem for the root partition (that said, I mean it's merely a potential limitation of the installer itself but not other factors; installers suck) – Tom Yan Aug 29 '17 at 03:09
  • 2
    Making it bootable on all system is a bit broad, but the general sense is install bootloaders or variants of a bootloader for different type of platform. For example, install grub with the common targets like i386-pc (for BIOS/legacy boot), x86_64-efi (64-bit UEFI) and maybe also i386-efi (the rare but not that rare 32-bit UEFI). And for the UEFI variants, make sure it is installed in a portable/removable manner, i.e. install the EFI executable to fallback paths that would be probed by UEFI instead of relying on NVRAM registration. – Tom Yan Aug 29 '17 at 03:14
  • 2
    ext4 is fine if you turn off the jounaling with -O^has_journal Search this site and the forum for "optimize usb" to see how to move stuff to ram to make it run faster. An EFI partition (FAT32) 300M for booting UEFI, msdos partition table might boot on more machines than gpt. – ubfan1 Aug 29 '17 at 03:19
  • 1
    You can try to install Ubuntu into the 64GB USB pendrive according to the following link (and links from it), https://askubuntu.com/questions/786986/boot-ubuntu-from-external-drive/942312#942312 – sudodus Aug 29 '17 at 04:44
  • 1
    You can use gpt partitioning for both UEFI or BIOS boot with Ubuntu. Window requires MBR for BIOS boot. With UEFI you need the ESP - efi system partition (FAT32) and for BIOS you need the bios_grub partition (unformated 1MB). I normally add both to all drives, but only one or the other is required. Manual partitioning: http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu – oldfred Aug 29 '17 at 15:59
  • Let me change the original post. Really, all the computers I'll be booting from are UEFI. But.... I'd like to autoboot into all those computers. – Mark Satterfield Aug 30 '17 at 03:15
  • If you remove the internal drive(s) before you install, the external drive (connected via USB) will be the target for the UEFI bootloader, which means that the EFI partition will get to the correct location for your USB drive to be portable. You should also avoid proprietary drivers, if you want your system to be portable between computers. This is described in this link and links from it, https://askubuntu.com/questions/786986/boot-ubuntu-from-external-drive/942312#942312 – sudodus Aug 30 '17 at 03:37
  • If you have problems even after following the detailed instructions in my previous comment, or if you want to boot both in UEFI mode and BIOS mode, there are two more alternatives. See the following links. Persistent live: https://askubuntu.com/questions/932170/installing-persistent-ubuntu-on-usb-flash-drive-alongside-internal-ssd-with-wind/932187#932187 and compressed image file with installed system: https://askubuntu.com/questions/16988/how-do-i-install-ubuntu-to-a-usb-key-without-using-startup-disk-creator/868113#868113 – sudodus Aug 30 '17 at 03:45

2 Answers2

2

Following is step by step for installing 16.04 on a 16GB flash drive on an Intel machine.

Turn off and unplug the computer. (See note at bottom) Remove the side from the case. Unplug the power cable from the hard drive. Plug the computer back in. Insert the flash drive. Insert the Live CD or Live USB. Start the computer, the CD/USB should boot. Select language Select install Ubuntu. Select Download updates while installing and Select Install third-party software. Continue.

At "Installation type" select "Something else". Continue

Confirm Device is correct. Select "New Partition Table". Click Continue on the drop down.

(Optional partition for use on Windows machine) Click "Free space" and "+". Make "Size:" about 1000 MB. Select "Primary". Location for the new partition = "Beginning of this space". "Use as:" = "FAT32 file system". And Mount point = "/windows". Select "OK"

Click "free space" and then "+". Select "Size:" = 5000 to 7000 megabytes, "Primary", "Beginning of this space", Ext4, and Mount point = "/" then OK.

(Optional home partition) Click "free space" and then "+". Select "Size:" = 1000 to 4000 MB, "Primary", Beginning, Ext2, and Mount point = "/home" then OK.

(Optional swap space, allows hibernation) Click "free space" and then "+". Select "Size:" = remaining space, (1000 to 2000 megabytes, or same size as RAM), "Primary", "Beginning of this space" and "Use as" = "swap area" then OK.

(Important) Confirm "Device for boot loader installation" points to the USB drive. Default should be ok if HDD was unplugged. Click "Install Now".

Select your location. Continue. Select Keyboard layout. Continue. Insert your name, computer name, username, password and select if you want to log in automatically or require a password. Requiring a password to log in and selecting "Encrypt my home folder" are good options if you are worried about loosing your USB drive. Select Continue.

Wait until install is complete. Turn off computer and plug in the HDD. Stick the side panel back on.

Note: You may omit disabling the hard drive if, when partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Be cautious, many people have overwritten the HDD MBR. You can revise grub later, if you wish.

C.S.Cameron
  • 19,519
  • So I've done this... but the problem is, the USB will only boot on the computer from which Ubuntu was installed. The USB is not portable to another computer. It seems to be missing the bootable portion of the system. – Mark Satterfield Aug 30 '17 at 03:02
  • I think C.S.Caneron's instructions are primarily for BIOS boot. And iF BIOS you have to specify using Something Else and partitioning screen to install grub2's boot loader to same drive you are installing into, often sdb. Default is always sda drive or usually your internal drive. But if you want UEFI you should partition in advance with gpt. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu And will have to manually copy boot files from ESP on sda to ESP on sdb. And then copy shimx64.efi to /EFI/Boot/bootx64.efi as that is how UEFI boots externals. – oldfred Aug 30 '17 at 04:04
1

If you have an ISO of the Ubuntu distro, you can use a free tool called YUMI to create a Live USB. I have used the same to install multiple distros on multiple USB drives.

abskmj
  • 111