Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 11-28-2005, 09:35 AM   #1
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
Partition scheme on 300GB drive


Im about to install Debian and I could use some suggestions to a partitionscheme.

I was thinking

Swap = 512MB
/boot = 2048MB
/ rest of the drive up to 300GB mounted as root

Filesystem Ext3.

My PC has 768MB of ram so maybe I could do without the swap?

Let me hear some suggestions?

Sincerely, Jorgen
Old 11-28-2005, 09:45 AM   #2
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
Quite wasteful to have such a large /boot partition. And you don't need a separate boot partition in most cases either.
If you are going to have a separate boot partition, I wouldn't make it larger than roughly 100 MB or so, and even that would require some quite uncommon situations to manage fill it up.

For instance, the contents of my entire /boot partition takes only up 11 MiB, and there are two kernels images+initrd there. Worth noting though that the filesystem journal of the filesystem I use on it eats up about 32 MiB, so the disk usage when viewed with df is 43 MB. The size of my /boot partition is 126 MiB.

And "do without the swap" is not recommended. If you run out of physical RAM (not that impossible with 768 MiB), and don't have any swap the system won't really like it...
Roughly speaking about at least 512 megs of swap is good to have regardless of amount of RAM, and depending on one's actual usage one might want to bump the swap up to a size one finds to be suitable for one's needs. E.g. to use some functionalities, e.g. hibernate, you need to have a swap space that is larger than the amount of physical RAM since the contents of the RAM will be copied there.

(and in such situations if one aims to have the swap as close to as possible to the RAM size, one must remember the differences between binary and decimal prefixes, e.g. 768 MiB = 805.31 MB, plus remember the partition sizing being done in blocks, one cannot always get exactly the partition sizes one requests for and therefore one must verify that the swap partition created is larger than the RAM size, otherwise increase the requested size a bit)

Last edited by dastrike; 11-28-2005 at 10:03 AM.
Old 11-28-2005, 10:42 AM   #3
Registered: Jul 2005
Location: La Paz, Bolivia
Distribution: Debian Sarge - Sid, Slackware, Gentoo, openSuse, Fedora, Ubuntu, Mandriva
Posts: 241

Rep: Reputation: 30
Very wise to think ahead the scheme partition, if you can solve it now you will save a lot of time ahead.

I suggest you to have the following scheme partition:

- 1 swap partition of 1GB, this is very important in case you have a lot of programs running at the same time, plus you will be prepared in case you add more RAM to your PC. Remember it's recommended to have a swap partition at least the same size of your RAM.
- 1 boot partition, 256 MB (ext2 or ext3) it's enough for allocate the kernel images and other related files. You will be prepared to have more than one kernel, and in some cases a compiled kernel of your own.
- 1 root partition, 30 GB (ext3 or reiserf), when all the files except /home will reside, in my case my /root partition is filling up quickly an it has only 15 GB so be prepared for future releases when you will need more space for programs.
- 1 partition for /home 30 GB (ext3 or reiserf), it's important to have all your data and configuration files in other partition, specially when you do an upgrade, very useful, a must in my opinion.
- 6 partitions of 25-30 GB (ext3 or reiserf), these partitions will have your data, for example one will be dedicated to mp3, other to video, etc, and also you could have the chance to install other distro, and even Windows....

You can adjust some of them to your needs.

Happy install, and feel free to ask more questions before installing...
Old 11-28-2005, 02:16 PM   #4
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,274

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I take the approach "start small, and enlarge as needed". Someday you may want to add more stuff to that huge drive, but if you partition it completely now that could get in the way later. Partition resizing programs are available, but I don't really trust them. You need to create a backup first in case things go wrong, but if your entire disk is partitioned you might be left wishing you had some extra room somewhere.

I use the following scheme:

/boot 50Mb (way more space than is needed, you could probably get by with 25Mb unless you like lots of different kernels)
swap 512Mb
/ (root) 1Gb (again, way big - I'm only using 13% of that space thus far - but I wanted breathing room since this isn't LVM)

I then create another partition, maybe 5Gb or so, and dedicate that to LVM. I then create one VG with these LV's:

/usr 2Gb
/home 50Mb
/var 1.5Gb
/tmp 512Mb
/opt 50Mb

If you're not familiar with LVM ("Logical Volume Management") , see

As I start to run low on space in any of those LV's, I create another 5Gb logical partition (PV) and add that to the existing VG and then extend whatever LV needs extending. You probably won't need /opt much (depends on what you install) and you'll probably be needing to extend /home fairly quickly. /var will probably remain lightly used on a one-person desktop setup, except for when you do something massive like a dist-upgrade.

