From 33ea9e926c8167fa94935d33bcbd7c15cf111f7d Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Wed, 5 Nov 2003 22:26:39 +0000 Subject: Merging chapter 3 files. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3064 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter03/chapter03.xml | 133 +++++++++++++++++++++++++++++++++++++++++++-- chapter03/creatingfs.xml | 29 ---------- chapter03/creatingpart.xml | 40 -------------- chapter03/introduction.xml | 10 ---- chapter03/mounting.xml | 46 ---------------- 5 files changed, 129 insertions(+), 129 deletions(-) delete mode 100644 chapter03/creatingfs.xml delete mode 100644 chapter03/creatingpart.xml delete mode 100644 chapter03/introduction.xml delete mode 100644 chapter03/mounting.xml (limited to 'chapter03') diff --git a/chapter03/chapter03.xml b/chapter03/chapter03.xml index 4d2ce7dca..8b6f3b173 100644 --- a/chapter03/chapter03.xml +++ b/chapter03/chapter03.xml @@ -2,9 +2,134 @@ Preparing a new partition -&c3-introduction; -&c3-creatingpart; -&c3-creatingfs; -&c3-mounting; + + +Introduction + + +In this chapter the partition which will host the LFS system is +prepared. We will create the partition itself, make a file system on it, +and mount it. + + + + + +Creating a new partition + + +In order to build our new Linux system, we will need some space: +an empty disk partition. If you don't have a free partition, and no room +on any of your hard disks to make one, then you could build LFS on the +same partition as the one on which your current distribution is installed. +This procedure is not recommended for your first LFS install, but if you +are short on disk space, and you feel brave, take a look at the hint at +. + +For a minimal system you will need a partition of around 1.2 GB. +This is enough to store all the source tarballs and compile all the packages. +But if you intend to use the LFS system as your primary Linux system, you +will probably want to install additional software, and will need more space +than this, probably around 2 or 3 GB. + +As we almost never have enough RAM in our box, it is a good idea to +use a small disk partition as swap space -- this space is used by the kernel +to store seldom-used data to make room in memory for more urgent stuff. +The swap partition for your LFS system can be the same one as for your host +system, so you won't have to create another if your host system already uses +a swap partition. + +Start a disk partitioning program such as cfdisk +or fdisk with an argument naming the hard disk upon +which the new partition must be created -- for example +/dev/hda for the primary IDE disk. Create a Linux native +partition and a swap partition, if needed. Please refer to the man pages of +cfdisk or fdisk if you don't yet +know how to use the programs. + +Remember the designation of your new partition -- something like +hda5. This book will refer to it as the LFS partition. +If you (now) also have a swap partition, remember its designation too. These +names will later be needed for the /etc/fstab file. + + + + + +Creating a file system on the new partition + + +Now that we have a blank partition, we can create a file system on it. +Most widely used in the Linux world is the second extended file system (ext2), +but with the high-capacity hard disks of today the so-called journaling file +systems are becoming increasingly popular. Here we will create an ext2 file +system, but build instructions for other file systems can be found at . + +To create an ext2 file system on the LFS partition run the following: + +mke2fs /dev/xxx + +Replace xxx with the name of the LFS partition +(something like hda5). + +If you created a (new) swap partition you need to initialize it as a +swap partition too (also known as formatting, like you did above with +mke2fs) by running: + +mkswap /dev/yyy + +Replace yyy with the name of the swap +partition. + + + + + +Mounting the new partition + + +Now that we've created a file system, we want to be able to access +the partition. For that, we need to mount it, and have to choose a mount +point. In this book we assume that the file system is mounted under +/mnt/lfs, but it doesn't matter what directory +you choose. + +Choose a mount point and assign it to the LFS environment variable +by running: + +export LFS=/mnt/lfs + +Now create the mount point and mount the LFS file system by running: + +mkdir -p $LFS +mount /dev/xxx $LFS + +Replace xxx with the designation of the LFS +partition. + +If you have decided to use multiple partitions for LFS (say one for +/ and another for /usr), mount +them like this: + +mkdir -p $LFS +mount /dev/xxx $LFS +mkdir $LFS/usr +mount /dev/yyy $LFS/usr + +Of course, replace xxx and yyy +with the appropriate partition names. + +You should also ensure that this new partition is not mounted with +permissions that are too restrictive (such as the nosuid, nodev or noatime +options). You can run the mount command without any +parameters to see with what options the LFS partition is mounted. If +you see nosuid, nodev or noatime, you will need to remount it. + +Now that we've made ourselves a place to work in, we're ready to download +the packages. + + + diff --git a/chapter03/creatingfs.xml b/chapter03/creatingfs.xml deleted file mode 100644 index f2cb68898..000000000 --- a/chapter03/creatingfs.xml +++ /dev/null @@ -1,29 +0,0 @@ - -Creating a file system on the new partition - - -Now that we have a blank partition, we can create a file system on it. -Most widely used in the Linux world is the second extended file system (ext2), -but with the high-capacity hard disks of today the so-called journaling file -systems are becoming increasingly popular. Here we will create an ext2 file -system, but build instructions for other file systems can be found at . - -To create an ext2 file system on the LFS partition run the following: - -mke2fs /dev/xxx - -Replace xxx with the name of the LFS partition -(something like hda5). - -If you created a (new) swap partition you need to initialize it as a -swap partition too (also known as formatting, like you did above with -mke2fs) by running: - -mkswap /dev/yyy - -Replace yyy with the name of the swap -partition. - - - diff --git a/chapter03/creatingpart.xml b/chapter03/creatingpart.xml deleted file mode 100644 index f60d7489e..000000000 --- a/chapter03/creatingpart.xml +++ /dev/null @@ -1,40 +0,0 @@ - -Creating a new partition - - -In order to build our new Linux system, we will need some space: -an empty disk partition. If you don't have a free partition, and no room -on any of your hard disks to make one, then you could build LFS on the -same partition as the one on which your current distribution is installed. -This procedure is not recommended for your first LFS install, but if you -are short on disk space, and you feel brave, take a look at the hint at -. - -For a minimal system you will need a partition of around 1.2 GB. -This is enough to store all the source tarballs and compile all the packages. -But if you intend to use the LFS system as your primary Linux system, you -will probably want to install additional software, and will need more space -than this, probably around 2 or 3 GB. - -As we almost never have enough RAM in our box, it is a good idea to -use a small disk partition as swap space -- this space is used by the kernel -to store seldom-used data to make room in memory for more urgent stuff. -The swap partition for your LFS system can be the same one as for your host -system, so you won't have to create another if your host system already uses -a swap partition. - -Start a disk partitioning program such as cfdisk -or fdisk with an argument naming the hard disk upon -which the new partition must be created -- for example -/dev/hda for the primary IDE disk. Create a Linux native -partition and a swap partition, if needed. Please refer to the man pages of -cfdisk or fdisk if you don't yet -know how to use the programs. - -Remember the designation of your new partition -- something like -hda5. This book will refer to it as the LFS partition. -If you (now) also have a swap partition, remember its designation too. These -names will later be needed for the /etc/fstab file. - - - diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml deleted file mode 100644 index c173caf5c..000000000 --- a/chapter03/introduction.xml +++ /dev/null @@ -1,10 +0,0 @@ - -Introduction - - -In this chapter the partition which will host the LFS system is -prepared. We will create the partition itself, make a file system on it, -and mount it. - - - diff --git a/chapter03/mounting.xml b/chapter03/mounting.xml deleted file mode 100644 index f29c49c11..000000000 --- a/chapter03/mounting.xml +++ /dev/null @@ -1,46 +0,0 @@ - -Mounting the new partition - - -Now that we've created a file system, we want to be able to access -the partition. For that, we need to mount it, and have to choose a mount -point. In this book we assume that the file system is mounted under -/mnt/lfs, but it doesn't matter what directory -you choose. - -Choose a mount point and assign it to the LFS environment variable -by running: - -export LFS=/mnt/lfs - -Now create the mount point and mount the LFS file system by running: - -mkdir -p $LFS -mount /dev/xxx $LFS - -Replace xxx with the designation of the LFS -partition. - -If you have decided to use multiple partitions for LFS (say one for -/ and another for /usr), mount -them like this: - -mkdir -p $LFS -mount /dev/xxx $LFS -mkdir $LFS/usr -mount /dev/yyy $LFS/usr - -Of course, replace xxx and yyy -with the appropriate partition names. - -You should also ensure that this new partition is not mounted with -permissions that are too restrictive (such as the nosuid, nodev or noatime -options). You can run the mount command without any -parameters to see with what options the LFS partition is mounted. If -you see nosuid, nodev or noatime, you will need to remount it. - -Now that we've made ourselves a place to work in, we're ready to download -the packages. - - - -- cgit v1.2.3-54-g00ecf