# Ubuntu – Installing programs in root vs home partitions

dual-boothome-directorypartitioningrootssd

I'm a new Linux user and a Windows convert. I tried Ubuntu (Dapper Drake) a few years ago and liked it quite a bit, and I'm in the process of installing Xubuntu 13.10 along side Windows7 on my brand new SSD! At this point, Windows is still being installed because I need it to be, but Linux is getting installed because I want to use it! I've done quite a bit of research and I've toyed around with Linux before, but I'm still a newbie and I have a few questions concerning partitions and program installations..

My new SSD isn't huge (120GB Samsung 840 EVO), and I'll be using my old 800GB HDD as a secondary drive. The thing is, I plan on using Linux as much as possible; only switching over to Windows7 when I absolutely need to. Because of this, I'll be doing a 50:50 split of my SSD for each OS (60GB for Linux, 60GB for Windows). I'm also planning on splitting my old, 800GB HDD into 3 partitions: some space for extra linux programs, some space for extra windows programs, and then a shared NTFS partition for all of my data (music, videos, documents, etc.).

So to sum up my space situation:

• ~60gb SSD + 200gb HDD for Linux..
• ~60gb SSD + 200gb HDD for Windows..
• ~400gb shared NTFS..

This leads me to my questions.. While I have a fairly good idea of how my Windows setup will work (60gb C: drive, 200gb D: drive, etc.), the Unix/Linux directory structure is still very new to me and is making this process a little bit confusing. I know that it's possible (and common) to partition your "/" directory and "home" directory separately, and – as I understand it – the "/" partition is meant to contain system specific programs and data, while the "home" partition contains the programs and data of the various users.

However, I've also heard that most (if not all) of the programs that you install from repositories using APT are installed into the "/" directory. As someone who works with music/art programs and plays games (which can take up a LOT of space), this leads me to believe that I'll need a large "/" partition!

I've also read (from here: http://www.control-escape.com/linux/lx-partition.html) that the "home" directory is "the place where all the user-specific files, your data in other words, are stored. It is roughly equivalent to the “My Documents” folder on a MS Windows desktop". But, as I mentioned above, I intend to keep all of my non-OS-specific data (music, documents, videos, etc.) on my ~400gb shared partition, anyway. This really leads me to believe that I don't need a big home partition at all and that I should focus on partitioning as much space as possible for "/". And still, I've heard other people claim that you only need around 10gb of space for your root partition!?

Edit: Also, I just found out that programs like Steam and Wine take up space inside the "home" directory.

So, what should I do? I basically have 60gb SSD and 200gb HDD space for holding nothing but Linux programs. All of my data will be going onto my 400gb shared NTFS partition, so is it even worth making separate partitions for "/" and "home"? If I install both root and home on my 60gb SSD, how can I also use the extra 200gb of HDD space for more Linux programs? Can I expand root across multiple drives somehow, or maybe have a symlink or something that connects the two drives together?

As I said before, I'm still a major Linux newbie, so there may be something that I've completely misunderstood or overlooked. As someone who does a lot of art/music creation and gaming on my PC, I tend to use up a lot of program space quite quickly, especially since games and music libraries just keep getting bigger and bigger every year! Thanks for the help, I'm looking forward to learning more about Linux! :]

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