Partitions, /home etc...

SuperAntMD

Expert Member
Joined
Apr 29, 2005
Messages
1,063
Reaction score
1
Location
Location; Location
Alright people,

So I'm about to build my ubuntu box.

All new hardware, Karmic, and a 1Tb hdd.

What I really need is some help setting up the partitions, I would like a separate /home partition but am not sure where to go from there. Ideally the easiest to manage, fastest running machine is what I after.

Can I do this from the standard .iso or do I need the alternate cd?

Any other suggestions would be most welcome :cool:
 
What I do is have 2 drives, 1 drive partitioned as "/" and about 10gigs left over for "swap". 2nd drive just for "/home".

You can partition using the desktop live cd.
 
Don't you think 10Gig is a bit overkill for swap?

Your PC will very seldom, rarely, in the most extreme cases use more than 512Mb of swap.
 
What I do is have 2 drives, 1 drive partitioned as "/" and about 10gigs left over for "swap". 2nd drive just for "/home".

You can partition using the desktop live cd.

10Gigs for swap is overkill.

@OP

Ideally you would want 4 Partitions (esp if you are dual booting with windows).
My desktop is something like this atm

1X OS Part (ext4 +- 10GB)
1X /home (ext4 +-10GB)
1X Swap (swapfs +-1GB)
Rest of space formatted as FAT32 for storing of music/movies/documents so that is easily accessible by windows. Another advantage of having a separate /home is that if you reinstall/ upgrade you won't lose all your configs etc.

Good luck!
 
Don't you think 10Gig is a bit overkill for swap?

Your PC will very seldom, rarely, in the most extreme cases use more than 512Mb of swap.

I know it's a lot but my drive is 300GB so it's not going to cost much. 2GB is the most you need to be safe.
 
I tend to put /boot in its own 100MB partition at the beginning of the drive. That way if I want to get clever with Software RAID or LVM its not a problem.

Then about 10GB for / as previously mentioned. Swap space is usually recommended to be about 2x the installed memory of the system. That said most new systems come with adequate memory and a swap partition of more than 2GB is probably wasteful.

Remember that it is much easier and safer to resize (ie move the endpoint) a partition than it is to move the beginning point of the partition. I generally put the partitions that are likely to change near the beginning of the drive and /home near the end.
 
Just for interest sake:
If you want to know how much swap you PC really uses, fire up all the applications you think you would need at any single time and issue the following command:

swapon -s

Now you know if you have just the right amount of swap or way too little or much.
 
10Gigs for swap is overkill.

@OP

Ideally you would want 4 Partitions (esp if you are dual booting with windows).
My desktop is something like this atm

1X OS Part (ext4 +- 10GB)
1X /home (ext4 +-10GB)
1X Swap (swapfs +-1GB)
Rest of space formatted as FAT32 for storing of music/movies/documents so that is easily accessible by windows. Another advantage of having a separate /home is that if you reinstall/ upgrade you won't lose all your configs etc.

Good luck!

No windows in this house ;)

What is the difference between the /home partition and a separate one for media etc?

Is there any advantage to using FAT32 if there isnt Windows on the machine? Any disadvantage?

Is all of this going to be straight forward when I do the install or am I going to suffer?
 
If there is no windows, then you can dump the data partition. You can then store everything in /home.

The reason i use a separate partitions for data and /home is because i formatted my /home as ext4. I also don't want to install the ext2 driver into windows. I would rather have my data independant of either OS. So in my case, my /home folder contains my scripts and configs etc.

There is no advantage to using FAT32 if there no windows. Rather use ext3/ext4 or some other native linux filesystem. (Better stability/journaling etc).

It is dead easy to do. When you create your partitions just remember to set the mount points (if you doing it manually.) i.e when creating your /home partition remember to set the mount point as /home. When you set up your main Ubuntu OS installation partition remember to set the mountpoint as / . Other than that its dead easy. If you get stuck, or need more explanations or my post isn't clear (it probably isn't). Typing it on a netbook and I need to get somewhere fast! haha :P Don't hesitate to shout/scream/<insert response here>
 
My partitions are:
/boot 128Mb
/swap 2Gb
/ 70Gb
/home 78Gb
 
Don't use fat32. You will have more problems than solutions, trust me.

If you really want a partition readable by windows, go with NTFS and use NTFS-3G in linux to read/write to that partition.

Anyways, apart from /home and MAYBE /boot there is no reason to split off any other folder for the linux structure.

Personally I even keep /home on my main partition. I do back it up occasionally, but I have seperate drives with all my data on, which all get mounted under /mnt and given permissions to my user account.
 
At most your swap space should be equal to how much RAM you have. This is especially true if you want to use hibernate as the hibernation data is stored in swap and copies the contents of your physical RAM onto disk and so of course needs as much space as you have RAM to do it.
 
In the old days, swap was calculated as 2x ram, but since systems in general have a lot of ram, the newest recommendation (from Sun), is to use 4Gb for swap. In general your system should not be using swap at all under normal use.

For home use, I wouldn't go over 2Gb of swap. If you install a server, then go for 4Gb, but not much more. If your server have 8Gb, or more of ram, and your are going into swap, you have configured your application wrong for the hardware it is installed on.

Personally, I have a "/", swap and "/home" partition. I have used a 100g for "/", which is a lot, but I knew I would be installing everything I could :p Swap is 2g, and "/home" the rest of the 250g HDD.
 
Here is what I do. I make 0 swap partitions. If I do need swap space after install, I just dd from /dev/zero to a filename and mount that file as a swap. Maybe it wont be as fast as a swap partition, but generally speaking you will not even notice the difference. This also gives me the ability to move the file around even to a different hard disk, but I do agree you won't hibernate to it.

Who uses hibernate any ways when suspend to ram is 100x better.
 
Top
Sign up to the MyBroadband newsletter
X