Installing programs in root vs home partitions?
I would argue for a single /
partition in the SSD (60GB, as you have envisioned) to keep everything Ubuntu, including the /home
folder.
A separate /home
partition is useful:
(1) when one plans to try out different distributions of Linux (also known as "distros")
or
(2) when one may want to re-install Ubuntu without destroying the personal files and settings in /home
.
The second reason is a bit less important now, as newer versions of Ubuntu installation process will detect existing Ubuntu and offer to preserve the /home folder when installing over.
On the other hand, if you keep /home
as a folder of /
you won't have to worry about how much to allocate to /
and how much to allocate to /home
. If your program files (games) take some more space, all you have to do is move your personal data to the HDD.
By now you must be thinking why not put /home
in the HDD?
The only reason I prefer /home
to be in the SDD is because /home
stores not only your personal data, but it also stores your personal settings for all programs. This includes changes you make to the desktop or any other program settings, your browser bookmarks, etc. When you load a program from SSD but the personal settings are in HDD, it slows loading that program a tiny bit. Keeping /
and /home
both in the SSD will get you the fastest load time.
Keep large data such as music, video, saved games, etc. in the HDD
The folders that contain large amount of data, such as Video, can be in the NTFS partition with symbolic links to /home
. This is explained in some detail at: Windows Ubuntu dual boot - Share files between OS
Other large sub-folders of /home
can be partitions in the HDD. For example, if you install a lot of Windows programs and games in WINE, the hidden folder .wine
will grow large. You can create an ext4
partition in the HDD and mount it at /home/[your user name]/.wine
(Unlike Windows, a partition in Linux can be mounted as a sub-folder.) Steam games take up a lot of space. Your steam games are in /home/[your user name]/.local/share/Steam
. See where are Steam games installed? You can create a separate Steam
(ext4
) partition in the HDD if you want. These will require a one-time edit of the file /etc/fstab
. See Mount a partition on login? for more on how to mount a partition at login.
The reason I recommend .wine to be an ext4
partition rather than a folder in the NTFS
partition is because NTFS
cannot preserve ownership and file permissions used by Ubuntu that is needed by the settings and other files stored in the .wine folder by WINE.
Between system linked folders in the NTFS
partition and ext4
partitions mounted as sub-folders of /home
you can keep all the large files in the HDD while keeping the system fast, taking advantage of the SSD.
If you still run out of space in the /
partition in SSD due to large games and other programs, you can create an ext4
partition and move /usr
there. However, this will require some planning, careful thoughts and execution. Ask a separate question if and when you need to go on that route.
As far as installing programs in /
versus the /home
see this excellent explanation of the process and its limitations: Software installed on root partition or on home partition In short, programs installed via the Ubuntu Software Center, or the command apt-get
will be installed in /
. Only "static-binary" compiled programs may be installed (rather copied) in sub-folders of /home
and expected to work.
More references:
Partitions for Ubuntu and Windows 7 dual boot on SSD + HDD setup
Setup for dual disk (SSD+HDD) with /home partition
Do I need Intel Smart Response when installing Ubuntu?
Move or Install Apps on HDD not SSD
Partitioning and deciding where to put things is more an art than a science... so I can give you some advice that is more personal than technical.
1) keep /
and /home
separated. This will allow you to reinstall another kind of Linux (or Ubuntu) without touching your data and configuration. I have even been able to have two different Linux (Ubuntu and Mandriva, ages ago) running with the same /home
directory and the same desktop configuration... it's really useful for experimenting.
2) Now, 60GB for "/" is quite a big partition for Linux. In my laptop I have installed all possible photo manipulation systems, various video encoders, various games, and it is like this:
(0)samsung-romano:~% df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 88G 9.5G 74G 12% /
But yes --- in your case I would put /
on the SSD (maybe with a 2*RAM swap, although this is much debated), and /home
on the HD.
Another option (will require more work but is more flexible) could be install a 20G root, 2G swap, and the rest /home
on the SSD, and the 200G HD under for example /data
. After install, you can change ownership of /data
to you main user, and move there (and symlink back) the directories that grows too much. (A kind of poor-man LVM). This will have the advantage that the base system will be really snappy, being installed completely on the SSD.
A final option is what I call the "fiddler" option. You can have a number of partition (suppose three - YMMV) of about 30G --- call them p1
, p2
, p3
; and the rest in a very big partition, mounted under /data
and chown
ed to your user. You can have an additional swap partition if you want.
Now you can install your Ubuntu in p1
, installing ALL under /
in this one. Then you can symlink your personal files (documents, pictures, etc) to folders in /data
.
This will permit you to install for example Ubuntu LTS on p1
, the latest beta on p2
, another distro on p3
--- each one with its home and configuration files, but you can share your data between all of them...
The ideal solution would be using a dynamic partitioning thing like LVM, but it's quite complex... This will be very useful when you'll decide to wipe Windows and use just Ubuntu ;-).
Additional info: where do "programs" go?
root partition: here (in
/
,/usr
,/usr/share/
etc.) all the software from the distribution (official repositories and PPA ones) will go. Notice that the old division between/
and/usr
is now practically unused in modern Unix installation(1).home partition: here you will find all your data, or software installed as a normal user (not system-wide). This include, for example, "bottles" of wine (so all the software installed under wine will be in
/home
, virtual machines from VirtualBox, games from CrossOver, etc. In my experience is the part of the system that really need space./usr/local
and/or/opt
: this is the place where programs that you want to compile yourself normally place themselves. You may need this because the program is too new or too old to be in the repository, for developing, or for just playing. I had there my old copy of CivCTP... I usually move these directories under/home
to make it impervious to system (re)install.big games: I have no idea. My biggest game ever was CivCTP and it stayed in less than half a GB (it installed under my home or in
/usr/local
).
(1) Historically(2), when disk space was expensive, we had a /
partition with the minimum to boot the system (/
, /bin
, /sbin
, /etc
, /lib
, /var
, /tmp
) in a standalone way. In this partition went the minimum software and all the directories where the system could need to write. Under /usr
existed a similar scheme with all the software; /usr
was normally shared and mounted read-only by a cluster of machines, in order to save disk space.
(2) I am speaking early 90s here. 100MB disk was a big server.