Score:0

How to boot from external SSD instead of internal HDD?

jp flag

I have a 1TB external SSD that I want to boot linux from, and use the internal 6TB HDD for large storage (the internal HDD was being used as my linux server OS drive). I figured running the OS from an SSD would be much faster (and quieter!), so I'm giving it a shot. Here's the problem I run in to, and what I've tried:

Equipment:

  • ASUS VM42 Computer
  • 6TB WD Red Plus internal HDD (current ubuntu OS)
  • 1TB Samsung T5 USB SSD (new ubuntu OS)
  • USB flash drive with the ubuntu installer burned onto it via balenaEtcher from my Mac

I have the same USB flash drive I used for my first install of Linux, and so I plugged that in with the USB SSD attatched as well, and ran the Ubuntu installation. I was afraid of re-formatting my internal HDD and losing all my data, so I just took it out to do the installation and it went smoothly. It rebooted to the new Linux OS I just installed (Ubuntu 20.04 Server) and it worked great.

I then decided to plug my internal HDD back into the computer (internally - not via USB), making sure to first shut down the computer. I turned it on and pressed Del repeatedly to get into the BIOS menu, and made sure that the T5 SSD was selected for the boot option. This was the first confusion I had - there were 3 options for the SSD: Samsung T5 - abc123, ubuntu Samsung T5 - abc123, and UEFI Samsung T5 - abc123 (where abc123 is a long string of numbers and letters, presumably the serial #?). The problem was that no matter which variation or order I selected these in, the computer would still boot from the internal HDD instead of the external SSD. (Another issue with the BIOS - every time I'd update the boot options, when I'd hit "Save & Quit", it would warn me that no changes were made to the BIOS settings.)

I tried removing the internal HDD again to make sure that the SSD had a working Linux OS on it, and sure enough when I remove the internal HDD the computer boots up just fine from the SSD, even showing in the BIOS that the ubuntu was selected for Boot option #1 and the normal Samsung T5 was selected for Boot option #2.

Again, I shut down, insert the internal HDD, boot to the BIOS, make sure the Samsung SSD is selected, and it still boots from the internal HDD.

Nearly every tutorial and blog post and YouTube video I've found while searching for a resolution is from people who are showing how to dual-boot Windows and Linux, and using Rufus. That's not what I'm looking for, and I couldn't even follow along since I'm currently on a Mac. I want to start fresh from the SSD with Ubuntu, then mount the internal HDD as a storage option that will still have all my old files from before the transfer. This is assuming (and correct me if I'm wrong) that I can just mount the internal HDD with the simple mount command to a directory, then go through and just delete all the old linux system files and just keep the personal files that I want. i.e. I would move all my files to a top-level folder, then delete everything else (bin, boot, data, dev, etc, root, srv, var, etc.). Would this even work in the first place?

One post I found on StackExchange had someone mention to boot up and do a sudo update-grub, which I tried when I booted from the SSD without the HDD attached. This didn't change anything, however.

Can anyone help?

Edit: The BIOS being used on the Asus machine is the UEFI BIOS Utility.

Edit 2: I booted from the SSD with the HDD disconnected, then connected it while the computer was on and running. A lsblk doesn't show the internal HDD that I just connected. I hear the whirring from the drive, so I know it's on. Not sure if this is useful information in any way.

Josh Andromidas avatar
jp flag
@Nmath Yup, like I said - when the internal HDD is disconnected with only the SSD connected, it boots up with the fresh Ubuntu install. Also, the SSD is connected via USB 3.0, which I'm pretty sure is faster than the 5400 RPM. Some quick googling shows that USB 3.0 speeds can reach up to 625 MB/s while 5400 RPM HDD speed is around 100 MB/s. In some initial tests I did with some Docker web servers, moving the config files to the SSD greatly improved speed, while the SSD boot-up (without the HDD installed) was also much faster than the HDD boot-up speed.
Nmath avatar
ng flag
If you have confirmed that Ubuntu is installed and bootable, it is within the realm of your motherboard firmware (BIOS) to select the boot priority. There might be additional settings you need to configure with your motherboard BIOS. Unfortunately, there is nothing you can do in Ubuntu about this. Consider reading the documentation for your computer's motherboard.
sudodus avatar
jp flag
Are you booting in BIOS mode (alias CSM alias legacy mode) or in UEFI mode? The methods to control booting is different between the two boot modes, and there can be big differences between computers how to manage it.
Josh Andromidas avatar
jp flag
@sudodus The BIOS menu shows at the top: UEFI BIOS Utility
sudodus avatar
jp flag
When running Ubuntu, please run `test -d /sys/firmware/efi && echo efi || echo bios` in a terminal window and tell us what is the output.
Josh Andromidas avatar
jp flag
@sudodus when running Ubuntu on the internal HDD, the output is "efi". Should I run it on the SSD Ubuntu fresh install as well?
sudodus avatar
jp flag
Yes, it is a good idea.
Josh Andromidas avatar
jp flag
@sudodus I took out the HDD again, and the SSD's ubuntu install also says "efi"
sudodus avatar
jp flag
OK, so we have to fix the UEFI boot system. Almost always, UEFI will start looking in the first drive it sees, `/dev/sda` and look for an EFI system partition (ESP). In your case, there is also an ESP in the external drive (probably `/dev/sdb`), which is used when the internal drive is absent, or when you activate a temporary menu and select the external drive. - In some computer's UEFI-BIOS system you might be able to select which drive to boot from, but probably you must boot from the internal drive. So make the boot via the internal drive's ESP include the system in the external drive!
sudodus avatar
jp flag
There is a good tutorial about UEFI booting at [this link to the Ubuntu Forums](https://ubuntuforums.org/showthread.php?t=2147295). There are also shortcuts - @oldfred is the guru here, you can ask him at the Ubuntu Forums.
sudodus avatar
jp flag
A quick-fix might be to use [BootRepair](https://help.ubuntu.com/community/Boot-Repair)
waltinator avatar
it flag
I suggest you read `https://en.wikipedia.org/wiki/Power-on_self-test` , `https://en.wikipedia.org/wiki/BIOS` , `https://en.wikipedia.org/wiki/Master_boot_record` , `https://en.wikipedia.org/wiki/GUID_Partition_Table` , `https://en.wikipedia.org/wiki/UEFI` . One will have the Answer. Read the others to understand that one.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.