LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Recommended Partitioning Scheme (https://www.linuxquestions.org/questions/debian-26/recommended-partitioning-scheme-142535/)

cragwolf 02-05-2004 03:27 AM

Recommended Partitioning Scheme
 
Linux newbie questions about partitioning coming up!

Let's make the following assumptions:

i) I have a 160 GB hard drive, totally clean, no evil OS on it.
ii) I have 1 GB of RAM.
iii) I want to install Debian-Linux on this hard drive.
iv) As for intended use, I will tinker around with the OS, learning how to use it, possibly connecting it with another machine, connecting to the internet, trying heaps of software packages, and ultimately do software development on it.

Reading the Debian install guide, I see the following recommended partition scheme:

a root partition
/usr on another partition
/var on another
/tmp on another
/home on another
swap space on another

So that's 6 partitions. I read that the root partition should contain the /etc, /bin, /sbin, /lib and /dev directories.

Questions:

1. What about the /boot and /root directories? Do they go on the root partition?
2. What sizes should I use for each partition? The Debian install manual mentions some recommendations, but is it out of date, especially for my system and its indended use? What sizes would you recommend?
3. Would you recommend this partitioning scheme at all? Or another? Maybe just one partition and possibly one other partition for swap space?
4. How big should my swap space partition be? Do I even need it?

llamakc 02-05-2004 07:21 AM

Those instructions don't take into account the sheer size of disks these days. You can ignore them. Instead, think of the way you'll use the machine: Gonna have a bunch of media files (mp3, ogg, avi, mpg?)? I would slice a big part of the disk for media files and format it as vfat (fat32 in Windows) JUST IN CASE you install the Evilness to your disk. If you WON'T have M$ on it at all, its still a good idea to put these on a separate partition in case you bork something down the road: when reinstalling you won't lose them. I prefer /home on a separate partition also. Here's my recommendation:

/dev/hda1 / (At least 20GB)--this will be root and everything EXCEPT
/dev/hda2 swap 512MB
/dev/hda3 /home WHATEVER YOU WANT the /home directory to be. You could make it humongous and keep media here too.
/dev/hda4 partitioned, but not mounted so you may use it for other Linux versions/distros. Make me at least 20GB too.

With this, you can always share swap and /home between two different installs. I rarely use logical partitions so I don't have any advice about that.

Your questions:

1. Yes, /boot and /root can be on the same disk.
2. If you keep it all on one partition, you won't run into size/room issues with that hulk of a disk. At minimum go 20GB but don't be afraid of more. I strongly suggest reiserfs or ext3 though.
3. You may not _need_ swap but I don't know how the box will act w/o it. I'm sure more experienced voices will chime in. The question I have is, with a disk so damn big, what's the problem with alotting at least 512MB to swap?

Good luck.

yowi 02-05-2004 07:35 AM

I'd always reccomend / and /home on separate partitions. Keep all your personal data on /home and you are isolated from any system reinstalls or space issues.
do you really need 20GB for / ?
I'd be tempted to put swat on the first partition for a slight performance improvement due to location on faster outer tracks although with a Gig RAM you may want more performance from /.
Personaly I would also make swap at least equal to physical RAM. It'll come in handy for kernel software suspend to disk if you decide to play with that.
If you plan on dual booting remember windoze likes a primary partition.
Logical partitions are worth utilizing to keep your options open.

In short you want 3 minimum - swap, / and /home. More if you feel adventurous or want to dual boot other distributions/OS's.

There's not very many rules but more opinions on partitioning than leaves in your forest.

pe2338 02-06-2004 02:06 AM

Re: Recommended Partitioning Scheme
 
Quote:

Originally posted by cragwolf
Linux newbie questions about partitioning coming up!

Let's make the following assumptions:

i) I have a 160 GB hard drive, totally clean, no evil OS on it.
ii) I have 1 GB of RAM.
iii) I want to install Debian-Linux on this hard drive.
iv) As for intended use, I will tinker around with the OS, learning how to use it, possibly connecting it with another machine, connecting to the internet, trying heaps of software packages, and ultimately do software development on it.

Reading the Debian install guide, I see the following recommended partition scheme:

a root partition
/usr on another partition
/var on another
/tmp on another
/home on another
swap space on another

So that's 6 partitions. I read that the root partition should contain the /etc, /bin, /sbin, /lib and /dev directories.

Questions:

1. What about the /boot and /root directories? Do they go on the root partition?
2. What sizes should I use for each partition? The Debian install manual mentions some recommendations, but is it out of date, especially for my system and its intended use? What sizes would you recommend?
3. Would you recommend this partitioning scheme at all? Or another? Maybe just one partition and possibly one other partition for swap space?
4. How big should my swap space partition be? Do I even need it?

1. /boot can be on the / partition and can be on a separated one (mandatory if you use reiserfs on / and lilo) that is small (max. 100MB)
2. use /home and /tmp on a separated partition
pick your choice for the size of /home, use a 256MB or more for /tmp with tmpfs
I don't recommend /tmp on / partition - can cause data corruption

you can use /usr and /var on different partitions (so 2 more)
^ this ^ will decrease the need of space on /

use a swap partition of 2GB (double of the RAM size), you might/might not need this, depending on the software you use at a time....

3. the scheme is ok, but with the observations on 2.
(especially the /tmp recommendation)

4. see the end of 2.


All times are GMT -5. The time now is 02:59 AM.