Probably more complex that most people do things! But I never feel that I've wasted space or misallocated it, since space is only added to a filesystem when the need arises. Most of my disk remains unallocated.
Old 11-28-2005, 04:04 PM   #5
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
I strongly suggest having a /home partition. This way, if your distro "breaks" or something, you can easily reinstall it without messing up your /home directory. Trust me, this has saved me more times than I can count on one hand.

I don't see the point of a /boot partition really. Personal preference I guess. But as mentioned, You shouldn't make it so big.

Here is my current setup of a 200 gb drive.

swap - 1 gb (i always put 1 gb for swap no matter how much ram I have - even though I haven't used swap in over a year now because i have 1 gb of ram)

/home - 100 gb - all my config crap and doc/image files and music etc etc that I hope I never loose

/mirror - 30 gb - my local repository containing entire sarge 3.1 r0a distro

/(root) - rest of drive

I still consider myself when it come to this type of thing, but I'd say I have pretty decent partitions. My setup may look kinda dull, but I have other things mounted that aren't physically on that computer. I have a few servers running debian and I use NFS to mount my servers' partitions.
Old 11-28-2005, 04:26 PM   #6
Registered: Apr 2005
Location: switzerland
Distribution: debian etch
Posts: 99

Rep: Reputation: 15
as mentioned before, you probably don't need a separate /boot partition.

I'd use a separate /home partition though. so you can install another distro without losing your personal files.
this is the setup I use at the moment on my teeny-weeny 20 GB disk:

swap: 512 MB
root: 5.5 GB
home: 14 GB

If I had 300 GB, I'd leave most of it unpartitioned. you can always add a new partition later if you need more space but resizing/reformatting an existing partition can be tricky.

Old 11-30-2005, 08:47 AM   #7
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Originally posted by stimpsonjcat

If I had 300 GB, I'd leave most of it unpartitioned. you can always add a new partition later if you need more space but resizing/reformatting an existing partition can be tricky.
As a quick note, if you do this, but don't want to have multiple partitions with your data bridging them or anything, then one thing you can do is format the data drive that you expect with be expanding later (or all of your partitions) with the XFS filesystem. This filesystem has tools with which you can grow the filesystem if need be.
Old 12-01-2005, 02:06 AM   #8
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99

Rep: Reputation: 15
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2              1874298    127427   1646867   8% /
tmpfs                   258200         0    258200   0% /dev/shm
/dev/hda1                15022     12880      1341  91% /boot
/dev/hda7            169466268  31281524 129576316  20% /home
/dev/hda5              4807056     33484   4529388   1% /tmp
/dev/hda3             14421376   1758940  11929872  13% /usr
/dev/hda6              4807056    306364   4256508   7% /var
tmpfs                    10240       792      9448   8% /dev
/dev/sda1               491600         8    491592   1% /media/usb
/dev/hde1             39068512  21164640  17903872  55% /mnt/hde
/dev/hdb1             37966500     32828  36005072   1% /mnt/hdb
With 300GB you've got a bit of "disposeable" space that isn't a serious issue to lose; that said you can end up with partitions that are too big or small for what you really need. In a case like this it is much better to split the directories within root up so that problems with one won't hurt the others. I was somewhat excessive with my space allocation, which is part of why all the use% values are so low. haertig has the right idea with using LVM, if you're up to it.

Also, if you've got a second drive in the computer for archives or some such, you can put the swap space on it and the swap will run slightly faster because the head of the 2nd disk can stay over the swap area most of the time. Trouble occurs if you have to take away that second drive; the computer will hiss at you. So you can make more than one swap space (i think the max is 8 swaps with a 2.4||2.6 kernel, i have 2 that are each 512MB) and give the swap space off of the primary disk a higher priority.

Last edited by Lokathor; 12-01-2005 at 02:08 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which filesystem for a large partition (300GB)? OldPlanet Linux - General 1 05-13-2005 09:12 AM
Partition Scheme mschwartz3377 Linux - Hardware 3 04-09-2005 01:36 AM
partition scheme for a 2 gig drive? mipia *BSD 12 01-11-2005 08:18 AM
Partition scheme AlexCPU Linux - Newbie 2 11-19-2004 05:17 PM
HUGE Drive setup: Partition scheme suggestions... tarballed Linux - Networking 2 07-02-2003 04:43 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration