- Timestamp:
- 08/08/2004 02:10:00 AM (20 years ago)
- Branches:
- 6.0
- Children:
- 843710f
- Parents:
- 6e35438
- Location:
- chapter02
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter02/creatingfilesystem.xml
r6e35438 r9a207c4 5 5 ]> 6 6 <sect1 id="space-creatingfilesystem"> 7 <title>Creating a file system</title>7 <title>Creating a File System on the New Partition</title> 8 8 <?dbhtml filename="creatingfilesystem.html"?> 9 9 10 <para>Now that we have a blank partition, we can create a file system on it. 11 Most widely used in the Linux world is the second extended file system (ext2), 12 but with the high-capacity hard disks of today the so-called journaling file 13 systems are becoming increasingly popular. Here we will create an ext2 file 14 system, but build instructions for other file systems can be found at 15 <ulink url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para> 10 <para>Now that a blank partition has been set up, the file system can 11 be created. The most widely-used system in the Linux world is the 12 <systemitem class="filesystem">second extended file 13 system</systemitem> (ext2), but with the newer high-capacity hard 14 disks, the journaling file systems are becoming increasingly popular. 15 Here we will create an ext2 file system, but build instructions for 16 other file systems can be found at <ulink 17 url="&blfs-root;view/stable/postlfs/filesystems.html"/>.</para> 16 18 17 <para>To create an ext2 file system on the LFS partition run the following:</para>19 <para>To create an ext2 file system on the LFS partition, run the following:</para> 18 20 19 21 <screen><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen> 20 22 21 <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS partition22 (something like <filename>hda5</filename>).</para>23 <para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS 24 partition (<filename>hda5</filename> in our previous example).</para> 23 25 24 <para>If you created a (new) swap partition you need to initialize it as a 25 swap partition too (also known as formatting, like you did above with 26 <command>mke2fs</command>) by running:</para> 26 <para>If a swap partition was created, it will need to be initialized 27 as a swap partition too (also known as formatting, as described above 28 with mke2fs) by running the following. If you are using an existing 29 swap parition you do not need to format it.</para> 27 30 28 31 <screen><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen> … … 32 35 33 36 </sect1> 37 -
chapter02/creatingpartition.xml
r6e35438 r9a207c4 5 5 ]> 6 6 <sect1 id="space-creatingpartition"> 7 <title>Creating a new partition</title>7 <title>Creating a New Partition</title> 8 8 <?dbhtml filename="creatingpartition.html"?> 9 9 10 <para>In order to build our new Linux system, we will need some space: 11 an empty disk partition. If you don't have a free partition, and no room 12 on any of your hard disks to make one, then you could build LFS on the 13 same partition as the one on which your current distribution is installed. 14 This procedure is not recommended for your first LFS install, but if you 15 are short on disk space, and you feel brave, take a look at the hint at 16 <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para> 10 <para>In order to build a new Linux system, space is required -- an 11 empty disk partition. If the computer does not have a free partition 12 or room on any of the hard disks to make one, LFS can be built on the 13 same partition where the current distribution is installed.</para> 17 14 18 <para>For a minimal system you will need a partition of around 1.3 GB. 19 This is enough to store all the source tarballs and compile all the packages. 20 But if you intend to use the LFS system as your primary Linux system, you 21 will probably want to install additional software, and will need more space 22 than this, probably around 2 or 3 GB.</para> 15 <note><para>This procedure is not recommended for your first LFS 16 install, but if you are short on disk space and feel brave, you can 17 use the hint at <ulink 18 url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para></note> 23 19 24 <para>As we almost never have enough RAM in our box, it is a good idea to 25 use a small disk partition as swap space -- this space is used by the kernel 26 to store seldom-used data to make room in memory for more urgent stuff. 27 The swap partition for your LFS system can be the same one as for your host 28 system, so you won't have to create another if your host system already uses 29 a swap partition.</para> 20 <para>A minimal system requires a partition of around 1.3 gigabytes 21 (GB). This is enough to store all the source tarballs and compile all 22 the packages. However, if the LFS system is intended to be the primary 23 Linux system, additional software will probably be installed which 24 will require additional space (2 or 3 GB). The LFS system itself will 25 not take up this much space. A large portion of this required amount 26 of space is to provide sufficient free temporary space. Compiling 27 packages can require a lot of disk space which will be reclaimed after 28 the package is installed, but you do need it temporarily.</para> 30 29 31 <para>Start a disk partitioning program such as <command>cfdisk</command> 32 or <command>fdisk</command> with an argument naming the hard disk upon 33 which the new partition must be created -- for example 34 <filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native 35 partition and a swap partition, if needed. Please refer to the man pages of 36 <command>cfdisk</command> or <command>fdisk</command> if you don't yet 37 know how to use the programs.</para> 30 <para>Because there is rarely enough RAM available for the process, it 31 is a good idea to use a small disk partition as swap space. This 32 space is used by the kernel to store seldom-used data to make room in 33 memory for active processes. The swap partition for an LFS system can 34 be the same as the your host system, so another swap partition will 35 not need to be created if your host system already uses one.</para> 38 36 39 <para>Remember the designation of your new partition -- something like 40 <filename>hda5</filename>. This book will refer to it as the LFS partition. 41 If you (now) also have a swap partition, remember its designation too. These 42 names will later be needed for the <filename>/etc/fstab</filename> file.</para> 37 <para>Start a disk partitioning program such as 38 <command>cfdisk</command> or <command>fdisk</command> with an command 39 line option naming the hard disk on which the new partition will be 40 created -- for example <filename>/dev/hda</filename> for the primary 41 Integrated Drive Electronics (IDE) disk. Create a Linux native 42 partition and a swap partition, if needed. Please refer to the man 43 pages of <command>cfdisk</command> or <command>fdisk</command> if you 44 do not yet know how to use the programs.</para> 45 46 <para>Remember the designation of the new partition (e.g., 47 <filename>hda5</filename>). This book will refer to this as the LFS 48 partition. Also remember the designation of the swap partition. These 49 names will be needed later for the <filename>/etc/fstab</filename> 50 file.</para> 43 51 44 52 </sect1> 53 -
chapter02/introduction.xml
r6e35438 r9a207c4 8 8 <?dbhtml filename="introduction.html"?> 9 9 10 <para>In this chapter the partition which will host the LFS system is11 prepared. We will create the partition itself, make a file system on it,12 and mount it.</para>10 <para>In this chapter, the partition which will host the LFS system is 11 prepared. We will create the partition itself, create a file system 12 on it, and mount it.</para> 13 13 14 14 </sect1> 15 -
chapter02/mounting.xml
r6e35438 r9a207c4 5 5 ]> 6 6 <sect1 id="space-mounting"> 7 <title>Mounting the new partition</title>7 <title>Mounting the New Partition</title> 8 8 <?dbhtml filename="mounting.html"?> 9 9 10 <para>Now that we've created a file system, we want to be able to access 11 the partition. For that, we need to mount it, and have to choose a mount 12 point. In this book we assume that the file system is mounted under 13 <filename class="directory">/mnt/lfs</filename>, but it doesn't matter what directory 14 you choose.</para> 10 <para>Now that a file system has been created, the partition needs to 11 be made accessible. In order to do this, the partition needs to be 12 mounted at a chosen mount point. For the purposes of this book, it is 13 assumed that the file system is mounted under <filename 14 class="directory">/mnt/lfs</filename>, but the directory choice is up 15 to you.</para> 15 16 16 <para>Choose a mount point and assign it to the LFS environment variable17 by running:</para>17 <para>Choose a mount point and assign it to the LFS environment 18 variable by running:</para> 18 19 19 20 <screen><userinput>export LFS=/mnt/lfs</userinput></screen> 20 21 21 <para>Now create the mount point and mount the LFS file system by running:</para> 22 <para>Next, create the mount point and mount the LFS file system by 23 running:</para> 22 24 23 25 <screen><userinput>mkdir -p $LFS … … 27 29 partition.</para> 28 30 29 <para>If you have decided to use multiple partitions for LFS (say one for30 <filename class="directory">/</filename> and another for 31 <filename class="directory">/usr</filename>), mount them like this:</para>31 <para>If using multiple partitions for LFS (e.g., one for <filename 32 class="directory">/</filename> and another for <filename 33 class="directory">/usr</filename>), mount them using:</para> 32 34 33 35 <screen><userinput>mkdir -p $LFS … … 36 38 mount /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen> 37 39 38 <para>Of course, replace <replaceable>[xxx]</replaceable> and 39 <replaceable>[yyy]</replaceable> with the appropriate partition names.</para> 40 <para>Replace <replaceable>[xxx]</replaceable> and 41 <replaceable>[yyy]</replaceable> with the appropriate partition 42 names.</para> 40 43 41 <para>You should also ensure that this new partition is not mounted with 42 permissions that are too restrictive (such as the nosuid, nodev or noatime 43 options). You can run the <command>mount</command> command without any 44 parameters to see with what options the LFS partition is mounted. If 45 you see nosuid, nodev or noatime, you will need to remount it.</para> 46 47 <para>Now that we've made ourselves a place to work in, we're ready to download 48 the packages.</para> 44 <para>Ensure that this new partition is not mounted with permissions 45 that are too restrictive (such as the nosuid, nodev, or noatime 46 options). Run the <command>mount</command> command without any 47 parameters to see with what options are set for the mounted LFS 48 partition. If <emphasis>nosuid</emphasis>, <emphasis>nodev</emphasis>, 49 and/or <emphasis>noatime</emphasis> are set, the partition will need 50 to be remounted.</para> 51 52 <para>Now that there is an established place to work, it's time to 53 download the packages.</para> 49 54 50 55 </sect1> 56
Note:
See TracChangeset
for help on using the changeset viewer.