You are not logged in.

#1 2010-06-05 11:20:03

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Arch Linux Partitions And Filesystems

Hi everyone!

I'm pretty much new to Linux having used Ubuntu about 2 years back. Recently I've been looking to get a better understanding of the system and wanted to try out a different distro. I searched around and came across Arch. I really liked the principle on which this distribution is based and  have decided to give it a go.

I have 2 SATA HDDs in my system.

1. 1TB Seagate --> Windows 7
2. 160GB Seagate --> Windows XP

I want to install Arch on the 160GB HDD. I'll remove XP and the entire HDD will be for Arch.

What I would like to know is the partitions that I should create. Should I go with /boot, /, /var, /usr, /home, /temp? Or lesser number of partitions?

What sizes should they be?

And which ones should be primary and which ones extended, if at all? What file systems should I use for the different partitions? (I had been considering ext4,  XFS and Reiser.) It would help if someone would direct me to the appropriate ones for each partition.

Also, I could not understand the difference between the /usr and /home directories. What are their uses? Where do my programs (obtained through Pacman or otherwise) get installed?

Any help is greatly appreciated.

Thank you. smile

Offline

#2 2010-06-05 11:58:54

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Arch Linux Partitions And Filesystems

I am by no means a professional, I recently installed Arch and I am loving it. I like this setup:


Primary / (10~15gb) ext4
Primary /home (a lot of space) ext4
extended
Logical /var (5-10gb is more than enough) reiseifs
Logical /tmp (1gb should be more than enough) reiserfs

I don't use a boot partition, and I don't use a swap partition because I have more than 2gb of ram and I haven't seen the need for it yet. I think it depends a lot on your own preference and how you use your PC. I am sure people will post a lot of helpful information smile


edit:

I would suggest breaking up the HD even more by using a storage partition containing a lot of that space.... most users wouldn't come close to using all of that space on an OS, and a storage partition where you could place music, videos etc would be safer in case of a problem with the OS.

Last edited by Google (2010-06-05 12:01:27)

Offline

#3 2010-06-05 12:12:46

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

Thank you Google.

Any ideas on the /home and /usr difference?

Google wrote:

I would suggest breaking up the HD even more by using a storage partition containing a lot of that space.... most users wouldn't come close to using all of that space on an OS, and a storage partition where you could place music, videos etc would be safer in case of a problem with the OS.

Another extended partition? Use XFS?

Offline

#4 2010-06-05 12:42:23

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Arch Linux Partitions And Filesystems

According to the wiki:

/ (root) The root filesystem is the primary filesystem from which all other filesystems stem; the top of the hierarchy. All files and directories appear under the root directory "/", even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. Therefore, certain directories under / are not themselves candidates for separate partitions. (See warning below).

/boot This directory contains the kernel and ramdisk images as well as the bootloader configuration file, and bootloader stages. /boot also stores data that is used before the kernel begins executing userspace programs. This may include saved master boot sectors and sector map files. /boot is essential for booting, but is unique in that it may still be kept on its own separate partition (if required).

/home User data and user specific configuration files for applications are stored in each user's home directory in a file that starts with the '.' character (a "dot file").

/usr While root is the primary filesystem, /usr is the secondary hierarchy, for user data, containing the majority of (multi-)user utilities and applications. /usr is shareable, read-only data. This means that /usr shall be shareable between various hosts and must not be written to, except in the case of system update/upgrade. Any information that is host-specific or varies with time is stored elsewhere.

/tmp directory for programs that require temporary files such as '.lck' files, which can be used to prevent multiple instances of their respective program until a task is completed, at which point the '.lck' file will be removed. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program and files and directories located under /tmp will typically be deleted whenever the system is booted.

/var contains variable data; spool directories and files, administrative and logging data, pacman's cache, the ABS tree, etc. /var exists in order to make it possible to mount /usr as read-only. Everything that historically went into /usr that is written to during system operation (as opposed to installation and software maintenance) must reside under /var.

I really don't see the difference between usr and home on a typical Linux install, especially if you're the only person using the PC.

