Friday, 14 October 2011

Partition Setup

I got a new (terabyte) hard drive and wanted to plan out a secondary partition to host /home. Unfortunately, I couldn't remember how much space I needed for swap, and how much Ubuntu itself may need. I was ok with Ubuntu having a fair bit more space than I needed as I could always store stuff on there if I really had to - I just didn't want to be caught with a hard drive that is too small two months down the road.

I read through my old Linux course notes, but that didn't help me much. The Wikipedia page on disk partitioning isn't too bad on refreshing you on how primary & secondary partitions work.

I found a site which makes it pretty clear, with screenshots of examples (though it's not an exact example because they've got a Windows install on there, and they're talking about dual-booting). In the end, I ended up choosing:
Primary, 5000 bytes (=500MB), for boot partition, mount point "/boot"
Logical, 5000 bytes (=500MB), for swap area, no mount point (none will happen)
Primary, 300000 bytes (=30GB), ext4, mount point "/" (this will host Linux)
Primary, 8000000-ish bytes (~800GB, remainder of the drive), ext4, mount point "/home" (to house our users' files)
The numbers you get picked will get fudged slightly because of sizes that disk blocks require, etc.

To view a simple list of disks, usages, and mount points after it's all installed, use

df -h

in a terminal (command line).

No comments: