2

Perhaps this is a strange ask.

I already have a laptop (#1) running Ubuntu 20.04LTS.

Question 1: I want to install Ubuntu onto a bootable external USB drive (flashdrive or SSD) from the existing Ubuntu environment (laptop #1) without having to boot the Ubuntu live installer flashdrive. Is this possible?

Question 2: Once I create this bootable Ubuntu external USB drive, I would like to use it to boot another (Windows 10) computer (#2) into Ubuntu. Meaning, can an bootable external USB drive created on one computer be used on the second computer? Is this possible?

(Actually, I don't want to boot the other Windows computer (#2) with the Ubuntu live installer and mess around with the other (#2) computer's Windows bootloader - as I've had some problems in the past already.)

The full log of my past problems is here: [Unsolved WIP] How to install Ubuntu on bootable external USB SSD

If all this is possible, how do I do it?

fazz27
  • 41
  • The problem you had stemmed directly from following that YT video that shows a LEGACY ("BIOS") installation, the exact opposite of what you should do for a dual-boot with any preinstalled Windows 8 or newer (always UEFI mode). That was commented in the first reply: you want to use UEFI booting. Now, if you don't want it to be "portable", i.e., used in different PCs, but only in #2 then do yourself a favor and install it normally in #2 the usual way (check instructions in the next comment). – ChanganAuto Jun 05 '21 at 03:49
  • Does this answer your question? How do I install Ubuntu alongside a pre-installed Windows with UEFI? This will add the Ubuntu bootloader to the internal drive's EFI partiton alongside with Windows. If the external drive is to be usually connected you can select the Ubuntu bootloader which then will give boot entries for both; if not usually connected then select Windows bootloader in UEFI settings > Boot and only change it to Ubuntu when you want to boot Ubuntu. – ChanganAuto Jun 05 '21 at 03:49
  • Also correctly commented at the Lenovo forum, disable Secure Boot. Also recommended to disable Fast Boot in UEFI, if applicable, and disable Fast Startup in Windows. Keep in mind that how you boot the installer is how it installs. In order to avoid what happened to the idiot in your YT video disable any CSM/Legacy boot option in UEFI to assure the installer boot in UEFI mode. – ChanganAuto Jun 05 '21 at 03:58
  • @ChanganAuto thanks for the response. I have since tried different methods from that YT video. I still couldn't get the external installation to work. I've done all including disable Secure Boot, disable Fast Boot in UEFI, removing the internal drive boot & esp flags via gparted before installing ubuntu via live installer. All doesn't seem to work: https://forums.lenovo.com/t5/Ubuntu/Unable-to-boot-ubuntu-from-external-ssd-on-thinkpad/m-p/4505342?page=2 – fazz27 Jun 05 '21 at 04:08
  • @ChanganAuto this is why I am trying another method, hence the original post here. – fazz27 Jun 05 '21 at 04:09
  • @ChanganAuto forgot to mention thanks for your answer suggestion. I had a read through, and from my understanding what I am trying to do is different from installing Ubuntu alongside Windows. I don't want to install Ubuntu onto the internal Windows nvme SSD, but to install on an external USB SSD while keeping the internal Windows nvme SSD pristine. This is the log of what I did: https://topics.my/blog/2021/how-to-install-ubuntu-on-bootable-external-usb-ssd/ – fazz27 Jun 05 '21 at 04:19
  • 3
    It is quick and easy to install Ubuntu 20.04 to an external drive using a pre-built image file, see: https://askubuntu.com/a/1300458/43926 This image file will create an Ubuntu installation that will boot in either Legacy or UEFI modes, so the USB can be used on almost any Intel based computer. Rufus and Etcher can be used to install the OS without touching the current internal Windows install. – C.S.Cameron Jun 05 '21 at 04:57
  • @C.S.Cameron thanks for this. I will try the pre-built image file. – fazz27 Jun 05 '21 at 05:41
  • Yes, this is a great suggestion but, for the record, it can be done as described in the canonical answer because regardless of the location of the system partitions, it IS the same as installing alongside, be it in the same internal drive, in two or more different internal drives or a combination of internal or external. – ChanganAuto Jun 05 '21 at 13:09
  • See this answer for using a Virtual Machine, so that you don't have to use the Live installation USB. – user68186 Jun 05 '21 at 14:34
  • So going back to the 2 questions in my original post - 1) you can use a pre-built image to install without using the live installer. Although some may have reservations on installing from unverified pre-built images. 2) once installed on an external drive - this pre-built image if made to be portable can be used for any computer. Is this about right? – fazz27 Jun 07 '21 at 07:15
  • 1
    Yes that is right. This particular image was created by Sudodus, the creator of mkusb and should be just as safe as mkusb. MD5SUM for the image is available. Flashing a disk image will overwrite the target drive. – C.S.Cameron Jun 09 '21 at 04:08
  • @C.S.Cameron thanks for this. – fazz27 Jun 09 '21 at 15:05
  • You are welcome. – C.S.Cameron Jun 10 '21 at 01:45

1 Answers1

1

After exploring this for a number of weeks and trying out suggestions from other members on askubuntu.com I have found the answer to my questions as follows.

Answer 1: Short answer YES, you can install ubuntu onto a USB flashdrive. I have not tried doing so on USB SSD, but I would assume that it would work. Feel free to correct if otherwise. The method to install still requires you to install from the Ubuntu Live Installer USB and NOT from an existing desktop Ubuntu environment. I used the guide posted by C.S.Cameron at How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step and further clarified by K1tty at Creating a PC-Boot-able Ubuntu Installation

Answer 2: Short answer - YES, you can use the USB flashdrive to boot into ubuntu on a different computer. If you followed the guide by C.S.Cameron and K1tty above, then you would be able to create portable and bootable Ubuntu USB flashdrive that can be used on any computer to run Ubuntu.

A couple of important points / steps that I had to take are as follows:

  • Before installing Ubuntu from the Live Installer to the new USB flashdrive, I had to first disconnect the host computer internal boot drive. This is because of an Ubuntu bug that ignores installation to an external drive as long as it "sees" an internal boot drive. It took me time to do this, as I initially was using my laptop to do the installation and I didn't want to open it up and invalidate any warranty. So I bought a used small form factor desktop (so I could open and disconnect the internal boot drive) to do the installation.
  • Copying the boot and the EFI folders from the Ubuntu ISO file to the boot,esp partition sdx3 was slightly complicated as I had to muck about a little to finally figure out how to do it. Initially, I tried sudo -H nautilus but terminal threw up some error. I am not sure if my method was a reliable method so I am not going to post it here. If others can edit this to explain best how to do this, it would be most appreciated.
fazz27
  • 41