2.2. Creating a New Partition

#### Cross-Compiled Linux From Scratch - Version 1.0.0rc1-Sparc64-Multilib

### Chapter 2. Preparing a New Partition

- Prev

  Preparing a New Partition

- Next

  Creating a File System on the Partition

- Up.
- Home

# 2.2. Creating a New Partition

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, a CLFS system (in fact even multiple CLFS systems) may also be installed on a partition already occupied by another operating system and the different systems will co-exist peacefully. The document http://www.linuxfromscratch.org/hints/downloads/files/lfs_next_to_existing_systems.txt explains how to implement this, whereas this book discusses the method of using a fresh partition for the installation.

A minimal system requires a partition of around 1.3 gigabytes (GB). This is enough to store all the source tarballs and compile the packages. However, if the CLFS system is intended to be the primary Linux system, additional software will probably be installed which will require additional space (2-3 GB). 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.

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 an 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.

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/hda` for the primary Integrated Drive Electronics (IDE) 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., `hda5`). 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 Sparc system we have to create an special partition first. This partition is called “Whole disk”, and must be the 3rd partition on the disk.

The other partitions are virtual slices of this “Whole disk” partition. But there are some limitations on the first partion of `hda` or `sda` on the system. This partition must be less than 2 gigabytes and this partition must be root.

- Prev

  Preparing a New Partition

- Next

  Creating a File System on the Partition

- Up.
- Home.