1

I'm building a computer, with a 120GB SSD, and a 2TB Hard drive. I am planning to install the Ubuntu Operating System(14.04) to the 120GB ssd, But I would like to have my applications install by default to another hard drive.

I have seen this link: Installation -- Install apps to another disk

But that covers how to move an existing application to another disk. Is there any way to have all applications install, by default to another disk? Is it as simple as partitioning /usr, /lib, and /bin to another disk? or is that not possible? Any help would be appreciated.

One thing to point out: I am asking this, because I know you are able to do this on Windows 10 by changing the default installation drive via settings, But I do not want to use windows 10, as the licence terms are too strict in my opinion.

  • I don't really see the point in doing this (the "long" part in using the computer is to read applications from disk), but you can achieve it by mounting directories in the other drive to the default ones via fstab or by using symbolic links. In particular probably you would want to move /usr, /etc, /opt, but then it depends on the particular applications you will refer to. See the guide for what are the directories, to be able to choose the ones to move. Note also that probably you don't want to have /tmp on the SSD. – dadexix86 Feb 18 '16 at 15:50
  • sure. first, do echo $PATH then put all those directories on the other drive. done. – j0h Feb 18 '16 at 16:03
  • I have two installs of Ubuntu on my 120GB SSD each in approx 25GB / (root) partitions. Main working install with lots of applications but no games uses about 13GB including /home which is about 2GB of the 13GB. And /home is only that large because of .wine for Picasa & Firefox & Thunderbird. I have moved FF & TB profiles to data partition before and will do again. But all data is on HDD as it is accessed less often. Since only using about half of SSD I do not know what to do with rest, some vital data on HDD gets backed up, lots of ISO for installs to HDD and still room. Games can be on HDD. – oldfred Feb 18 '16 at 16:13
  • You can do that, but don't be fooled by other OSs --- I have a quite full installation of Linux, lots of applications, (although no games) in 18G. In Linux the best strategy IMHO is to make a big partition for /home, and then symlink there the odd strange thing (Matlab that uses 15G just for the standard install... tell bloatware). – Rmano Feb 18 '16 at 16:37
  • 1
    And see also: http://askubuntu.com/questions/379205/installing-programs-in-root-vs-home-partitions and http://askubuntu.com/questions/516353/what-are-the-advantages-and-disadvantages-of-mounting-various-directories-on-sep . Plenty of info there. – Rmano Feb 18 '16 at 16:38

2 Answers2

2

Is it as simple as partitioning /usr/, /lib/, and /bin/ to another disk?

Yes. And maybe /var/, /etc/ and /opt/ too (depending on usage).

I would not bother. The only 3 things I would leave of the SSD are tmp filesystems, swap and the directories inside your users /home/. The 1st 2 you do during mounting. The 3rd you can do by editing /home/$USER/.config/user-dirs.dirs.

Rinzwind
  • 299,756
0

Yes you can do that. You have several choices - like mount /dev/sdb(b is for the second drive generally) so let's say your ubuntu partition on second hard drive is at /dev/sdb2 - then mount that into /etc/fstab

But better approach is LVM as you can change the partition sizes later and it's flexible. But it's not as straight forward as the previous method i mentioned above.

At the time of installation make use of LVM for your second drive(2TB hard drive). You can make some logical volumes like /opt, /usr, /home, /var into that and work accordingly. I tried to do it after the install(as i added the additional hard drive into my working Ubuntu). I got success to have my /var into the second drive and others - i have some problem. But i will say do it at the time of installation itself. You can refer to my detailed thread and it has got a lot of pointers to help others.

After going thru the LVM route /opt is on second drive where i install all the applications. This is how my second drive looks like - it has Windows partion as well as Linux. Using gparted I just changed the flag to lvm enter image description here You can get gparted

sudo apt-get install gparted

Hope this helps

Ashu
  • 3,966
  • Do all applications install to /opt by default? – haet244cut Feb 18 '16 at 15:52
  • @haet244cut Not really...some of the installers ask you for the location explicitly then you can specify /opt. Good number of apps are packaged as .tar.gz...when you unzip it...move them under /opt. I have seen almost 70-80% standard applications getting installed under /opt - at least i follow that...only very few under /usr – Ashu Feb 18 '16 at 15:55
  • @haet244cut no. /opt/ is done by 3rd party applications where you use "tar.gz" as install. "deb" never installs to /opt/. – Rinzwind Feb 18 '16 at 15:55