You are not logged in.

#1 2009-09-20 18:16:49

nucleuswizard
Member
From: Serbia
Registered: 2007-10-07
Posts: 79

[SOLVED]Perfect partitioning of hard disk?

I have 120 Gb HDD ATA WD and I want to install Arch,problem is that I don't know how much to give to

/
/boot
/home
/user
/tmp
/var
swap

to be perfect.Which FS type (ext2,ext3..etc),part type (Primary,Extended,Logical) to put for each one of them.Also what options to put in fstab for each one of them to be secure.

Last edited by nucleuswizard (2009-09-21 16:45:11)

Offline

#2 2009-09-20 18:28:16

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: [SOLVED]Perfect partitioning of hard disk?

Use only:

/ - ext4
/home - ext4
/var - reiser
/tmp - in ram
swap - swap

Preporučam da ti /, /var budu primarne.
A /home, swap na logičkoj. Zašto? tako da imaš više fleksibilnosti jer na jedan disku možeš imati maksimalno 4 particije. Dakle, slobodno možeš imati dual/triple boot kao primarne. A ostaje ti logička za podatke, tj home. Ne ovisno o primarnima. Tako sam ja kod sebe postavio.

Offline

#3 2009-09-20 18:38:48

xthon
Member
Registered: 2009-08-16
Posts: 4

Re: [SOLVED]Perfect partitioning of hard disk?

ammon wrote:

/tmp - in ram

how can i do that?

Offline

#4 2009-09-20 18:42:13

ftornell
Member
Registered: 2008-08-18
Posts: 277
Website

Re: [SOLVED]Perfect partitioning of hard disk?

I have 100 GB on my drive with 4GB ram.
Always using like:

/ - ext4 (96GB)
swap - (4GB)

Any comments?


[ logicspot.NET | mempad.org ]
Archlinux x64

Offline

#5 2009-09-20 18:46:56

japetto
Member
From: Chicago, IL US
Registered: 2006-07-02
Posts: 183

Re: [SOLVED]Perfect partitioning of hard disk?

What type of system are you running (server/desktop), and what type of data will you be storing?

Offline

#6 2009-09-20 18:47:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED]Perfect partitioning of hard disk?

You're gonna get many different answers to this.  It's really a matter of personal choice.

/ ext4, 15 G
/boot ext3, 0.2 G
/home ext4 20 G
/user - keep it on /
/tmp - keep it on /
/var ext4, 10 gigs
swap - depends on your RAM.  I have 8 gigs and have never needed to use swap although I have 4 G

You forgot a data partition:
/data ext4 - rest of the drive


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-09-20 19:04:29

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: [SOLVED]Perfect partitioning of hard disk?

For /tmp in ram add this to your /etc/fstab

none                    /tmp        tmpfs   nodev,nosuid,exec,nodiratime,size=512m 0 0

size - as you wish, i keep it at 1/4 of my total ram.

Offline

#8 2009-09-20 19:26:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED]Perfect partitioning of hard disk?

@ammon - can't that get you into trouble?  I know k3b likes to write temp iso images to /tmp/kde-user for example..??


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2009-09-20 20:13:30

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: [SOLVED]Perfect partitioning of hard disk?

ftornell wrote:

I have 100 GB on my drive with 4GB ram.
Always using like:

/ - ext4 (96GB)
swap - (4GB)

Any comments?

That seems logical, but that swap will only be used if you are running x86-64.

Offline

#10 2009-09-20 21:01:35

Darkfire Fox
Member
From: California
Registered: 2009-09-01
Posts: 14

Re: [SOLVED]Perfect partitioning of hard disk?

I have a 200 GB (186.7 GiB) IDE hard drive and 2 GiB of DDR RAM. On a single extended partition:

/               10.0 GiB    ext4
/boot          1.0 GiB    ext2
/usr          20.0 Gib     ext4
/var          10.0 GiB    ext4
/tmp         10.0 GiB    ext4
/home     130.0 GiB    ext4
swap          5.7 GiB

Previously, I've used just two primary partitions; one for the whole entire system, one for swap.  I was using Ubuntu.  This is the first time I've use the extended/logical partition setup, so I don't really know if it's optimal.  But it seems close.  I cheated and used gParted that came with the Ubuntu live CD to partition my HDD before booting the Arch CD. roll

Offline

#11 2009-09-20 22:18:33

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED]Perfect partitioning of hard disk?

ftornell wrote:

I have 100 GB on my drive with 4GB ram.
Always using like:

/ - ext4 (96GB)
swap - (4GB)

Any comments?

lol, that's what i like.  I've done alot of distro installs and done alot of partitioning schemes.  Last I did a / and a /home so that if I wanted to use a different distro they could share a home partition but since i'm happy with arch when I reinstalled everything I did as you did.  Some people would say that this isn't best for security but since I'm the only one using this computer and since any top-level security expert can hack into just about any box (unless a security expert yourself) I just kept it basic and don't have to adjust partition sizes later.  For swap I've created a swapfile but have yet to activate it.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#12 2009-09-20 22:37:35

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: [SOLVED]Perfect partitioning of hard disk?

nucleuswizard wrote:

I have 120 Gb HDD ATA WD and I want to install Arch,problem is that I don't know how much to give [...].

Ten to fifneen gigabytes for root, and give the rest to your user data (/home) partition.  You do not need a separate boot partition unless you are using an esoteric filesystem on your root partition that not supported by GRUB.  If you want your temporary filesystem in RAM, then *bind* it to /dev/shm.  The way I do it is in /etc/rc.tmpfs...

#!/bin/bash
### Bind temporary directories to Tmpfs ######
# I do this instead of mounting tmpfs on the #
# directories, so less memory gets wasted.   #
##############################################
rm -rf /var/log/*

mkdir -p /dev/shm/{tmp,lock}
mount --bind /dev/shm/tmp /tmp
mount --bind /dev/shm/tmp /var/tmp
mount --bind /dev/shm/lock /var/lock
chmod 1777 /dev/shm/{tmp,lock}

...and after /bin/rm -f /forcefsck &>/dev/null in /etc/rc.sysinit...

. /etc/rc.tmpfs

Offline

#13 2009-09-20 22:42:35

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [SOLVED]Perfect partitioning of hard disk?

It's not just about security. IMO it makes things easier to maintain.
/var on a separate partition is good particularly with Arch and the pacman cache.


neutral

Offline

#14 2009-09-21 01:13:39

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: [SOLVED]Perfect partitioning of hard disk?

"Perfect partitioning of hard disk?"

No such thing.  There are many threads covering this ad nauseum.


thayer williams ~ cinderwick.ca

Offline

#15 2009-09-21 08:47:06

nucleuswizard
Member
From: Serbia
Registered: 2007-10-07
Posts: 79

Re: [SOLVED]Perfect partitioning of hard disk?

thayer wrote:

"Perfect partitioning of hard disk?"

No such thing.  There are many threads covering this ad nauseum.

You are right,maybe the title is not best suitable for my question.

Right,I have decided how to prepare my hard disk:

/             - 4 GB
/boot       - 600 Mb
/usr         - 10 GB
/tmp        - 5 GB
/var         - 8 GB
swap        - 1 GB  (I will upgrade my RAM memory for 1 GB and currently I have 1 GB )
/home      - rest of HDD

All partitions will be ext4 except /boot ext3 and swap.Now I don't know which partitions to put as extended and which to be primary,because there can be only 4 primary.Maybe the right selection could be:

/ , /boot , swap , /usr to be primary

/home , /var , /tmp to put in extended

Last edited by nucleuswizard (2009-09-21 08:55:46)

Offline

#16 2009-09-21 09:59:18

Surgat_
Member
Registered: 2007-08-08
Posts: 317

Re: [SOLVED]Perfect partitioning of hard disk?

You can use up to 4 primary and extended partition. This means that you will probably have 3 primary partitions and an extended one, which will hold the other partitions as logical ones.

Offline

#17 2009-09-21 10:41:16

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED]Perfect partitioning of hard disk?

nucleuswizard wrote:
thayer wrote:

"Perfect partitioning of hard disk?"

No such thing.  There are many threads covering this ad nauseum.

You are right,maybe the title is not best suitable for my question.

Right,I have decided how to prepare my hard disk:

/             - 4 GB
/boot       - 600 Mb
/usr         - 10 GB
/tmp        - 5 GB
/var         - 8 GB
swap        - 1 GB  (I will upgrade my RAM memory for 1 GB and currently I have 1 GB )
/home      - rest of HDD

All partitions will be ext4 except /boot ext3 and swap.Now I don't know which partitions to put as extended and which to be primary,because there can be only 4 primary.Maybe the right selection could be:

/ , /boot , swap , /usr to be primary

/home , /var , /tmp to put in extended

You can't do that. You can only have 4 primary partitions, one of which will be extended and will "house" the actual logical partitions (know what I mean?)

My advice would be to make swap the first primary partition, then /boot and then extended the third one and dump everything else there.
I would also increase swap to ~2GB and wouldn't bother with a separate /usr partition

Last edited by moljac024 (2009-09-21 10:41:44)


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#18 2009-09-21 16:44:44

nucleuswizard
Member
From: Serbia
Registered: 2007-10-07
Posts: 79

Re: [SOLVED]Perfect partitioning of hard disk?

@Moljac024

I partitioned HDD with your suggestion except I made /usr partition.Thanks....................Hvala

Offline

#19 2009-09-26 17:52:29

tcoffeep
Member
From: Timmins, Ontario
Registered: 2008-11-26
Posts: 99

Re: [SOLVED]Perfect partitioning of hard disk?

swap   - /dev/sda5  -  4gb   - swap
/         - /dev/sda6  -  5gb   - ext4
/home - /dev/sda7  - 15gb  - ext4
/var    - /dev/sda8  - 10gb  - ext4
/tmp   - /dev/sda9  -   4gb  - ext4
/boot  - /dev/sda10 - 50mb - ext2
/usr    - /dev/sda11 - 50gb  - ext4
/jail    - /dev/sda12 - 12gb  - ext4

(jail is where i put all my junky files that just take space. helps me keep my home partition clean)

(also : i'm not really "up-to-date" on what is good for what in the world of filesystems)

Last edited by tcoffeep (2009-09-26 17:53:56)


=============== Read An Essay ===============
   Distro : Funtoo Linux || Kernel : ckernel-2.6.30-gentoo-r5
Processor : Athlon 64 X2 4400+ || RAM : 2GB || HD : 300GB
========================================

Offline

#20 2009-09-26 23:12:13

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED]Perfect partitioning of hard disk?

tcoffeep wrote:

swap   - /dev/sda5  -  4gb   - swap
/         - /dev/sda6  -  5gb   - ext4
/home - /dev/sda7  - 15gb  - ext4
/var    - /dev/sda8  - 10gb  - ext4
/tmp   - /dev/sda9  -   4gb  - ext4
/boot  - /dev/sda10 - 50mb - ext2
/usr    - /dev/sda11 - 50gb  - ext4
/jail    - /dev/sda12 - 12gb  - ext4

(jail is where i put all my junky files that just take space. helps me keep my home partition clean)

(also : i'm not really "up-to-date" on what is good for what in the world of filesystems)

I have a similar partitioning scheme, but every time the FS mounted at /tmp is checked at startup, there is a warning that "lost+found is not found... creating", but after booting, I can not find this directory. Thus my question: is ext4 good for /tmp?

Thanx,
L.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#21 2009-09-26 23:16:49

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED]Perfect partitioning of hard disk?

Since this thread is solved, I'm going to bump it a bit.

graysky wrote:

@ammon - can't that get you into trouble?  I know k3b likes to write temp iso images to /tmp/kde-user for example..??

It's a question that I've wondered too. Anyone?

Offline

#22 2009-09-26 23:20:45

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: [SOLVED]Perfect partitioning of hard disk?

skottish wrote:

Since this thread is solved, I'm going to bump it a bit.

graysky wrote:

@ammon - can't that get you into trouble?  I know k3b likes to write temp iso images to /tmp/kde-user for example..??

It's a question that I've wondered too. Anyone?

I'm sorry for posting a question then... kind of missed the SOLVED part. I'll open another thread, if there is no quick answer...

L.


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#23 2009-09-27 23:34:17

tcoffeep
Member
From: Timmins, Ontario
Registered: 2008-11-26
Posts: 99

Re: [SOLVED]Perfect partitioning of hard disk?

Leonid.I wrote:
tcoffeep wrote:

swap   - /dev/sda5  -  4gb   - swap
/         - /dev/sda6  -  5gb   - ext4
/home - /dev/sda7  - 15gb  - ext4
/var    - /dev/sda8  - 10gb  - ext4
/tmp   - /dev/sda9  -   4gb  - ext4
/boot  - /dev/sda10 - 50mb - ext2
/usr    - /dev/sda11 - 50gb  - ext4
/jail    - /dev/sda12 - 12gb  - ext4

(jail is where i put all my junky files that just take space. helps me keep my home partition clean)

(also : i'm not really "up-to-date" on what is good for what in the world of filesystems)

I have a similar partitioning scheme, but every time the FS mounted at /tmp is checked at startup, there is a warning that "lost+found is not found... creating", but after booting, I can not find this directory. Thus my question: is ext4 good for /tmp?

Thanx,
L.

Well, right now, I'm using Funtoo, and I haven't had any complaints from my comp yet.


=============== Read An Essay ===============
   Distro : Funtoo Linux || Kernel : ckernel-2.6.30-gentoo-r5
Processor : Athlon 64 X2 4400+ || RAM : 2GB || HD : 300GB
========================================

Offline

#24 2009-09-27 23:36:35

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [SOLVED]Perfect partitioning of hard disk?

skottish wrote:

Since this thread is solved, I'm going to bump it a bit.

graysky wrote:

@ammon - can't that get you into trouble?  I know k3b likes to write temp iso images to /tmp/kde-user for example..??

It's a question that I've wondered too. Anyone?

I used to have a ~2GB /tmp partition back when I still used k3b and it wasn't a problem...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#25 2009-09-27 23:44:56

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: [SOLVED]Perfect partitioning of hard disk?

No problems.
If you need to place some big files in tmp (like k3b dvd image), why not to change temp directory for that program?

Offline

Board footer

Powered by FluxBB