Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Bootable Ubuntu external hdd, how?

  1. #1
    Join Date
    Mar 2021
    Beans
    4

    Bootable Ubuntu external hdd, how?

    In the good old days of the bios, I've installed Ubuntu in any number of ways w/o any problem. It was simple as long as you weren't too drunk to misidentify where you were installing to. I've installed it to USB sticks, external USB HDDrives (that I could plug into a Windows computer and boot my external drive from), created dual boots (Ubuntu partition encrypted with native Linux encryption and the Windows partition encrypted with TC or VC), as well as installing /boot to a USB stick for added security. With my more recent laptop, with its UEFI replacement for the bios, I am far less certain. I ended up dumping Windows that came with my new laptop and just installed Ubuntu. That wasn't any real loss.

    Can I plug in an old external HDD with a bios version of Ubuntu into my UEFI computer and mount and run it without buggering something up? How would that be done?

    What I'd really like to do is create a new external HDD with a "clean" copy of 20.04 (the version I'm running on my laptop now) that I can mount as my ultra secure Ubuntu - i.e., that hasn't been used for any gratuitous surfing, link clicking, installation of programs or browser extensions - and that I can use for sensitive financial work.

    Can someone point me to a definitive tutorial on how I can create an external, bootable Ubuntu HDD drive, using my current Ubuntu laptop, that isn't going to bind that external drive and my laptop into a dual boot? It doesn't even really need to mount from another computer just as long as I can plug it in to my current laptop and press "esc, esc, esc" and get to the option to mount it over the internal SSD and it doesn't get tied to my laptop to where I have to have it plugged in just to run my internal SSD.

    Thanks.

  2. #2
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Bootable Ubuntu external hdd, how?

    Based on what you have specified I would aim for an external SSD .. not HDD.

    Crucial examples here .. https://uk.crucial.com/products/ssd/portable-ssds

    and to create a custom ISO (stripped back) use Cubic in your laptop Ubuntu to create your custom ISO to install in external SSD.

    I now avoid laptops (too tricky to repair internals) and my Dell PC has two external SSD's in a docking bay with its own power supply.

    You could apply that to your laptop if you don't need to lug around a dual docking bay.

    In fact the StarTech dual docking bay I use can take old HDD's too with the appropriate container (IcyDock).

    Just an added note .. ensure that you create an EFI partition (FAT, 500mb) in each SSD so that it can be independently booted without relying on laptop EFI. I use rEFInd in there with custom GUI.
    Last edited by dragonfly41; March 30th, 2021 at 01:23 PM.

  3. #3
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,727
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Bootable Ubuntu external hdd, how?

    Quote Originally Posted by susan2021 View Post
    Can I plug in an old external HDD with a bios version of Ubuntu into my UEFI computer and mount and run it without b******** something up?
    If you just plug in the device, it's only data unless you do something with it. Only if you try to boot with it will something happen.

    However, if I understand you correctly, you want to reformat the external HDD with a bootable Ubuntu installation completely independent of your laptop (so, you should be able to boot it from any UEFI computer).

    I have done such a thing more than once, and it's reasonably easy but it has a few tricky bits. It would be like having a dual boot. When it's not plugged in, your computer will just boot as usual. But when it's plugged in, depending on how you set your laptop's BIOS, one of the following will happen:

    • The laptop boots straight into your external device.
    • The laptop asks you which device to boot into.
    • You have to press a key (maybe F10 or Delete, or something else depending on your laptop's BIOS) to tell the laptop which device to boot into.

    Quote Originally Posted by susan2021 View Post
    How would that be done?
    Warning

    Any installation runs a (small) risk of unexpected data corruption. Therefore, run your full backups before proceeding.

    Set up your HDD

    1. Plug in your external HDD, but don't mount it. If your system mounts external devices automatically, you'll have to unmount it.
    2. Format your HDD as follows. My preferred tool is GParted, but you can use Disks or some other app if you prefer, or even the command line if that's your thing.
      Warning: This will erase your HDD, so take a backup first if you have important data on it.
      Also, when you use GParted, Disks, command line or whatever, be certain to correctly chose which drive you are playing with, otherwise you'll erase your laptop's drive!
      • Create a new device partition table on the external HDD as gpt (not as msdos). This will immediately erase your HDD.
      • Create a new partition, size 512MiB (the exact size isn't important, as long as it's about 512 MiB). I recommend that you name the partition EFI System Partition.
      • Create a second partition, size 700MiB (the exact size isn't important, as long as it's at least 700MiB). I recommend that you name the partition Boot.
      • Create a third partition to fill the rest of the drive. If you prefer to reserve space for something else, that's fine; in that case, create the partition with a minimum size of 20GiB. Name the partition whatever you want; say, Susan.
      • Don't bother formatting any of these partitions.

    Set up for installation

    1. Create a Live USB with Ubuntu.
    2. Plug in both the Live USB and your external HDD.
    3. Reboot your laptop into the Live USB (not your external HDD).
    4. Choose to install Ubuntu.
    5. Go through the installation, following the process that I describe below.

    Installation process

    1. When asked between erasing your drive or doing something else, choose "Something else."
    2. Where it says, "Device for bootloader installation", choose your external HDD. This prevents it from mucking about with your laptop's boot process. Note that you choose the device, not the partition. So, if your device is /dev/sdb, that's what you choose; you don't choose /dev/sdb1.
    3. Select your laptop's EFI partition (probably something like /dev/nvme0n1p1, but double check) and then "Change…"
      • Select "Use as: do not use this partition"

    4. Select your HDD's new EFI partition (probably /dev/sdb1, but double check) and then "Change…"
      • Select "Use as: EFI System Partition"

    5. Select your HDD's new Boot partition (probably /dev/sdb2, but double check) and then "Change…"
      • Select "Use as: Ext4 journaling file system"
      • Tick "Format the partition"
      • Select "Mount point: /boot"

    6. Select your HDD's new data partition (probably /dev/sdb3, but double check) and then "Change…"
      • Select "Use as: Ext4 journaling file system"
      • Tick "Format the partition"
      • Select "Mount point: /"

    7. If you think that you might have made a mistake, go through steps 2–6 again, or even Quit and try again.
    8. Double check step 2 — it's easy to forget.

    Then you can install.

    Once complete, reboot.
    Remove your Live USB when prompted.
    Boot into your external HDD using whatever method your BIOS uses (as described above) to check that your HDD works.
    Reboot again, but this time remove your external HDD to check that your laptop still works correctly.

    Have fun!

  4. #4
    Join Date
    Jun 2014
    Beans
    6,179

    Re: Bootable Ubuntu external hdd, how?

    One problem you need to consider is that the Ubuntu Ubiquity installer will by default install the EFI files to the first EFI partition it finds so that in your case that would overwrite the EFI files for your current Ubuntu on the laptop. Do you want to do an EFI install on the external drive? If that is the case, the safest solution would be to remove the internal hard drive which is problematic with a laptop. Disabling it in the BIOS firmware would be the 2nd option if possible. Another possibility is to use GParted to Manage Flags and remove the efi and boot flags from the internal drive, create an EFI partition on the external drive and set the boot and efi flags on the EFI partition of the external drive.

  5. #5
    Join Date
    Mar 2021
    Beans
    4

    Re: Bootable Ubuntu external hdd, how?

    Thank you for your reply.

    Aye and thanks.

    You say to format my (external) HDD with GParted but conclude by saying, "Don't bother formatting any of these partitions" which has me a bit confused.

    It would seem to me that step 3 of "Installation Process" is the crucial step in avoiding having the external HDD married to the internal SSD.

    Thanks for the reply. It would be nice if I could somehow disable the internal drive. When I first started researching this subject a couple of years ago, when I got this new laptop, that was one of the things that was mentioned. What is your opinion of Paddy's procedure?
    Last edited by howefield; March 31st, 2021 at 05:28 PM. Reason: posts merged.

  6. #6
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Bootable Ubuntu external hdd, how?

    Not sure who you are replying to. One approach I have used is to open laptop and physically (carefully) remove internal drive.
    Then plug in LiveUSB and external HDD/SSD and where I differ from Paddy's procedure is that I do use GParted in LiveUSB to format partitions in advance of installation. Of course with only external drive(s) plugged in through USB port, the located drive is now /dev/sda instead of /dev/sdb. I favour using rEFInd installed in the external drive but that is your choice. After you get Ubuntu working you need to shut down replace the internal drive and reinstall Grub/rEFInd in external drive since /dev/sda now drops to /dev/sdb. A reinstall of Grub/rEFInd fixes that wrong addressing of drives. If rEFInd is installed (usually from LiveUSB instance) it asks where you want to install and you select the only drive plugged in at that time (other than LiveUSB).
    Last edited by dragonfly41; March 30th, 2021 at 04:43 PM.

  7. #7
    Join Date
    Mar 2021
    Beans
    4

    Re: Bootable Ubuntu external hdd, how?

    I was replying to you and thanks for your reply. Sacré bleu! I might as well go to Wally World and just get a cheap laptop for my ends.

  8. #8
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Bootable Ubuntu external hdd, how?

    Firstly, welcome to the forums, susan2021

    From a technical perspective, the advice already given is excellent and I have nothing more to add.

    From a "meta" perspective, perhaps the following observation: I gather that your ultimate objective is to have a reliably secure OS that is "untainted" by other apps or activities like general surfing.

    Rather than go to the trouble of creating an external boot SSD (please don't misunderstand—that is also a good solution), why not strictly segregate your activities within your existing OS while keeping it as pristine as it was at first install?

    Many of us achieve this by doing all of our surfing in browsers that are jailed within VMs or containers. The same strategy can be extended to most apps so that they too run inside highly secure sandboxes. Your banking/financial work can be confined to a VM/container used only for sensitive stuff. Encrypt the entire VM/container for added privacy.

    This is a more versatile/convenient strategy than an external drive (though it lacks portability).

    Not trying to confuse you, but just another option I thought you may wish to consider.

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Bootable Ubuntu external hdd, how?

    The selection of location of grub bootloader on install partition screen only works with BIOS installs.
    Ubiquity installer only installs to first drive's ESP - efi system partition.
    As Paddy mentions, you must partition in advance and include an ESP on external drive. And it should be gpt partitioned.
    Best then to do a work around to get grub to directly install to external drive's ESP, but it can be repaired afterwards, only if you have ESP on external drive.

    Posted work around to manually unmount & mount correct ESP during install #23 & #26
    https://bugs.launchpad.net/ubuntu/+s...y/+bug/1396379
    Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.
    Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)
    Or if you have ESP on second or external drive, you can just reinstall grub, either manually or using Boot-Repair's advanced mode & full reinstall of grub to correct drive.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Bootable Ubuntu external hdd, how?

    Quote Originally Posted by DuckHook View Post
    I gather that your ultimate objective is to have a reliably secure OS that is "untainted" by other apps or activities like general surfing.
    .
    Another cocktail .. dedicated Raspberry Pi

    ...

    [Later thought] .. Why not just a simple Ubuntu LiveUSB on flash SansDisk .. but configured to be persistent to hold KeePass etc with passwords?
    Last edited by dragonfly41; March 30th, 2021 at 07:30 PM. Reason: persistent LiveUSB as another option

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •