Partitioning schemes

Richard Lightman richard at reika.demon.co.uk
Fri Jan 5 07:16:30 PST 2001


Misquoted from Rik Burt on 2001/01/ 5 at 00:14 +0000:
> I have been trying to find information in the archive about partitioning
> schemes.  It seems to me that it the latest version of the book that the
> whole system is built onto one partition of the hard drive.  Is this a
> better way to go than many partitions?  The book lists Running Linux by Matt
> Welsh as a source and after perusing this book I read that Mr. Welsh has his
> whole system on one partition but they suggest having more than one
> partition.
> 
> In the past I have used the following partition scheme: /, swap, /usr,
> /root, /home, /var.  I know that partitioning is more personal preference
> than an exact science but should I choose to how would I set up LFS using
> multiple partitioning?  I have read and read man pages and other sources but
> I must be missing something really basic because this shouldn't be as hard
> as I am finding it.
> 
> Thanks for any help.
> 
> Rik
> 

/root is not a good choice for a partition. The idea is that if the
system can only access the root partition, there are enough files
available for root to fix the problem. Let root have his home directory
so all his favourate settings are available. The complete list of
bad choices for partitions is:
/bin, /dev, /etc, /lib, /root and /sbin

Here are some ideas for partition schemes:

If you have a grotty bios that will not run the current
versions of lilo and you are too lazy to download grub, you
may need a small boot partition (2-5MB) to ensure some files
stay on the first 1024 cylinders of the hard disk.

If you want to reduce the chance of currupting /, try:
20MB for / and lots for /other
/home /opt /var and /usr are symlinks to directories on /other
Make sure non-critical programs use /var/tmp instead of /tmp

One of the ideas of FHS is that /usr can be mounted read only.
This will make it faster, and make it less likely to get
corrupted. I have about 500MB in /usr

The bigger a file system, the more you loose if it gets
corrupted. To reduce the size of /usr, install large packages
in /opt. eg gnome 100MB, kde 200MB

There are many reasons for a /home partition:
If you have two distributions installed, you can access your stuff
more easily. If you re-install a distribution, you can keep
all your files.

The outer cylinders of the hard disk have a higher transfer
rate than the inner ones so you might want / on hda1 and backups
on hda15. Or if you have a fast and a slow hard disk put the
most commonly used stuff on partitions on the fast disk.

There are a few rules of thumb for swap partitions:
If you have a swap partition, and you run out of physical memory,
the computer will slow down. If you run out of swap space, the kernel
will kill the greediest tasks. If you are using more than about
tripple the amount of physical memory, the computer will be so
unbearably slow that you would want the kernel to kill things.
There is no point having a swap partition of more that 128MB
(512MB for alpha's). If you need more swap space, add more
swap partitions - prefereably of different hard disks.

My own choices for partitions are:
A pair af root partions each is used for recompiling the OS
on the other. I do all the compilations in /mnt/build
CD's go to /mnt/build before getting compressed. /mnt/backup
holds on the source code. /mnt/spare was for flexibily.
It will be more source code soon. If I ever use swap I
will buy more memory.

Device     Size  Used Mounted on
/dev/hda2  1GB    78% /
/dev/hda1  1GB    73% /mnt/lfs1
/dev/hda5  3GB     2% /mnt/build
/dev/hda6  500MB  35% /home
/dev/hda7  600MB  93% /mnt/backup
/dev/hda8  120MB  27% /mnt/spare
swap       100MB

-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list