source: BOOK/boot/common/createfiles.xml@ a346848

clfs-3.0.0-systemd systemd
Last change on this file since a346848 was f742599, checked in by Chris Staub <chris@…>, 11 years ago

Additional minor text update on essential symlinks page

  • Property mode set to 100644
File size: 5.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-boot-createfiles">
9 <?dbhtml filename="createfiles.html"?>
10
11 <title>Creating Essential Symlinks</title>
12
13 <para os="a">Some programs use hard-wired paths to files which do not exist
14 yet. In order to satisfy these programs, create a number of symbolic
15 links which will be replaced by real files throughout the course of
16 the next chapter after the software has been installed.</para>
17
18<screen os="b"><userinput>ln -sv /tools/bin/{bash,cat,echo,grep,login,pwd,stty} ${CLFS}/bin
19ln -sv /tools/bin/file ${CLFS}/usr/bin
20ln -sv /tools/lib/libgcc_s.so{,.1} ${CLFS}/usr/lib
21ln -sv /tools/lib/libstdc++.so{.6,} ${CLFS}/usr/lib
22sed -e 's/tools/usr/' /tools/lib/libstdc++.la &gt; ${CLFS}/usr/lib/libstdc++.la
23ln -sv bash ${CLFS}/bin/sh
24ln -sv ../run ${CLFS}/var/run
25ln -sv /tools/sbin/init ${CLFS}/sbin
26ln -sv /tools/etc/{login.{access,defs},limits} ${CLFS}/etc</userinput></screen>
27
28 <variablelist os="c">
29 <title>The purpose of each link:</title>
30
31 <varlistentry os="c1">
32 <term><parameter><filename>/bin/bash</filename></parameter></term>
33 <listitem>
34 <para>Many <command>bash</command> scripts specify
35 <filename>/bin/bash</filename>.</para>
36 </listitem>
37 </varlistentry>
38
39 <varlistentry os="c2">
40 <term><parameter><filename>/bin/cat</filename></parameter></term>
41 <listitem>
42 <para>This pathname is hard-coded into Glibc's configure script.</para>
43 </listitem>
44 </varlistentry>
45
46 <varlistentry os="c3">
47 <term><parameter><filename>/bin/echo</filename></parameter></term>
48 <listitem>
49 <para>This is to satisfy one of the tests in Glibc's test suite, which
50 expects <filename>/bin/echo</filename>.</para>
51 </listitem>
52 </varlistentry>
53
54 <varlistentry os="c4">
55 <term><parameter><filename>/bin/grep</filename></parameter></term>
56 <listitem>
57 <para>This to avoid a hard-coded
58 <filename class="directory">/tools</filename> reference in Libtool.</para>
59 </listitem>
60 </varlistentry>
61
62 <varlistentry os="c5">
63 <term><parameter><filename>/bin/login</filename></parameter></term>
64 <listitem>
65 <para>The <command>agetty</command> program expects to find
66 <command>login</command> in <filename class="directory">/bin</filename>.</para>
67 </listitem>
68 </varlistentry>
69
70 <varlistentry os="c6">
71 <term><parameter><filename>/bin/pwd</filename></parameter></term>
72 <listitem>
73 <para>Some <command>configure</command> scripts, particularly Glibc's,
74 have this pathname hard-coded.</para>
75 </listitem>
76 </varlistentry>
77
78 <varlistentry os="c7">
79 <term><parameter><filename>/bin/stty</filename></parameter></term>
80 <listitem>
81 <para>This pathname is hard-coded into Expect, therefore it is needed
82 for Binutils and GCC test suites to pass.</para>
83 </listitem>
84 </varlistentry>
85
86 <varlistentry os="c8">
87 <term><parameter><filename>/usr/bin/file</filename></parameter></term>
88 <listitem>
89 <para>Binutils' <command>configure</command> scripts specify this
90 command location.</para>
91 </listitem>
92 </varlistentry>
93
94 <varlistentry os="c9">
95 <term><parameter><filename>/usr/lib/libgcc_s.so{,.1}</filename></parameter></term>
96 <listitem>
97 <para>Glibc needs this for the pthreads library to work.</para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry os="c10">
102 <term><parameter><filename>/usr/lib/libstdc++{,.6}</filename></parameter></term>
103 <listitem>
104 <para>This is needed by several tests in Glibc's test suite, as well as
105 for C++ support in GMP.</para>
106 </listitem>
107 </varlistentry>
108
109 <varlistentry os="c11">
110 <term><parameter><filename>/usr/lib/libstdc++.la</filename></parameter></term>
111 <listitem>
112 <para>This prevents a <filename class="directory">/tools</filename>
113 reference that would otherwise be in
114 <filename>/usr/lib/libstdc++.la</filename> after GCC is installed.</para>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry os="c12">
119 <term><parameter><filename>/bin/sh</filename></parameter></term>
120 <listitem>
121 <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
122 </listitem>
123 </varlistentry>
124
125 <varlistentry os="c13">
126 <term><parameter><filename>/var/run</filename></parameter></term>
127 <listitem>
128 <para>This is to account for any applications that have not yet
129 migrated to using <filename class="directory">/run</filename>.</para>
130 </listitem>
131 </varlistentry>
132
133 <varlistentry os="c14">
134 <term><parameter><filename>/sbin/init</filename></parameter></term>
135 <listitem>
136 <para>This is where the kernel expects to find <command>init</command>.</para>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry os="c15">
141 <term><parameter><filename>/etc/{login.{access,defs},limits}</filename></parameter></term>
142 <listitem>
143 <para>These are configuration files used by Shadow and are expected to
144 be found in <filename class="directory">/etc</filename>, for programs
145 such as <command>login</command> and <command>su</command> to work.</para>
146 </listitem>
147 </varlistentry>
148
149 </variablelist>
150
151 <para os="d">Historically, Linux maintains a list of the mounted file systems
152 in the file <filename>/etc/mtab</filename>. Modern kernels maintain this list
153 internally and expose it to the user via the
154 <filename class="directory">/proc</filename> filesystem. To satisfy utilities
155 that expect the presence of <filename>/etc/mtab</filename>, create the
156 following symbolic link:</para>
157
158<screen os="e"><userinput>ln -sv /proc/self/mounts ${CLFS}/etc/mtab</userinput></screen>
159
160</sect1>
Note: See TracBrowser for help on using the repository browser.