revisedchroot.xml 1.1 KB

12345678910111213141516171819202122232425
  1. <sect1 id="ch06-revisedchroot">
  2. <title>Revised chroot command</title>
  3. <?dbhtml filename="revisedchroot.html" dir="chapter06"?>
  4. <para>From now on when you exit the chroot environment and wish to re-enter
  5. it, you need to run the following modified chroot command. The one at the
  6. beginning of this chapter might not work anymore (if your host distribution
  7. was based on glibc-2.2.x or older, the programs in <filename
  8. class="directory">/static/bin</filename>, such as <filename>bash</filename>,
  9. will not work anymore). The following chroot command will work regardless
  10. of your host distribution's Glibc version.</para>
  11. <para>Additionally, now that all software has been installed there is no
  12. need to use anything from the <filename
  13. class="directory">/static</filename> directory anymore.</para>
  14. <para><screen><userinput>chroot $LFS /usr/bin/env -i \
  15. &nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  16. &nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  17. &nbsp;&nbsp;&nbsp;&nbsp;/bin/bash --login</userinput></screen></para>
  18. <para><screen><userinput>set +h</userinput></screen></para>
  19. </sect1>