0

So I'm running Ubuntu 18.04 from an external hard drive attached via USB to my Windows 10 machine. I boot it by using a Ubuntu USB booter and choosing the 'Linux' option from Windows' 'Advanced Restart' menu. I tried to be able to boot it on startup from the UEFI boot menu for a long time, to no avail.

It works perfectly fine except I need to resinstall everything every time I restart - I even get the 'Do you want to install/try Ubuntu' selection menu each time (though I don't need to actually install Ubuntu every time, just all the sudo apt-get stuff). Only data I've saved to the external hard drive disk persists.

Is there some configuration that will allow all of the packages I've installed in one session to remain for the next? I should mention that the external hard drive is cannibalized from an old laptop and requires a wall outlet to run, maybe that has something to do with it?

1 Answers1

0

Full Install to USB

Full installs are more stable and secure than persistent installs, but not as quick to make. They are better at utilizing disk space as no fixed size casper-rw file or partition is required. They are not very good for use of installing Ubuntu.

Following is a step by step how to install 18.04 on a 16GB flash drive with options for separate Home partition and Windows compatible data partition, installation to a mechanical external hard drive is similar:

  • Create a live USB or DVD using SDC, UNetbootin, mkusb, etc.
  • Turn off and unplug the computer. (See note at bottom)
  • Unplug the power cable from the hard drive or unplug the hard drive from the laptop.
  • Plug the computer back in.
  • Insert the flash drive.
  • Insert the Live USB or Live DVD.
  • Start the computer, the USB/DVD should boot.
  • Select language.
  • Select install Ubuntu.
  • Select Keyboard layout
  • Select "Continue".
  • Select installation type and "Download updates while installing Ubuntu" and Select "Install third-party software ...", (optional).
  • Select "Continue".
  • At "Installation type" select "Something else". (Full disk encryption is now working with flash drives).
  • Select "Continue".
  • Confirm target device is correct.
  • Select "New Partition Table".
  • Click Continue on the drop down.

(Optional FAT32 data partition for use on Windows machine)

  • Click "Free space" and "+".
  • Make "Size..." about 2000 MB.
  • Select "Primary".
  • Location = "Beginning of this space".
  • "Use as:" = "FAT32 file system".
  • "Mount point" = "/windows".
  • Select "OK"

(Non Optional Root Partition)

  • Click "free space" and then "+".
  • Select "Primary", "Size ..." = 4500 to 6000 MB, "Beginning of this space", Ext4, and Mount point = "/" then OK.

(Optional home partition)

  • Click "free space" and then "+".
  • Select "Primary", "New partition size ..." = 1000 to 6000 MB, Beginning of this space, Ext2, and Mount point = "/home" then OK.

(Optional swap space, allows hibernation)

  • Click "free space" and then "+".
  • Select "Primary", "New partition size ..." = remaining space, (1000 to 2000 megabytes, or same size as RAM), Beginning of this space and "Use as" = "swap area" then OK.

(Important)

  • Confirm "Device for boot loader installation" points to the root of the USB drive. Default should be OK if HDD was unplugged.
  • Click "Install Now".

  • Select your location.

  • Select "Continue".
  • Insert your name, computer name, username, password and select if you want to log in automatically or require a password.cscameron
  • Select "Continue".
  • Wait until install is complete.
  • Turn off computer and plug in the HDD.
  • Replace the computer's cover.

Note: You may omit disabling the hard drive if after 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 as default location for boot loader is sda, any items in the internal drive's grub will be added to the USB's grub. You may do an update-grub later.

C.S.Cameron
  • 19,519