Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a new clean HDD in my laptop on which I want to install Ubuntu 11.10. So, as I have very less (in fact nothing) knowledge on Linux File System hierarchy, I thought some would be helping me to choose the best one.

Here is what I briefly do on Ubuntu.

  1. Learn programming (should maintain my project files) # I am a student. (Sometimes, I had to install few external packages too. Though they never were more than 200 MB each)
  2. I use software's like Matlab, Netbeans, Eclipse etc.
  3. Store lots of music, movies, photos
  4. I have a good set of ebooks, office documents (includes documentations of packages).
  5. Download many files..

This is what a normal user would probably do.

What I am actually searching for is that, how do I maintain all those file if I have created only 2 partitions "/" and "/home". Of course, all of these would come under "/home". Wouldn't they look messy??

I windows, I could create 4 partitions, each of them I use for different purposes.

Actually, I have gone through Ubuntu Linux File System hierarchy and got to know that each directory has some special significance. Thus each directory should be used for their respective purposes (as recommended).

So, I want to know how should I partition my HDD and what directories should I mount them to those partitions and what kind of files should I place in them.

share|improve this question
    
I am not using WINDOWS. Just Ubuntu –  0cool Feb 25 '12 at 11:41

4 Answers 4

The good thing about Ubuntu is you really don't need to worry about disk partitions. If you are a normal user, and from your description, you are, you can go with the defaults quite happily, unless you have a burning desire to mess around, or if you have something which could increase in size in such a way as to fill up a partition (eg logging very verbose logs into /home could end up filling it and causing you problems, so doing that is generally not recommended)

Filesystems under unixes are not messy once you understand the structure - it is actually much more straightforward than Windows, for example.

You can of course move any part of your filesystem wherever you want - I tend to have my main music store (an external terabyte disk) mounted at /home/music but I could have put it anywhere.

Default under Ubuntu: Two partitions

  • /
  • swap

Common alternative: Three partitions

  • /
  • /home
  • swap
share|improve this answer
    
How does the standard partition scheme would look like? –  0cool Feb 25 '12 at 10:44
    
Actually, I am going through ubuntu documentation link where they has mentioned to give a special partition for /usr/local if someone want's to install more applications that are not part of ubuntu –  0cool Feb 25 '12 at 10:46
    
The good thing is that you can do this if you want, but it is entirely unnecessary for the sort of usage you describe –  Rory Alsop Feb 25 '12 at 10:50
    
@0cool, not if someone wants to install "more applications...", but if someone wants to install many. –  Chan-Ho Suh Feb 25 '12 at 11:53

The data you will do with could be defined such useful way:

  1. OS files come from installation
  2. Various settings defined on per user basis - .bashrc, .vimrc, and most of those hidden sub direcories in users home directories
  3. optional packages you'll want to install later in /opt, /usr/local
  4. A lot of media files: movies, music, photos, ebooks, etc.
  5. Backup data. In case you don't have a separate drive (internal or external) you may find useful to have backup partition to save your data from deletion by mistake or from accidental damage of origin partition.

It is convenient to separate these sorts of data. The obvious division is sorting out media files to separate partition. It is convenient to keep your home clean and small,e.g. to speed up grep-ing and find-ing in it. Also to simplify archiving and backing up. There are other reasons for data partitioning.

I partitioned my 1Tb disk such way:

Filesystems            Size Used  Avail  Used% mounted
/dev/sda3            1008M  408M  550M  43% /
none                  493M  292K  493M   1% /dev
/dev/sda7             5,0G  196M  4,5G   5% /tmp
/dev/sda5              97M   52M   41M  56% /boot
/dev/sda10             35G    4G   31G  11% /home
/dev/sda6              15G  6,6G  7,5G  48% /usr
/dev/sda8             9,9G  1,3G  8,1G  14% /var
/dev/sda9             693G   62G  596G  10% /data
/dev/sda11            158G   15G  135G  10% /backup

I use my ubuntu about 2 years and data fit given limits with significant reserve. But now I find that putting /boot, /var, /tmp and /usr to separate partitions is redundant, and if I need I divide my disk a bit different way:

  4G swap of doubled RAM size
 30G /
 16G /home which will contain users application settings and documents and specific software like RVM (ruby version manager)
750G /data  with large and numerous media files
200G /backup  

Also I find useful to make ~/Downloads, /opt, ~/Music soft links to /data subfolders I also use backuppc which automates backing up to backup partition.

share|improve this answer
    
you mean, should I partition without mounting and later create folders so that I create mounting like "/data or /backup" ?? –  0cool Feb 25 '12 at 11:41
    
yes, firstly partition disk, then install ubuntu, then make folders and edit fstab. –  zuba Feb 25 '12 at 11:55
    
Definitely overkill and could well cause confusion for someone new to Linux... Good structure for a more experienced user though –  Rory Alsop Feb 25 '12 at 11:58

None of the recommendations here mention that in a manual partitioning set up one MUST include at least 35mb IEF boot partition for the grub and other boot data to go into. I didn't know this and wonder why my 2tb hard drive would not boot up after installation.

Luckily when I went to reinstall and selected the option to "Erase and reinstall" on ubuntu 13.10 it threw up a message telling me what had to be done.

share|improve this answer

You don't mention whether you're wanting dual boot with windows. Some folk have to because there are Windows programs with no current linux alternative -for instance, Dragon Dictate, an excellent speech recognition program or the Rosetta Stone line of language programs.

Regardless of your dual booting needs, I would recommend four partitions for linux.

/root - 10Gb ~ 15Gb Ext 4 (sounds a lot but opting for a really small /root can give problems later)

/swap - 1Gb

/home - 20GB ~ 40Gb Ext 4 (This range regardless of dual booting or not)

/win - Taking up the rest of your HD, formatted as ntfs. Why ntfs? I'll explain my preference like this: if you ensure you have ntfs-3g and ntfs-config installed then after a few moments with ntfs-config you will be able to read and write to your ntfs partition(s) and to external devices too, which is useful. You would be able to store data on the ntfs partition you created. This is good because, with a little work on samba, you should be able to share that data with a networked Win machine, and vice versa. Additionally, if booted into Windows, you would be able to see the /win partition, potentially useful for exchanging data between OS. This is thanks to the open nature of linux: Windows machines can not easily 'see' linux partitions. Please do not think I'm setting out to 'talk dirty' by mentioning Windows: I live in the real world and recognise that many linux users have no option but to use both OS. Mostly, I use Ubuntu or Debian on my network, with an unavoidable Win machine.

At any rate, now you know my recommended setup. (I also recommend Ubuntu Tweak!)

HTH

share|improve this answer
    
I reiterate that some have no option but to use windows for the reasons stated in my post. The setup I describe has worked well for several years on a small network of 9 computers with no problems and with invaluable operational advantages. I'm disappointed to have been voted down because I mentioned an os other than Ubuntu. –  Vic Feb 25 '12 at 14:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.