As for the other storage partition, I am using a primary NTFS partition for storage. I am using NTFS because I have access to the partition inside Windows and Linux, which makes swapping files around easy and I can use all of my Windows files in Linux and vice-versa.

Offline

#5 2010-06-05 12:43:07

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Arch Linux Partitions And Filesystems

My suggestions:

------------------------------------------------------------
1:
64M      /boot ext2
???      swap 
100%     btrfs {
            15GB   /
            100%  /home
}
------------------------------------------------------------
2:
64M      /boot    ext2
15GB     /        ext4
???      swap 
100%     /home    ext4
------------------------------------------------------------
3:
64M   /boot  ext2
160GB    LVM2 {
             15G     /       ext4
             ???     swap
             100%    /home   ext4
}
------------------------------------------------------------
Google wrote:

"I really don't see the difference between usr and home on a typical Linux install, especially if you're the only person using the PC."

/usr is where the majority of the stuff you install on the system ends up.

/home is where you stick actuall user data, like movies, documents, music, art stuff  and so on

Last edited by Mr.Elendig (2010-06-05 12:51:48)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2010-06-05 13:04:37

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

@ Mr. Elendig - In your first option you mention btrfs. Is it stable yet?

Also, if /usr is where the majority stuff is installed, should it not be on a separate partition and have a size as large as /home?

Some places recommend /var and /tmp as separate partitions. Is it necessary if I'm not running a server? Or is it just good practice?

Is it a good idea to have /home as XFS?

I'm sorry for all these questions. Looking to get the perfect setup going (I know it's not possible at the very beginning, but still).

Thanks a lot for your patience.

Last edited by Ritwik7 (2010-06-05 13:09:56)

Offline

#7 2010-06-05 13:34:00

mips1
Member
Registered: 2008-01-02
Posts: 99

Re: Arch Linux Partitions And Filesystems

I just use /boot(ext3) 100MB, swap same as total ram size(laptop), /(ext4) 15GB is plenty, /home(ext4) rest of the space

I have used XFS for a long time but very recently switched to ext4. I find ext4 faster than XFS.

I have never created any partitions other than these. On a desktop I might even consider not using swap at all as I have 4GB ram but never actually tried running without swap yet.

Last edited by mips1 (2010-06-05 13:34:55)

Offline

#8 2010-06-05 13:50:19

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

Thanks for all the inputs so far.

Is Arch able to boot on ext4? Then I might not create a separate /boot. Or are their other advantages?

mips1 wrote:

I have used XFS for a long time but very recently switched to ext4. I find ext4 faster than XFS.

I read that benchmarks show otherwise. Has ext4 improved a lot in recent times to be faster than XFS?

Offline

#9 2010-06-05 14:00:15

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Arch Linux Partitions And Filesystems

Ritwik7 wrote:

@ Mr. Elendig - In your first option you mention btrfs. Is it stable yet?

Also, if /usr is where the majority stuff is installed, should it not be on a separate partition and have a size as large as /home?

No, because software doesn't take that much space.

More partions == more wasted space. It's not worth it to split out everything on a desktop system.

With just a seperate / and /home, ~8gb / is plenty for a desktop system. My current / is using 11gb, but I have a lot more stuff installed than most people.

If you are paranoid, a 20gb / is enough to let you install almost "evertything" in the repos.

Last edited by Mr.Elendig (2010-06-05 14:01:55)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2010-06-05 14:28:49

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

Ok. So how does this look?

swap    1024MB
/     ext4     15GB
/var    ReiserFS    4GB
/home    XFS    140GB

Should I go with a separate /boot for any reason? And again, XFS or ext4 for /home (assuming btrfs is not yet stable)?

Offline

#11 2010-06-05 15:29:20

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Arch Linux Partitions And Filesystems

1024 for your swap? If you're on a laptop you should use double your ram for swap space, and if you're on a desktop you shouldn't need a swap if you have 3~4gb of ram or more. If you have less than 3 then it's probably a good idea to set swap equal to your ram.

