- Timestamp:
- 03/19/2001 04:02:50 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:
- 9aab9f5
- Parents:
- 53b5ccf
- Location:
- chapter06
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/aboutdebug.xml
r53b5ccf r81a47c0 6 6 symbols and optimizing level 2 (gcc options -g and -O2) and are compiled 7 7 for a specific CPU. On Intel platforms software is compiled for i386 8 processors by default. If you don't wish to run software on other9 machines other than your own, youmight want to change the default8 processors by default. If a user doesn't wish to run software on other 9 machines other than his own, he might want to change the default 10 10 compiler options so that they will be compiled with a higher 11 optimization level, no debugging symbols and generate code for your11 optimization level, no debugging symbols and generate code for his 12 12 specific architecture. Let me first explain what debugging symbols 13 13 are. … … 15 15 16 16 <para> 17 A program compiled with debugging symbols means youcan run a program or17 A program compiled with debugging symbols means a user can run a program or 18 18 library through a debugger and the debugger's output will be user friendlier. 19 These debugging symbols also 19 These debugging symbols also enlarge the program or library significantly. 20 20 </para> 21 21 22 22 <para> 23 23 To remove debugging symbols from a binary (must be an a.out or ELF binary) 24 run <userinput>strip --strip-debug filename</userinput> You can use wild cards 25 if you need to strip debugging symbols from multiple files (use something like 24 run <userinput>strip --strip-debug filename</userinput>. A user can use wild 25 cards 26 if he needs to strip debugging symbols from multiple files (use something like 26 27 strip --strip-debug $LFS/usr/bin/*). Another, easier, options is just 27 28 not to compile programs with debugging symbols. Most people will probably 28 never use a debugger on software, so by leaving those symbols out you29 can save a lot of diskspace.29 never use a debugger on software, so by leaving those symbols out 30 a lot of diskspace can be saved. 30 31 </para> 31 32 32 33 <para> 33 Before you wonderif these debugging symbols would make a big difference,34 Before someone wonders if these debugging symbols would make a big difference, 34 35 here are some statistics: 35 36 </para> … … 59 60 <para> 60 61 Sizes may vary depending on which compiler was used and which C library 61 version was used to link dynamic programs against, but yourresults will be62 similar if you compareprograms with and without debugging symbols. After62 version was used to link dynamic programs against, but results will be 63 similar if a user compares programs with and without debugging symbols. After 63 64 I was done with this chapter and stripped all debugging symbols from all LFS 64 65 binaries and libraries I regained a little over 102 MB of disk space. Quite -
chapter06/bash-inst.xml
r53b5ccf r81a47c0 17 17 18 18 <para> 19 Replace the static bash with the dynamic bash and re-enterthe chroot'ed20 environment by running:19 The static bash is replaced with the dynamic bash and the chroot'ed 20 environment is re-entered by running: 21 21 </para> 22 22 -
chapter06/bashprofile.xml
r53b5ccf r81a47c0 5 5 When we have entered the chroot'ed environment in the next section we 6 6 want to export a couple of environment variables in that shell such as 7 PS1, PATH and others variables you want to have set. For that purpose we'll 7 PS1, PATH and others variables a user wants to have set. For that 8 purpose we'll 8 9 create the $LFS/root/.bash_profile file which will be read by bash when we 9 10 enter the chroot environment. … … 31 32 32 33 <para> 33 You can add more environment variables,aliases and whatever else you 34 need/want at your own discretion as you deem them necessary. 34 More environment variables,aliases and whatever else is 35 needed/wanted can be added at the users own discretion 36 as he deems them necessary. 35 37 </para> 36 38 -
chapter06/bison-exp.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 <userinput>--datadir=/usr/share/bison:</userinput> This install the5 <userinput>--datadir=/usr/share/bison:</userinput> This installs the 6 6 bison grammar files in /usr/share/bison rather than /usr/share. 7 7 </para> -
chapter06/bzip2-inst.xml
r53b5ccf r81a47c0 29 29 <para> 30 30 Although it's not strictly a part of a basic LFS system it's worth 31 mentioning that you can download a patch for Tarwhich enables the tar31 mentioning that a patch for Tar can be downloaded which enables the tar 32 32 program to compress and uncompress using bzip2/bunzip2 easily. With a 33 plain tar you'll haveto use constructions like bzcat file.tar.bz|tar33 plain tar a user has to use constructions like bzcat file.tar.bz|tar 34 34 xv or tar --use-compress-prog=bunzip2 -xvf file.tar.bz2 to use bzip2 and 35 bunzip2 with tar. This patch gives you the -y option so youcan unpack a35 bunzip2 with tar. This patch gives the -y option so a user can unpack a 36 36 Bzip2 archive with tar xvfy file.tar.bz2. Applying this patch will be 37 mentioned later on when you re-install the Tar package.37 mentioned later on when the Tar package is re-installed. 38 38 </para> 39 39 -
chapter06/chroot.xml
r53b5ccf r81a47c0 10 10 Enter the following command to enter the chroot'ed environment. From 11 11 this point on there's no need to use the $LFS variable anymore, because 12 everything you dowill be restricted to the LFS partition (since / is12 everything a user does will be restricted to the LFS partition (since / is 13 13 actually /mnt/lfs but the shell doesn't know that). 14 14 </para> … … 31 31 <para> 32 32 Now that we are inside a chroot'ed environment, we can continue to 33 install all the basic system software. Make sure you execute all the34 following commands in this and following chapters from within the35 chroot'ed environment. If you ever leavethis environment for a reason36 (say when you reboot or something) don't forgetto mount $LFS/proc again37 like you did earlier and to re-enter chroot before you continuewith the33 install all the basic system software. A user has to make sure all the 34 following commands in this and following chapters are run from within the 35 chroot'ed environment. If he ever leaves this environment for a reason 36 (say when rebooting or something) he has to remember to mount $LFS/proc again 37 like he did earlier and to re-enter chroot before continuing with the 38 38 book. 39 39 </para> -
chapter06/config-glibc.xml
r53b5ccf r81a47c0 40 40 41 41 <para> 42 Run the <userinput>tzselect</userinput> script and answer the questions 43 regarding your timezone. When you're done, the script will give you the 44 location of the timezone file you need. 42 The <userinput>tzselect</userinput> script has to be run and the questions 43 regarding the user's timezone have to be answered. 44 When the user is done, the script will give the 45 location of the needed timezone file. 45 46 </para> 46 47 … … 64 65 65 66 <para> 66 The symlink youwould create with that information would be:67 The symlink a user would create with that information would be: 67 68 </para> 68 69 -
chapter06/config-ldso.xml
r53b5ccf r81a47c0 5 5 By default the dynamic loader searches a few default paths for dynamic 6 6 libraries, so there normally isn't a need for the 7 <filename>/etc/ld.so.conf</filename> file unless you haveextra8 directories in which you wantthe system to search for paths. The7 <filename>/etc/ld.so.conf</filename> file unless the system has extra 8 directories in which a user wants the system to search for paths. The 9 9 <filename class="directory">/usr/local/lib</filename> directory isn't 10 10 searched through for dynamic libraries by default, so we want to add 11 this path so when you install software youwon't be suprised by them not11 this path so when a user installs software he won't be suprised by them not 12 12 running for some reason. 13 13 </para> … … 36 36 <filename class="directory">/lib</filename> and 37 37 <filename class="directory">/usr/lib</filename> directories it doesn't 38 hurt. This way you see right away what's being searched and don't have 39 to remeber the default search paths if you don't want to. 38 hurt. This way it can be seen right away what's being searched and a user 39 doesn't have 40 to remeber the default search paths if he doesn't want to. 40 41 </para> 41 42 -
chapter06/config-lilo.xml
r53b5ccf r81a47c0 4 4 <para> 5 5 We're not going to create lilo's configuration file from scratch, but we'll 6 use the file from yournormal Linux system. This file is different on every7 machine and thus I can't create it here. Since youwould want to have the8 same options regarding lilo as you have when you're using yournormal Linux9 system youwould create the file exactly as it is on the normal system.6 use the file from the normal Linux system. This file is different on every 7 machine and thus I can't create it here. Since a user would want to have the 8 same options regarding lilo as he has when he is using his normal Linux 9 system he would create the file exactly as it is on the normal system. 10 10 </para> 11 11 12 12 <para> 13 13 Copy the Lilo configuration file and kernel images that Lilo uses by 14 running the following commands from a shell on yournormal Linux system.15 Don't execute these commands from yourchroot'ed shell.14 running the following commands from a shell on the normal Linux system. 15 Don't execute these commands from the chroot'ed shell. 16 16 </para> 17 17 … … 24 24 25 25 <para> 26 Before you can execute the second command you needto know the names of27 the kernel images. Youcan't just copy all files from the /boot26 Before a user can execute the second command he needs to know the names of 27 the kernel images. He can't just copy all files from the /boot 28 28 directory. The /etc/lilo.conf file contains the names of the kernel 29 images you'reusing. Open the file and look for lines like this:29 images he is using. Open the file and look for lines like this: 30 30 </para> 31 31 … … 40 40 represent the name and location of the image files. These files will 41 41 usually be in /boot but they might be in other directories as well, 42 depending on yourdistribution's conventions.42 depending on the distribution's conventions. 43 43 </para> 44 44 -
chapter06/config-shadowpwd.xml
r53b5ccf r81a47c0 3 3 <para> 4 4 This package contains the utilities to modify user's passwords, add new 5 users/groups, delete users/groups and more. I'm not going to explain to you6 what 'password shadowing' means. You can read all about thatin the doc/HOWTO5 users/groups, delete users/groups and more. I'm not going to explain 6 what 'password shadowing' means. All about that can be read in the doc/HOWTO 7 7 file within the unpacked shadow password suite's source tree. There's one 8 thing you should keep in mind, if you decideto use shadow support, that8 thing a user should keep in mind, if he decides to use shadow support, that 9 9 programs that need to verify passwords (examples are xdm, ftp daemons, 10 10 pop3 daemons, etc) need to be 'shadow-compliant', eg. they need to … … 18 18 19 19 <para> 20 Now is a very good moment to read chapter 5 of the doc/HOWTO file. You can 21 read how you can enable shadow'ed passwords, how to test whether shadowing 20 Now is a very good moment to read chapter 5 of the doc/HOWTO file. It 21 describes 22 how to enable shadow'ed passwords, how to test whether shadowing 22 23 works and if not, how to disable it again. 23 24 </para> … … 25 26 <para> 26 27 The documentation mentions something about the creation of npasswd and 27 nshadow after you run pwconv. This is an error in the documentation.28 Those two files will be be created. After you run pwconv, /etc/passwd29 will no longer contain the passwords and /etc/shadow will. You don't30 need to rename the npasswd and nshadow files yourself.28 nshadow after pwconv is run. This is an error in the documentation. 29 Those two files will not be created. After pwconv is run, /etc/passwd 30 will no longer contain the passwords and /etc/shadow will. A user doesn't 31 need to rename the npasswd and nshadow files himself. 31 32 </para> 32 33 -
chapter06/consoletools-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 Before you start installing Console-tools you haveto unpack the5 Before starting to install Console-tools a user has to unpack the 6 6 console-tools-0.2.3.patch file. 7 7 </para> -
chapter06/findutils-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 Before you install Findutils you have to unpack the findutils patch 6 file. 5 Before Findutils is installed the findutils patch file has to be unpacked. 7 6 </para> 8 7 -
chapter06/gcc-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 After you unpacked the gcc-2.95.2.1 archive don't enter the newly created 6 gcc-2.95.2.1 directory but stay in the /usr/src directory. Install GCC by 5 After a user unpacked the gcc-2.95.2.1 archive he doesn't enter the 6 newly created 7 gcc-2.95.2.1 directory but stays in the /usr/src directory. Install GCC by 7 8 running the following commands: 8 9 </para> -
chapter06/glibc-inst.xml
r53b5ccf r81a47c0 41 41 42 42 <para> 43 You can get rid of the "I have no name!" in the bash prompt if you want.44 Do thisby exiting chroot and re-entering it. Run the following43 A user can get rid of the "I have no name!" in the bash prompt if he wants. 44 This is done by exiting chroot and re-entering it. Run the following 45 45 commands to do that: 46 46 </para> -
chapter06/introduction.xml
r53b5ccf r81a47c0 4 4 <para> 5 5 The installation of all the software is pretty straightforward and 6 you'll think it's so much easier and shorter to give the generic6 a user will think it's so much easier and shorter to give the generic 7 7 installation instructions for each package and only explain how to 8 8 install something if a certain package requires an alternate installation 9 method. Although I agree with youon that, I, however, choose to give the9 method. Although I agree on that, I, however, choose to give the 10 10 full instructions for each and every package. This is simply to avoid any 11 11 possible confusion and errors. -
chapter06/lilo-inst.xml
r53b5ccf r81a47c0 15 15 <para> 16 16 It appears that compilation of this package fails on certain machines 17 when the -g compiler flag is being used. If youcan't compile Lilo at18 all, please try removingthe -g value from the CFLAGS variable in the17 when the -g compiler flag is being used. If a user can't compile Lilo at 18 all, he should try to remove the -g value from the CFLAGS variable in the 19 19 <filename>Makefile</filename> file. 20 20 </para> … … 22 22 <para> 23 23 At the end of the installation the make install process will print a 24 message stating that you have to execute /sbin/liloto complete the24 message stating that /sbin/lilo has to be executed to complete the 25 25 update. Don't do this as it has no use. The /etc/lilo.conf isn't present 26 26 yet. We will complete the installation of lilo in chapter 8. -
chapter06/m4-inst.xml
r53b5ccf r81a47c0 15 15 16 16 <para> 17 If you're base system is running a 2.0 kernel and yourGlibc version is18 2.1 then youwill most likely get problems executing M4 in the17 If the base system is running a 2.0 kernel and the Glibc version is 18 2.1 then a user will most likely get problems executing M4 in the 19 19 chroot'ed environment due to incompatibilities between the M4 program, 20 Glibc-2.1 and the running 2.0 kernel. If you haveproblems executing the21 m4 program in the chroot'ed environment (for example when you install22 the autoconf and automake packages) you'll have to exit the chroot'ed20 Glibc-2.1 and the running 2.0 kernel. If he has problems executing the 21 m4 program in the chroot'ed environment (for example when he installs 22 the autoconf and automake packages) he'll have to exit the chroot'ed 23 23 environment and compile M4 statically. This way the binary is linked 24 against Glibc 2.0 (if you run kernel 2.0 you'reGlibc version is 2.0 as24 against Glibc 2.0 (if he runs kernel 2.0, Glibc version is 2.0 as 25 25 well on a decent system. Kernel 2.0 and Glibc-2.1 don't mix very well) 26 and won't give youany problems.26 and won't give any problems. 27 27 </para> 28 28 … … 43 43 44 44 <para> 45 Now you can re-enter the chroot'ed environment and continue with the 46 next package. If you wish to recompile M4 dynamically, you can do that 47 after you have rebooted into the LFS system rather than chroot'ed into it. 45 Now the chroot'ed environment can be re-entered and the 46 next package an be installed. If M4 should be re-compiled dynamically, 47 this can be done 48 after having rebooted into the LFS system rather than chrooting into it. 48 49 </para> 49 50 -
chapter06/makedev-inst.xml
r53b5ccf r81a47c0 16 16 <para> 17 17 The <quote>generic</quote> parameter passed to the MAKEDEV script 18 doesn't create all the devices you might need, such as audio devices, 19 hdc, hdd and ohters. If you seem to be missing something tell MAKEDEV to 20 create it. To create hdc replace generic with hdc. You can also add hdc 21 to generic, so you would execute <userinput>./MAKEDEV -v generic 18 doesn't create all the devices a user might need, such as audio devices, 19 hdc, hdd and ohters. If it seems something is missing MAKEDEV has to be told 20 to 21 create it. To create hdc replace generic with hdc. A user can also add hdc 22 to generic, so he would execute <userinput>./MAKEDEV -v generic 22 23 hdc</userinput> to create the generic set of devices files, plus the 23 files you needto be able to access hdc (and hdc1, hdc2, etc)24 files he needs to be able to access hdc (and hdc1, hdc2, etc) 24 25 </para> 25 26 26 27 <para> 27 MAKEDEV will create hda[1-20] and hdb[1-20] and such but keep in mind28 that youmay not be able to use all of those devices due to kernel28 MAKEDEV will create hda[1-20] and hdb[1-20] and such but he has to keep in mind 29 that he may not be able to use all of those devices due to kernel 29 30 limitations regarding the max. number of partitions. 30 31 </para> -
chapter06/perl-inst.xml
r53b5ccf r81a47c0 15 15 16 16 <para> 17 If you don't want to answer all those questions Perl asks you, youcan17 If a user doesn't want to answer all those questions Perl asks, he can 18 18 add the -d option to the configure script and Perl will use all the 19 default settings. To avoid the Configure script asking youquestions20 after the config.sh file has been created youcan pass the -e parameter19 default settings. To avoid the Configure script asking questions 20 after the config.sh file has been created he can pass the -e parameter 21 21 to perl as well. The commands with these parameters included will be: 22 22 </para> -
chapter06/removeoldnss.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 If you have copied the NSS Library files from yournormal Linux system to the6 LFS system (because yournormal system runs glibc-2.0) it's time to remove5 If the user copied the NSS Library files from the normal Linux system to the 6 LFS system (because the normal system runs glibc-2.0) it's time to remove 7 7 them now by running: 8 8 </para> -
chapter06/sysvinit-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 When you change run levels (for example when you aregoing to shutdown6 yoursystem) the init program is going to send the TERM and KILL signals5 When run levels are changed (for example when going to shutdown 6 the system) the init program is going to send the TERM and KILL signals 7 7 to all the processes that init started. But init prints a message to the 8 8 screen saying "sending all processes the TERM signal" and the same for the 9 9 KILL signal. This implies that init sends this signal to all the currently 10 running processes, which isn't the case. To avoid this confusion youcan10 running processes, which isn't the case. To avoid this confusion a user can 11 11 apply the sysvinit patch found on the LFS FTP site to sysvinit that changes 12 12 the sentence in the shutdown.c file and have it print "sending all -
chapter06/tar-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 If you want to be able to directly use bzip2 files with tar, use the tar 5 If a user wants to be able to directly use bzip2 files with tar, he can 6 use the tar 6 7 patch avaiable from the LFS FTP site. This patch will add the -y option 7 to tar which works the same as the -z option to tar (which you can use8 to tar which works the same as the -z option to tar (which can be used 8 9 for gzip files). 9 10 </para> -
chapter06/vim-inst.xml
r53b5ccf r81a47c0 3 3 4 4 <para> 5 If you don't like vim to be installed as an editor on yourLFS system,6 you may want to download an alternative and install an editor you 7 prefer . There are a few hints how to install different editors5 If a user doesn't like vim to be installed as an editor on the LFS system, 6 he may want to download an alternative and install an editor he 7 prefers. There are a few hints how to install different editors 8 8 available at <ulink 9 9 url="http://cvs.linuxfromscratch.org/index.cgi/hints/editors/"> … … 12 12 13 13 <para> 14 You need to unpack both the vim-rt and vim-src packagesto install Vim.14 Both the vim-rt and vim-src packages need to be unpacked to install Vim. 15 15 Both packages will unpack their files into the vim-5.7 directory. This 16 16 won't overwrite any files from the other package. So it doesn't mattter 17 in which order you do it. Install Vim by running the following commands:17 in which order it is done. Install Vim by running the following commands: 18 18 </para> 19 19 … … 29 29 30 30 <para> 31 If you are planning on installing the X Window system on yourLFS32 system, you might want to re-compile Vim after you haveinstalled X. Vim31 If a user plans on installing the X Window system on his LFS 32 system, he might want to re-compile Vim after he has installed X. Vim 33 33 comes with a nice GUI version of the editor which requires X and a few 34 34 other libraries to be installed. For more information read the Vim
Note:
See TracChangeset
for help on using the changeset viewer.