2

I am running Xenial 16.04 and looking to install packages to an external drive - my computer has a 32gb SSD so it would be very useful to me to be able to use an external drive.

In a quick search I found a framework called AppImageKit which seems to be designed to package all dependencies for a program (chromium, GIMP, some python packages, etc), but haven't had time to look into it.

This user seems to be looking for the same solution I am.

Thanks, Chris

andersan
  • 33
  • 1
  • 3

1 Answers1

4

The easiest solution would be to install Ubuntu on the external SSD.

The "problem" is that Linux does not install programs into a single directory, so, when you install an application it installs pieces in various locations on the hard drive.

See http://brajeshwar.com/2008/filesystem-file-organization-in-linux/

So, generally what you "normally" would do is, as a part of the installation, partition the ssd and mount the various partitions at various locations such as /home or /usr or /var

So you could reinstall or move part of the file system, such as /usr to your ssd. Moving will take longer and be more involved then simply re-installing, making a partition or partitions such as /var and /usr on the ssd. The installer will do this for you.

To move see How can I store /var on a separate partition?

Other options : How to use second HDD as program installation drive path

Your last option would be to compile from source. When compiling you specify the location, again you would make a partition on the ssd and mount it at /usr/local. When compiling you use the --prefix option

./configure --prefix=/usr/local

See https://stackoverflow.com/questions/8902698/linux-configure-make-prefix

So, if you did not understand what any of that means, you are best off installing Ubuntu onto the ssd.

Panther
  • 102,067
  • Thank you - I'll give it a try. I have only tried symlinking folders within /etc/ or within /usr/lib and ran into some issues with that.

    compiling from source would be inconvenient but an option I'll consider if everything else fails. I have been running Linux on an external USB and used to run it on an SD but would prefer the internal SSD as it is much faster.

    – andersan Jul 21 '17 at 01:22
  • Well it is better to mount --bind these things rather then symlink. I think the easiest would be to look at your file system and decide what partitions you want on the external. Perhaps /home ? – Panther Jul 21 '17 at 02:57
  • i was hoping to move directories such as /var /etc /lib and /usr , where packages are usually installed. the /home dir actually has files installed in both Chrome OS and Ubuntu and it could create issues moving the whole dir to another device – andersan Jul 21 '17 at 05:03
  • there are 3gb of available space on the SSD after completing an install and adding chromium-browser, filezilla, and a few other small packages (g++, gparted, python-pip3)... would be cool if i could use external storage for more packages like anaconda that are very large – andersan Jul 21 '17 at 05:05
  • You might be able to do what you want using LVM. – Panther Jul 21 '17 at 15:59