Like most other operating systems, CLFS is usually installed on a dedicated partition. The recommended approach to building a CLFS system is to use an available empty partition or, if you have enough unpartitioned space, to create one. However, if you're building for a different architecture you can simply build everything in “/mnt/clfs” (or whatever directory you want to use) and transfer it to your target machine. If you do not plan to use a separate partition for building CLFS, you can skip the rest of this chapter and continue on to Packages and Patches.
A minimal system requires around 6 gigabytes (GB). This is enough to store all the source tarballs and compile the packages. The CLFS system itself will not take up this much room. A large portion of this requirement is to provide sufficient free temporary storage. Compiling packages can require a lot of disk space which will be reclaimed after the package is installed. If the CLFS system is intended to be the primary Linux system, additional software will probably be installed which will require additional space (2-10 GB).
Because there is not always enough Random Access Memory (RAM) available for compilation processes, it is a good idea to use a small disk partition as swap space. This is used by the kernel to store seldom-used data and leave more memory available for active processes. The swap partition for a CLFS system can be the same as the one used by the host system, in which case it is not necessary to create another one.
As the root
user, start a disk
partitioning program such as cfdisk or fdisk with a command line option
naming the hard disk on which the new partition will be
created—for example /dev/sda
for
the primary Integrated Drive Electronics (IDE) or Serial ATA (SATA)
disk. Create a Linux native partition and a swap partition, if
needed. Please refer to cfdisk(8)
or
fdisk(8)
if you do not yet know how to
use the programs.
Remember the designation of the new partition (e.g., sda5
). This book will refer to this as the CLFS
partition. Also, remember the designation of the swap partition.
These names will be needed later for the /etc/fstab
file.
On a Cobalt RaQ2/Cube2 we use the existing firmware for a boot
loader—it requires an ext2
revision 0 partition to boot from. Here is the recommended partition
layout for a Cobalt RaQ2/Cube2 system:
The first partition should be 50-100 MB.
The second partition should be all the remaining space minus the amount of RAM in the system.
The third partition is going to be your swap partition, which will be the same size as the amount as the RAM installed in the system.