So you installed your entire OS into one single " / " root partition ???9812713 wrote: I deleted my 1 BIG partition, and broke it into 3 separate partitions. I have used the following sizes to reflect my system settings.
HDA1 - Size = 1.4 GB -- Mount Point = LINUX-SWAP (2.5 x Ram Size)
HDA2 - Size = 4 GB -- Mount Point = / (top level) Type: RieserFS
HDA3 - Size = 30+ GB -- Mount Point = /Home Type: RieserFS
Bonus: Add a hda4 - size = 8GB == Basically this can be used to install windows ...
Why oh why would one do such a thing!?
Beauty?! Ahemmmm ... no. Putting the entire OS into one single partition is bad bad bad bad bad!9812713 wrote:Now the beauty of this setup is
It's a somewhat forgiveable mistake recent converts and ex-Windows users make, but this is definitely not the right way to do this!
Partitioning - UNIX style
Working fullt-time as UNIX + Linux support engineer for a really big company I shall be so arrogant and simply claim that I know what I am talking of.
Putting the entire operating system into one single partition is a big "No" ... It's a mistake ex-Windows users often make because they don't know it better. OK, we shall forgive them. But if you as administrator do this in a live environment with critical applications running on the machines you will get your head whacked off -- either by "friendly" colleagues such as myself or we will make sure the responsible manager will do it. Can you say BOFH?
Why this is a bad idea: Please read this article: http://www.hccfl.edu/pollock/AUnix1/Partitioning.htm
Basically, if something goes wrong and you have everything in one single partition, repairing this will be very hard.
Having your stuff broken up into the various UNIX-style mount-points has vast advantages here, as any broken partition can be mounted individually and independently from the main " / " root partition.
How I partition my disks (work + private!)
Before exploring this we should take a look what mount-points a typical UNIX and/or Linux system has. And I will sort them here by read/write access likeliness - meaning: Those mount-points which will mostly be read are on the top, followed by mount-points which mostly will get written to:
- /boot -- contains the boot loader and boot menu. Is mostly read at boot time, has only limited numbers of write accesses. Because of its importance this should be the first Linux partition on the disk.
/ -- contains all the other filesystems, plus important locations such as /etc, /sbin, /lib, and many other important places that cannot exist on separate partitions. Can have some limited write accesses (e.g. temporary files in /tmp) but for the most of the time only gets read accesses. Because of its importance for the boot process this partition should be right after the /boot partition (otherwise the heads of the disk have to move a lot, especially during the boot process ...)
/usr -- contains all the binaries and the X11 graphical interface (e.g. /usr/X11R6) and libraries that don't belong to the OS proper but rather to an application somewhere somehow (e.g. /usr/lib). Only gets bigger write accesses when applications get installed or someone compiles a kernel (the kernel sources are usually located in /usr/src/linux), other than that this mount-point mostly gets read from not written to. Because of its importance for the boot process and overall significance for the functioning of the system this partition should be right before or right after the " / " partition.
/opt -- some distributions use this for optional stuff, e.g. non-essential tools (from the system's point of view!) such as GoogleEarth and other things that are considered "nice to have" but not really "must have or the system won't work without it". This partition can be anywhere on the disk, but I personally prefer to place it before /var ...
/srv -- some distributions use this to run their WWW and/or FTP servers in there. Sometimes admins chose to create this mount-point as some sort of "sand box" in which they run their network services. Can have some fair amount of write accesses, especially if you have stuff running in there that produces logs.
/var -- used for variable data. Usually your system logs are in there (e.g. /var/log/* ), some distributions use it for the WWW pages that are being served (e.g. /var/www). Gets mostly written to, and then a lot!
/home -- where the users place all their stuff. Bookmarks, config files created by all the various applications and desktops, all one's personal files, and all the stuff you do all day ends up here. Gets read and written to like mad.
- /dev/hda1: /boot, 50 MB min., 150 MB max.
/dev/hda2: /, 2 GB min.
/dev/hda3: extended partition, up and until the end of the disk
/dev/hda5: /usr, at least 5 GB
/dev/hda6: /opt ... if you want it. 2 GB should be enough
/dev/hda7: /srv ... if you really want it. At least 4 GB
/dev/hda8: /var ... at least 2 GB.
/dev/hda10: /home ... at least 75-80 GB if we take a 100 GB disk as basis
/dev/hda11: swap ... 2x the size of your RAM, but not more. If you have like 2 GB RAM, then 1x the size of your RAM should be enough.
This is how it's supposed to be done.
Suggestions and flame messages welcome
EDIT: some factual errors about where harddisks begin or end corrected ... Thanks to all