4

I have a 320GB hard disk. I only use either ubuntu or kubuntu (12.04 for now). I don't want to use windows or any other dual boot os. And i need only 3 partitions on my hard disk. One for the OS and remaining two for data storage. I don't want to create swap also.

Now can i create all primary partitions on the hard disk. Are there any disadvantages in doing so. If all the partitions are primary i think i can easily resize partitions in future.

On second thought i have the idea of using seperate partition for /home. Is it good practice . If i have to do this, i will create 4 partitions all primary. In any case i don't want to create more than 4 partitions . And i know the limit will be 4.

So is it safe to create all 3 or 4 primary partitions. Pls suggest me, What are the good practices .

(previously i used win-xp and win-7 on dual boot with 2 primary partitions and that bugged me somehow i don't remember. Since then i felt there should be only one primary partition in a hard disk.)

EDIT 1 : Now i will use four partitions in the sequence - / , /home , /for-data , /swap . I have another question. Does a partition need continuous blocks on the disk. I mean if i want to resize partitions later, can i add space from sda3 to sda1. Is it possible and is it safe to do ?

EDIT 2 : I have created 4partitions - ( / , /data1 , /data2 , /swap ). The first three partitions are of type ext4. Now the /data1 and /data2 partitions have root account as owner. I must have root permissions for copying normal files to those partitions which might be little inconvenient. What should i do ?? Shall i just take the ownership of these partitions and chmod them to 644. Will this work? "chown user:user /media/data1" and then "chmod 644 /media/data1/*".

1

2 Answers 2

8

In principle there is no problem with all 4 primary partitions. Some of the new computers are shipping with 4 primary partitions. The main concern is, you will have no option to make any more partitions, in case you need one more.

Even though computers these days have enough RAM to run Ubuntu, the operating system has roots in older time when a swap partition was a must. So even though you may not need it, it is a good idea to have one. It will make the system feel happy.

A separate /home partition is actually an excellent idea. I put it in all my Ubuntu installs. This makes fresh installs of new versions dead simple. Sometimes upgrades from the previous versions don't go well. At other times, after four or five upgrades on top of one another, the system gets cluttered with stuff you don't need and a fresh install is the solution. In these situations a separate /home partition makes it easy to retain your personal data and settings while starting afresh with a new system install.

So if you go with /, /home, and swap you still have space for one more primary partition for data.

The partitions need not be in continuous blocks. You can leave unallocated spaces in between. For example, if you leave some unallocated space in between sda3 and sda4. You may later expand sda3 or move sda4 to the left and then expand sda4.

However, when the partitions get very full, there may not be enough space to copy files over for moving partitions. Then you won't be able to move them around. So, it may be better to adjust your partitions sooner than later.

Even though I don't remember the last time I had my data erased or corrupted by fiddling with partitions, it can happen. Sometimes it is operator error, that is, I make the wrong choice. Thus, it is very very important to backup everything in another hard drive before embarking on any kind of partition re sizing, moving, and deleting.

Hope this helps

2
  • Hi, thanks for the answer. Now i will use four partitions in the sequence - / , /home , /for-data , /swap . I have another question. Does a partition need continuous blocks on the disk. I mean if i want to resize partitions later, can i add space from sda3 to sda1. Is it possible and is it safe to do ?
    – user69286
    Oct 14, 2012 at 19:44
  • You are most welcome. Please edit the original question to add the question in the comments above. I will edit my answer. If you think this answers your question correctly, please accept it by putting the green check mark. The check mark will indicate that the question is answered and help others.
    – user68186
    Oct 14, 2012 at 19:49
1

Nope, not ok. Not in your case. Not in about any case, in fact.

There's a question that comes before this... Why creating more than 1 partition? I make it simple for you: there's no reason. 1 partition is enough for your case. And you should always hope for the least amount of partitions, keep things simple.

Disk Partitioning is an outdated solution to solve issues that don't exist any more.

Alleged benefits people come up with: separating OS from user files (I address this below, in "cloning OS installation"), swap partition (all OS'es use swap files now), cache and log files (no OS will flood itself with logs now), easier save from corrupted partition (never seem it happening, and all new partition schemes are basically corruption-free), and the list goes on.

There's really only 2 reasons to create partitions nowadays (user wise), and only 1 of them I consider good. There can be more reasons for very specific situations, none of which pointed to a desktop.

  1. Different OS's need different schemes.

    You know, Windows goes with NTFS, ubuntu ext4, mac is hfs+, and so on. There's no way around this other than having lots of memory for virtualization - which is actually much better, user wise.

  2. Cloning OS installation.

    I can see reasoning for doing this, but I don't buy them. If you're installing a new OS you are better off with a clean install. If you have to replicate a custom OS, you're better off doing the first one and cloning that, in a single partition. The supposed separated files should have their own backup always, anyway, non-related to partition schemes, and all OS's offer solutions for this already. Backing up is way more important than worrying about partitions and all maintenance issues they raise.

1
  • wow, this aged really well! 😇
    – cregox
    May 12, 2022 at 5:44

You must log in to answer this question.