Changeset 5b7293a for chapter06/chapter06.xml
- Timestamp:
- 03/09/2004 07:08:33 PM (20 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, 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:
- 02974d8
- Parents:
- c6b5ddb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/chapter06.xml
rc6b5ddb r5b7293a 130 130 131 131 <screen><userinput>chroot $LFS /tools/bin/env -i \ 132 HOME=/root TERM=$TERMPS1='\u:\w\$ ' \132 TERM=$TERM PS1='\u:\w\$ ' \ 133 133 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ 134 /tools/bin/bash --login+h</userinput></screen>134 /tools/bin/bash +h</userinput></screen> 135 135 136 136 <para>The <emphasis>-i</emphasis> option given to the 137 137 <command>env</command> command will clear all variables of the chroot 138 environment. After that, only the HOME,TERM, PS1 and PATH variables are138 environment. After that, only the TERM, PS1 and PATH variables are 139 139 set again. The TERM=$TERM construct will set the TERM variable inside chroot 140 140 to the same value as outside chroot; this variable is needed for programs 141 like <command> vim</command> and <command>less</command> to operate142 properly. If you need other variables present, such as CFLAGS or CXXFLAGS,143 this is a good place to set them again.</para>141 like <command>less</command> and <command>vim</command> to operate 142 properly. If you need other variables present, such as CFLAGS, CXXFLAGS or 143 HOME, this is a good place to set them.</para> 144 144 145 145 <para>From this point on there's no need to use the LFS variable anymore, … … 329 329 will now work.</para> 330 330 331 <screen><userinput>exec /tools/bin/bash --login+h</userinput></screen>331 <screen><userinput>exec /tools/bin/bash +h</userinput></screen> 332 332 333 333 <para>Note the use of the <emphasis>+h</emphasis> directive. This tells … … 581 581 582 582 <screen><userinput>chroot $LFS /tools/bin/env -i \ 583 HOME=/root TERM=$TERMPS1='\u:\w\$ ' \583 TERM=$TERM PS1='\u:\w\$ ' \ 584 584 PATH=/bin:/usr/bin:/sbin:/usr/sbin \ 585 /tools/bin/bash --login</userinput></screen>585 /tools/bin/bash</userinput></screen> 586 586 587 587 <para>Now you can safely strip the binaries and libraries:</para> … … 611 611 612 612 <screen><userinput>chroot $LFS /usr/bin/env -i \ 613 HOME=/root TERM=$TERMPS1='\u:\w\$ ' \613 TERM=$TERM PS1='\u:\w\$ ' \ 614 614 PATH=/bin:/usr/bin:/sbin:/usr/sbin \ 615 /bin/bash --login</userinput></screen>615 /bin/bash</userinput></screen> 616 616 617 617 <para>The reason for this is that, since the programs in <filename
Note:
See TracChangeset
for help on using the changeset viewer.