- Timestamp:
- 10/18/2002 05:00:20 PM (22 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 6cd9e70e
- Parents:
- b60ca14
- Location:
- chapter03
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter03/creatingfs.xml
rb60ca14 r8b5830c 3 3 <?dbhtml filename="creatingfs.html" dir="chapter04"?> 4 4 5 <para> Once the partition is created, we have to create a new file system on6 that partition. The standard file system used these days is the ext2 file 7 system, but the so-called journaling file systems are becoming increasingly 8 popular too. We'll assume that you wish to create an ext2 file system. 9 However, build instructions for other file systems may be found at 10 <ulinkurl="http://beyond.linuxfromscratch.org/view/cvs/postlfs/filesystems.html"/>.</para>5 <para>Now the partition has been made, we can create a file system on it. 6 Most widely used in the Linux world is the second extended file system (ext2), 7 but with the high-capacity hard disks of today the so-called journaling file 8 systems are becoming increasingly popular. Here we will create an ext2 file 9 system, but build instructions for other file systems can be found at <ulink 10 url="http://beyond.linuxfromscratch.org/view/cvs/postlfs/filesystems.html"/>.</para> 11 11 12 <para>To create an ext2 file system, use the mke2fs command. The LFS partition 13 is used as the only option to the command and the file system is created.</para> 12 <para>To create an ext2 file system on the LFS partition run the following:</para> 14 13 15 14 <para><screen><userinput>mke2fs /dev/xxx</userinput></screen></para> 16 15 17 <para>Replace "xxx" by the partition's designation (like hda11).</para> 16 <para>Replace <filename>xxx</filename> with the name of the LFS partition 17 (something like <filename>hda5</filename>).</para> 18 18 19 19 </sect1> -
chapter03/creatingpart.xml
rb60ca14 r8b5830c 3 3 <?dbhtml filename="creatingpart.html" dir="chapter04"?> 4 4 5 <para>I t is possible to build LFS on only one partition - the partition6 in which your original distribution is installed. While this is not 7 recommended for your first LFS installation, it may be useful if you 8 are short on disk space. If you feel brave, take a look at the 9 <emphasis>Install LFS next to existing systems on the same 10 partition</emphasis> hint at <ulink 11 url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>5 <para>In order to build our new Linux system, we will need some space: 6 an empty disk partition. If you don't have a free partition, and no room 7 on any of your hard disks to make one, then you could build LFS on the 8 same partition as the one on which your current distribution is installed. 9 This procedure is not recommended for your first LFS install, but if you 10 are short on disk space, and you feel brave, take a look at the hint at 11 <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para> 12 12 13 <para>Before we can build our new Linux system, we need an empty 14 Linux partition where we can build it. We recommend a partition size 15 of at least 1 GB. This provides enough space to store the tarballs and 16 compile all of the packages. You will probably need more space if you 17 intend to install additional software and use the LFS system as your 18 primary Linux system. If a Linux native partition is already available, 19 this subsection can be skipped.</para> 13 <para>For a minimal system you will need a partition of around 1 GB. 14 This is enough to store all the source tarballs and compile all the packages. 15 But if you intend to use the LFS system as your primary Linux system, you 16 will probably want to install additional software, and will need more space 17 than this, probably around 2 or 3 GB.</para> 20 18 21 <para>Since your system memory can only hold a limited amount of data 22 at one time, we recommend that disk space be set aside for swap files. 23 A swap file is a place where items in memory may be stored until they 24 are called for. This disk space may be shared between your host system 25 and your LFS system. If you already have a swap partition, then you 26 probably don't need to create another one. Otherwise, you should create 27 a swap partition via an fdisk program. Regardless, you need to remember 28 the designation of the swap partition (such as hda2) as it will be needed 29 when we create the <filename>/etc/fstab</filename> file.</para> 19 <para>As we almost never have enough RAM in our box, it is a good idea to 20 use a small disk partition as swap space -- this space is used by the kernel 21 to store seldom-used data to make room in memory for more urgent stuff. 22 The swap partition for your LFS system can be the same one as for your host 23 system, so you won't have to create another if your host system already uses 24 a swap partition.</para> 30 25 31 <para>The cfdisk program (or another fdisk-like program) should be 32 started with the appropriate hard disk as the argument (like /dev/hda 33 if a new partition is to be created on the primary master IDE disk). 34 Using this program, create a Linux native partition. Please refer to 35 the documentation of your fdisk program (the man pages are often a 36 good place to start) for information about creating Linux native 37 partitions and writing partition tables.</para> 26 <para>Start the <filename>cfdisk</filename> program with as argument the name 27 of the hard disk upon which the new partition must be created -- for example 28 <filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native 29 partition, and if needed a swap partition. Please refer to the man page of 30 <filename>cfdisk</filename> if you don't yet know how to use the program.</para> 38 31 39 <para>The designation of your new partition should be remembered. 40 It might be something similar to hda11. This newly created partition 41 will be referred to as the LFS partition in this book.</para> 32 <para>Remember the designation of your new partition -- something like 33 <filename>hda5</filename>. This book will refer to it as the LFS partition. 34 If you (now) also have a swap partition, remember its designation too. These 35 names will later be needed for the <filename>/etc/fstab</filename> file.</para> 42 36 43 37 </sect1> 38 -
chapter03/introduction.xml
rb60ca14 r8b5830c 3 3 <?dbhtml filename="introduction.html" dir="chapter04"?> 4 4 5 <para>In this chapter ,the partition which will host the LFS system is5 <para>In this chapter the partition which will host the LFS system is 6 6 prepared. We will create the partition itself, make a file system on it, 7 7 and mount it.</para> -
chapter03/mounting.xml
rb60ca14 r8b5830c 1 1 <sect1 id="ch04-mounting"> 2 <title>Mounting the new partition</title>2 <title>Mounting the new file system</title> 3 3 <?dbhtml filename="mounting.html" dir="chapter04"?> 4 4 5 <para>Now that we have created a file system, it is ready for use. All we have 6 to do to be able to access the partition (as in reading data from and writing 7 data to) is mount it. If it is mounted under /mnt/lfs, this partition can 8 be accessed by cd'ing to the /mnt/lfs directory. This book will assume 9 that the partition was mounted under /mnt/lfs. It doesn't matter which 10 directory is chosen, just make sure you remember what you chose.</para> 5 <para>Now that we've created a file system, we want to be able to access it. 6 For that, we need to mount it, and have to choose a mount point. 7 In this book we assume that the file system is mounted under 8 <filename>/mnt/lfs</filename>, but it doesn't matter what directory 9 you choose.</para> 11 10 12 <para>Create the /mnt/lfs directory by running:</para> 11 <para>Choose a mount point and assign it to the LFS environment variable 12 by running:</para> 13 13 14 <para><screen><userinput> mkdir -p/mnt/lfs</userinput></screen></para>14 <para><screen><userinput>export LFS=/mnt/lfs</userinput></screen></para> 15 15 16 <para>Now mount the LFS partitionby running:</para>16 <para>Now create the mount point and mount the LFS file system by running:</para> 17 17 18 <para><screen><userinput>mount /dev/xxx /mnt/lfs</userinput></screen></para> 18 <para><screen><userinput>mkdir -p $LFS && 19 mount /dev/xxx $LFS</userinput></screen></para> 19 20 20 <para>Replace <quote>xxx</quote> by the partition's designation (like hda11).</para> 21 <para>Replace <filename>xxx</filename> with the designation of the LFS 22 partition.</para> 21 23 22 <para>This directory (/mnt/lfs) is the LFS variable you have read about 23 back in Chapter 2. If you were planning to make use of the LFS environment 24 variable, <userinput>export LFS=/mnt/lfs</userinput> has to be executed 25 now.</para> 24 <para>(If you decided to use multiple partitions for LFS (say one for 25 <filename>/</filename> and another for <filename>/usr</filename>), mount 26 them like this:</para> 26 27 27 <para>If you decided to create multiple partitions for LFS (say $LFS and 28 $LFS/usr), mount them like this:</para> 28 <para><screen><userinput>mkdir -p $LFS && 29 mount /dev/xxx $LFS && 30 mkdir $LFS/usr && 31 mount /dev/yyy $LFS/usr</userinput></screen></para> 29 32 30 <para><screen><userinput>mkdir -p /mnt/lfs && 31 mount /dev/xxx /mnt/lfs && 32 mkdir /mnt/lfs/usr && 33 mount /dev/yyy /mnt/lfs/usr</userinput></screen></para> 33 <para>Of course, replace <filename>xxx</filename> and <filename>yyy</filename> 34 with the appropriate partition names.)</para> 34 35 35 <para> Of course, replace /dev/xxx and /dev/yyy with the appropriate36 partition designations.</para>36 <para>Now that we've made ourselves a place to work in, we're ready to begin 37 assembling the temporary tools in the next chapter.</para> 37 38 38 39 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.