<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-createfiles">
  <?dbhtml filename="createfiles.html"?>

  <title>Creating Essential Symlinks</title>

  <para os="a">Some programs use hard-wired paths to programs which do not exist
  yet. In order to satisfy these programs, create a number of symbolic
  links which will be replaced by real files throughout the course of
  the next chapter after the software has been installed.</para>

<screen os="b"><userinput>ln -sv /tools/bin/{bash,cat,echo,grep,login,pwd,stty} ${CLFS}/bin
ln -sv /tools/bin/file ${CLFS}/usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} ${CLFS}/usr/lib
ln -sv /tools/lib/libstdc++.so{.6,} ${CLFS}/usr/lib
sed -e 's/tools/usr/' /tools/lib/libstdc++.la &gt; ${CLFS}/usr/lib/libstdc++.la
ln -sv bash ${CLFS}/bin/sh
ln -sv ../run ${CLFS}/var/run
ln -sv /tools/sbin/init ${CLFS}/sbin
ln -sv /tools/etc/{login.{access,defs},limits} ${CLFS}/etc</userinput></screen>

  <para os="c">Historically, Linux maintains a list of the mounted file systems
  in the file <filename>/etc/mtab</filename>. Modern kernels maintain this list
  internally and expose it to the user via the
  <filename class="directory">/proc</filename> filesystem. To satisfy utilities
  that expect the presence of <filename>/etc/mtab</filename>, create the
  following symbolic link:</para>

<screen os="d"><userinput>ln -sv /proc/self/mounts ${CLFS}/etc/mtab</userinput></screen>

</sect1>
