- Timestamp:
- 07/22/2001 07:45:10 PM (23 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, 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, v3_0, v3_1, v3_2, v3_3, v4_0, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- f1da843
- Parents:
- 46f5461
- Location:
- chapter08
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter08/fstab.xml
r46f5461 rb822811 2 2 <title>Creating the /etc/fstab file</title> 3 3 4 <para> 5 In order for certain programs to be able to determine where certain 4 <para>In order for certain programs to be able to determine where certain 6 5 partitions are supposed to be mounted by default, the /etc/fstab file is 7 6 used. A new file <filename>/etc/fstab</filename> is created containing the 8 following: 9 </para> 7 following:</para> 10 8 11 <para> 12 <screen> 13 <userinput>cat > /etc/fstab << "EOF"</userinput> 9 <para><screen><userinput>cat > /etc/fstab << "EOF"</userinput> 14 10 # Begin /etc/fstab 15 11 … … 19 15 20 16 # End /etc/fstab 21 <userinput>EOF</userinput> 22 </screen> 23 </para> 17 <userinput>EOF</userinput></screen></para> 24 18 25 <para> 26 <LFS-partition designation>, <swap-partition 19 <para><LFS-partition designation>, <swap-partition 27 20 designation> and <fs-type> have to be replaced with the appropriate 28 21 values 29 (/dev/hda2, /dev/hda5 and reiserfs for example). 30 </para> 22 (/dev/hda2, /dev/hda5 and reiserfs for example).</para> 31 23 32 24 </sect1> -
chapter08/introduction.xml
r46f5461 rb822811 2 2 <title>Introduction</title> 3 3 4 <para> 5 This chapter will make LFS bootable. This chapter deals with creating a 4 <para>This chapter will make LFS bootable. This chapter deals with creating a 6 5 new fstab file, building a 7 6 new kernel for the new LFS system and adding the proper entries to LILO 8 so that the LFS system can be selected for booting at the LILO: prompt. 9 </para> 7 so that the LFS system can be selected for booting at the LILO: prompt.</para> 10 8 11 9 </sect1> -
chapter08/kernel.xml
r46f5461 rb822811 2 2 <title>Installing a kernel</title> 3 3 4 <para> 5 Building the kernel involves a few steps: configuring it and compiling 4 <para>Building the kernel involves a few steps: configuring it and compiling 6 5 it. There are a few ways to configure the kernel. If you don't like the 7 6 way this book does it, read the <filename>README</filename> that comes 8 7 with the kernel source tree, and find out what the options are. The 9 following commands are run to build the kernel: 10 </para> 8 following commands are run to build the kernel:</para> 11 9 12 <para> 13 <screen> 14 <userinput>cd /usr/src/linux &&</userinput> 10 <para><screen><userinput>cd /usr/src/linux &&</userinput> 15 11 <userinput>make mrproper &&</userinput> 16 12 <userinput>make menuconfig &&</userinput> … … 20 16 <userinput>make modules_install &&</userinput> 21 17 <userinput>cp arch/i386/boot/bzImage /boot/lfskernel &&</userinput> 22 <userinput>cp System.map /boot</userinput> 23 </screen> 24 </para> 18 <userinput>cp System.map /boot</userinput></screen></para> 25 19 26 <para> 27 Note: the arch/i386/boot/bzImage path may vary on different platforms. 28 </para> 20 <para>Note: the arch/i386/boot/bzImage path may vary on 21 different platforms.</para> 29 22 30 23 </sect1> -
chapter08/lilo.xml
r46f5461 rb822811 2 2 <title>Making the LFS system bootable</title> 3 3 4 <para> 5 In order to being able to boot the LFS system, we need to update our 4 <para>In order to being able to boot the LFS system, we need to update our 6 5 bootloader. We're assuming that your host system is using Lilo (since 7 that's the most commonly used boot loader at the moment). 8 </para> 6 that's the most commonly used boot loader at the moment).</para> 9 7 10 <para> 11 We will not be running the lilo program inside chroot. Running lilo 8 <para>We will not be running the lilo program inside chroot. Running lilo 12 9 inside chroot can have fatal side-effects which render your MBR useless 13 10 and you'd need a boot disk to be able to start any Linux system (either 14 the host system or the LFS system). 15 </para> 11 the host system or the LFS system).</para> 16 12 17 <para> 18 First we'll exit chroot and copy the lfskernel file to the host system: 19 </para> 13 <para>First we'll exit chroot and copy the lfskernel file to the host 14 system:</para> 20 15 21 <para> 22 <screen> 23 <userinput>logout</userinput> 24 <userinput>cp $LFS/boot/lfskernel /boot</userinput> 25 </screen> 26 </para> 16 <para><screen><userinput>logout</userinput> 17 <userinput>cp $LFS/boot/lfskernel /boot</userinput></screen></para> 27 18 28 <para> 29 The next step is adding an entry to /etc/lilo.conf so that we can 30 choose LFS when booting the computer: 31 </para> 19 <para>The next step is adding an entry to /etc/lilo.conf so that we can 20 choose LFS when booting the computer:</para> 32 21 33 <para> 34 <screen> 35 <userinput>cat >> /etc/lilo.conf << "EOF"</userinput> 22 <para><screen><userinput>cat >> /etc/lilo.conf << "EOF"</userinput> 36 23 image=/boot/lfskernel 37 24 label=lfs 38 25 root=<partition> 39 26 read-only 40 <userinput>EOF</userinput> 41 </screen> 42 </para> 27 <userinput>EOF</userinput></screen></para> 43 28 44 <para> 45 <partition> must be replaced by the LFS partition's designation. 46 </para> 29 <para><partition> must be replaced by the LFS 30 partition's designation.</para> 47 31 48 <para> 49 Now the boot loader gets updated by running: 50 </para> 32 <para>Now the boot loader gets updated by running:</para> 51 33 52 <para> 53 <screen> 54 <userinput>/sbin/lilo</userinput> 55 </screen> 56 </para> 34 <para><screen><userinput>/sbin/lilo</userinput></screen></para> 57 35 58 <para> 59 The last step is syncing the host system lilo config. files with the 60 LFS system: 61 </para> 36 <para>The last step is syncing the host system lilo config. files with the 37 LFS system:</para> 62 38 63 <para> 64 <screen> 65 <userinput>cp /etc/lilo.conf $LFS/etc &&</userinput> 66 <userinput>cp <kernel images> $LFS/boot</userinput> 67 </screen> 68 </para> 39 <para><screen><userinput>cp /etc/lilo.conf $LFS/etc &&</userinput> 40 <userinput>cp <kernel images> $LFS/boot</userinput></screen></para> 69 41 70 <para> 71 To find out which kernel images files are being used, look at the 42 <para>To find out which kernel images files are being used, look at the 72 43 /etc/lilo.conf file and find the lines starting with 73 44 <emphasis>image=</emphasis>. If your host system has kernel files in 74 45 other places than the /boot directory, make sure you update the paths 75 46 in the $LFS/etc/lilo.conf file so that it does look for them in the 76 /boot directory. 77 </para> 47 /boot directory.</para> 78 48 79 <para> 80 As soon as we have booted into LFS we can run 49 <para>As soon as we have booted into LFS we can run 81 50 <userinput>/sbin/lilo</userinput> from the LFS system in order to have 82 the latest Lilo version in the MBR. 83 </para> 51 the latest Lilo version in the MBR.</para> 84 52 85 53 </sect1> -
chapter08/reboot.xml
r46f5461 rb822811 2 2 <title>Rebooting the system</title> 3 3 4 <para> 5 Now that all software has been installed, bootscripts have been created, 4 <para>Now that all software has been installed, bootscripts have been created, 6 5 it's time to reboot the computer. Before we reboot let's exit the 7 chroot'ed environment first and unmount the LFS partition by running: 8 </para> 6 chroot'ed environment first and unmount the LFS partition by running:</para> 9 7 10 <para> 11 <screen> 12 <userinput>umount $LFS/proc &&</userinput> 13 <userinput>umount $LFS</userinput> 14 </screen> 15 </para> 8 <para><screen><userinput>umount $LFS/proc &&</userinput> 9 <userinput>umount $LFS</userinput></screen></para> 16 10 17 <para> 18 And you can reboot your system by running something like: 19 </para> 11 <para>And you can reboot your system by running something like:</para> 20 12 21 <para> 22 <screen> 23 <userinput>/sbin/shutdown -r now</userinput> 24 </screen> 25 </para> 13 <para><screen><userinput>/sbin/shutdown -r now</userinput></screen></para> 26 14 27 <para> 28 At the LILO: prompt make sure that you tell it to boot 15 <para>At the LILO: prompt make sure that you tell it to boot 29 16 <emphasis>lfs</emphasis> and not the default entry which will boot your 30 host system again. 31 </para> 17 host system again.</para> 32 18 33 <para> 34 During the first boot you will get a few errors from syslogd and klogd. 19 <para>During the first boot you will get a few errors from syslogd and klogd. 35 20 These errors occur because we haven't setup networking yet. That will 36 21 be taken care of in the next chapter. So don't worry about those errors 37 for now. 38 </para> 22 for now.</para> 39 23 40 <para> 41 As just stated, one thing remains to be done and that's setting up 24 <para>As just stated, one thing remains to be done and that's setting up 42 25 networking. After having rebooted and finished the next chapter of this 43 26 book the LFS system is completely ready for use, and you can start 44 adding your own software. 45 </para> 27 adding your own software.</para> 46 28 47 29 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.