Offline

#12 2010-06-05 15:51:04

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Arch Linux Partitions And Filesystems

Google wrote:

1024 for your swap? If you're on a laptop you should use double your ram for swap space, and if you're on a desktop you shouldn't need a swap if you have 3~4gb of ram or more. If you have less than 3 then it's probably a good idea to set swap equal to your ram.

Not entirely accurate. It doesn't matter whether you are on a laptop or a desktop. If you plan to use suspend and/or hibernate, you need to have swap atleast equal to your RAM size. -- however its good practice to have it 125% of your RAM to account for some bad sectors in your HDD.

If you do not plan to use suspend/hibernate, then swap is a waste of hard drive space if you have more than 2-3 GB of RAM. I never use suspend, so I never have swap more than 512 MB.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2010-06-05 16:03:42

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Arch Linux Partitions And Filesystems

Ritwik7 wrote:

Ok. So how does this look?

swap    1024MB
/     ext4     15GB
/var    ReiserFS    4GB
/home    XFS    140GB

Should I go with a separate /boot for any reason? And again, XFS or ext4 for /home (assuming btrfs is not yet stable)?

You don't need an additional /boot unless you plan to install a lot of different distros and use the same /boot for all of them. XFS is a good choice, but you have to remember that you cannot increase or decrease the size of the partition once its created (atleast that was how it was when I was choosing the filesystem).

With ext4, you get the option of being able to increase/decrease the size, if you find that the initial partitioning that you created does not fit your needs. And it's going to be important since you already know that getting the perfect setup will not be easy in the first go.

Ritwik7 wrote:

Looking to get the perfect setup going (I know it's not possible at the very beginning, but still).

Again for swap, see my earlier post

Last edited by Inxsible (2010-06-05 16:09:06)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#14 2010-06-05 16:08:05

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Arch Linux Partitions And Filesystems

This is actually covered quite well in the beginners' guide, along with some good recommendations, but I recommend /, /home, and /var. /var being ReiserFS, and everything else JFS.

When btrfs is ready, it seems it will be the way forward.

Offline

#15 2010-06-05 16:26:41

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

Thank you everyone. smile

I have been reading up all evening and find that ext4 would be a good enough alternative to ReiserFS for /var. I might even go with ext4 for /home instead of XFS. Hopefully ext4 will be fast (some website reports claim faster than XFS).

Am looking forward to a stable btrfs.

If anyone thinks that ext4 will not be a good idea for all the partitions on Arch then please do give your views. I will get down to the installation tomorrow.

All further inputs are much appreciated.

EDIT: Another small question. Does a separate /tmp find much use in Arch? I read in the Beginner's Guide that /var stores the Pacman cache. So it can get pretty big. That's why I'm putting it on a separate partition. But what about /tmp? Does it get very filled?

Last edited by Ritwik7 (2010-06-05 16:37:19)

Offline

#16 2010-06-05 16:54:39

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Arch Linux Partitions And Filesystems

The reason to have a separate /var (for me) is so I can have a different filesystem on it. and reiserfs is the best filesystem for the type of files that /var contains -- small sized but numerous files. So I have my /var as reiserfs and / and /home as ext4. I also do not have a separate /tmp.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#17 2010-06-05 17:53:36

Google
Member
From: Mountain View, California
Registered: 2010-05-31
Posts: 484
Website

Re: Arch Linux Partitions And Filesystems

I use a separate /tmp. If you don't deliberately use it for something it will always remain small (probably less than 1gb at all times). I happen to use the Chromeplus browser, because the Chromium broswer's cache is stored in the users files and bloats up a lot. I use Chromeplus because it can change the browser's cache. I placed it on /tmp. It has a lot of smaller files and a few bigger files like flash videos.

If you use your PC for a while you can fill up quite a bit of temp internet files, flash files and other stuff. Currently I have an uptime of 6 hours and my /tmp is 336mb (mostly from Chrome's cache). I have a 2gb reiserfs tmp. I think it's enough space for the cache and other temp considering they will be gone when I shut down.

Last edited by Google (2010-06-05 17:55:01)

Offline

#18 2010-06-05 18:32:23

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

I'll keep all that in mind.

I need a slight clarification regarding the HDD preparation. I'll be partitioning manually. After creating the partitions how exactly do I assign mount points. Will /, /home, /var, swap all have separate mount points? Will I be given the option to select them or will they be mounted under root?

I also did not quite understand the /etc/locale.gen file.

Offline

#19 2010-06-05 21:10:30

ancient_archer
Member
From: Slovakia
Registered: 2010-03-13
Posts: 107

Re: Arch Linux Partitions And Filesystems

When partitioning manually, if you do not have created partitions yet, I suggest that when installing Arch, the very first step of he installation, would be to run cfdisk INSTEAD of /arch/setup. There in cfdisk, you'll create partitions and having done that,you'll continue installing Arch via /arch/setup.

Then, when the time comes, you'll just manually partition the disk by choosing partitions where you'll assign mountpoints for /, /home and I guess /var and /tmp, too. I guess there won't be any big problems, since it's quite intuitive.

Then at another point of installation you'll edit fstab file by adding other partiitons (if they're not already there...) like this for example:

/dev/sda6 /var reiserfs defaults 0 1

Hope it'll work.
And just to be sure, don't forget to add group "storage" among users as in Beginners guide. Then you'll don't have to be root when you mount them.

And as for /etc/locale.gen file, don't worry about it. After installing the system, you'll set up locales. If you need help then, I'll tell you how.

Last edited by ancient_archer (2010-06-05 21:19:40)

Offline

#20 2010-06-06 04:49:10

murffatksig
Member
From: Atl
Registered: 2004-05-17
Posts: 358

Re: Arch Linux Partitions And Filesystems

If you're like me, you'll refresh your machine so often don't bother with any of this. I keep all my important docs on a fileserver thats backed up.  Then I just use root partition and swap space.  I'm sure most folks would criticize my config, but it works for me.


"Oh, they have the internet on computers now."

Offline

#21 2010-06-06 12:49:28

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: Arch Linux Partitions And Filesystems

.

Last edited by fumbles (2020-09-26 11:16:55)

Offline

#22 2010-06-06 13:14:46

Hund
Member
From: Sweden
Registered: 2010-03-22
Posts: 479
Website

Re: Arch Linux Partitions And Filesystems

My sugestion (Simple and no hassle):

/ = 10GB
/home = The remaining diskspace

I tried to install GRUB to a separate boot partition (As sugested by most of the Archers) a few days ago, when I got my new disk, that didnt work at all.

Offline

#23 2010-06-06 21:55:33

jck
Member
From: USA
Registered: 2009-05-08
Posts: 98

Re: Arch Linux Partitions And Filesystems

Mr.Elendig wrote:
Ritwik7 wrote:

@ Mr. Elendig - In your first option you mention btrfs. Is it stable yet?

Also, if /usr is where the majority stuff is installed, should it not be on a separate partition and have a size as large as /home?

No, because software doesn't take that much space.

More partions == more wasted space. It's not worth it to split out everything on a desktop system.

With just a seperate / and /home, ~8gb / is plenty for a desktop system. My current / is using 11gb, but I have a lot more stuff installed than most people.

If you are paranoid, a 20gb / is enough to let you install almost "evertything" in the repos.

Please answer the btrfs question too

Offline

#24 2010-06-07 13:11:21

Ritwik7
Member
Registered: 2010-06-05
Posts: 14

Re: Arch Linux Partitions And Filesystems

Thank you all for your inputs.

And yes, I too would like to know how stable btrfs would be on Arch now.

Offline

#25 2010-06-07 14:01:02

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Arch Linux Partitions And Filesystems

jck wrote:

Please answer the btrfs question too

Ritwik7 wrote:

And yes, I too would like to know how stable btrfs would be on Arch now.

No its not. A simple google search yields this
Oracle Btrfs

Btrfs Wiki

Last edited by Inxsible (2010-06-07 15:37:33)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB