source: BOOK/boot/common/createfiles.xml@ 4f48ef0

clfs-3.0.0-systemd systemd
Last change on this file since 4f48ef0 was 732349e, checked in by Chris Staub <chris@…>, 10 years ago

Moved creation of /var/run symlink from Essential Symlinks to Creating Directories

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