0

I want to add external HDD to my Ubuntu so I can install all sorts of software on it. I know you can add a HDD to Ubuntu however, I want to ask if I add the hard drive would I be needing to be inserted when booting. And if not can it lead to GRUB failing to start (GRUB installed in SSD)

  • 1
    If nothing needs to read from the external storage device, there is no need to add a record to your /etc/fstab configuration. You can connect and disconnect the drive as needed. – matigo May 10 '22 at 08:57
  • I understand it just that I'm running out of space and I want to install apps to my external HDD and I understand that I need to add it to Ubuntu – kinkajou May 10 '22 at 09:02
  • That bit of information really needs to be in the question. As it stands, your question is too generic to let people know you want to install applications there. What sort of applications will you plan on putting on the drive? Snaps? Steam games? VMs? Or "anything"? – matigo May 10 '22 at 09:08
  • I'd say anything I am a software developper and I have minimal space in Ubuntu, I wish to use it for all sorts of things DMBSs, VMs, IDEs... – kinkajou May 10 '22 at 09:25
  • Not a good idea. Instead, move all your personal user files ("Documents", "Music", software projects you are working on, etc.), and eventually tmp directories away to an external drive. With a mere 25 GB, you can have a good stable functioning Ubuntu system including the user's home directories, but not anymore the users personal data. – vanadium May 10 '22 at 10:53

1 Answers1

2

If the external drive is expected to store applications, the "simple" answer to your question is: "Yes. The hard drive will need to be connected to the computer when you boot, and it will need to be mounted via a configuration line in /etc/fstab."

However, depending on how you want to arrange the system, you may run into some challenges as multiple mount points will be needed. Applications and utilities are often installed in /var. Snaps, however, may be installed in /home/{user}. Configuration files may be in /etc or /usr or /opt depending on how the development team built the software.

Yours is not an impossible problem to solve, but it will require some creativity.

For example, many years ago when 128GB SSDs were standard, I would keep PostgreSQL and MySQL data files on an external device. These database engines would be installed on the SSD, but the services were not configured to start with the system. Instead, when I had to take the notebook on the road, the databases would be manually started up only after the external spinning disk was installed and I was going to develop or demo a project. The same was done with virtual machines, where the VM engine was installed on the tiny SSD but the VM images were on the spinning disk.

This was not a perfect situation, as external devices can sometimes "disappear" if power is inconsistent or if power management policies are a little too aggressive. However, this did make it possible to use a small SSD with a larger HDD for a couple of years until I could afford a better system.

matigo
  • 22,138
  • 7
  • 45
  • 75