mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
[Bug 127] Clean up ln, mv and cp commands
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1011 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
b58a7ebf15
commit
45714a7d3b
@ -16,7 +16,7 @@ partition which has to be mounted at some point. Before that partition is
|
||||
mounted a user needs and will want to have bash available (it will be hard to
|
||||
execute the boot scripts without a shell for instance).</para>
|
||||
|
||||
<para><userinput>ln -s bash sh:</userinput> This command creates the sh
|
||||
<para><userinput>ln -sf bash sh:</userinput> This command creates the sh
|
||||
symlink that points to bash. Most scripts run themselves via 'sh'
|
||||
(invoked by the #!/bin/sh as the first line in the scripts) which
|
||||
invokes a special bash mode. Bash will then behave (as closely as
|
||||
|
@ -8,7 +8,7 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd $LFS/bin &&</userinput>
|
||||
<userinput>ln -s bash sh</userinput></screen></para>
|
||||
<userinput>ln -sf bash sh</userinput></screen></para>
|
||||
|
||||
<para>If the make install phase ends with something along the lines of</para>
|
||||
|
||||
@ -28,7 +28,7 @@ old version of the texinfo package. This error is not severe by any means: the
|
||||
info pages will be installed when we recompile bash dynamically in
|
||||
chapter 6, so you can ignore it. You do, however, have to run the last
|
||||
two commands manually (the <userinput>cd $LFS/bin</userinput> and
|
||||
<userinput>ln -s bash sh</userinput> commands) because they won't be
|
||||
<userinput>ln -sf bash sh</userinput> commands) because they won't be
|
||||
executed when the error occurs.</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -1,34 +1,6 @@
|
||||
<sect2>
|
||||
<title>Command explanations</title>
|
||||
|
||||
<!--
|
||||
<para><userinput>sed: </userinput> The sed command here searches for the
|
||||
string "$(CC) $(CFLAGS) -o" and replaces it by "$(CC) $(CFLAGS)
|
||||
$(LDFLAGS) -o" in the Makefile file. We make that modification so it
|
||||
will be easier to link bzip2 statically.</para>
|
||||
|
||||
<para><userinput>...Makefile | make -f -:</userinput> Makefile
|
||||
is the last parameter of the sed command which indicates the file to
|
||||
search and replace in. Sed normally sends the modified file to stdout
|
||||
(standard output), which will be the console. With the construction we
|
||||
use, sed's output will be piped to the make program. Normally, when make
|
||||
is started, it tries to find a number of files like Makefile. But we have
|
||||
modified the Makefile file so we don't want make to use it. The "-f -"
|
||||
parameter tells make to read it's input from another file, or from stdin
|
||||
(standard input) which the dash (-) implies. This is one way to do it.
|
||||
Another way would be to have sed write the output to a different file
|
||||
and tell make with the -f parameter to read that alternate file.</para>
|
||||
|
||||
<para><userinput>LDFLAGS=-static:</userinput> This is the second way we use to
|
||||
link a package statically. This is also the most common way.
|
||||
The -all-static value is only used with the binutils package and won't
|
||||
be used throughout the rest of this book.</para>
|
||||
|
||||
I HAVEN'T REMOVED THIS AS WE MAY NEED TO COPY SOME OF IT TO A LATER
|
||||
PACKAGE. IS THIS THE CASE?
|
||||
|
||||
-->
|
||||
|
||||
<para><userinput>make CC="gcc -static": </userinput>This is the method
|
||||
we use to tell gcc that we want bzip2 to be linked statically.</para>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<para><screen><userinput>make CC="gcc -static" &&</userinput>
|
||||
<userinput>make PREFIX=$LFS/usr install &&</userinput>
|
||||
<userinput>cd $LFS/usr/bin &&</userinput>
|
||||
<userinput>mv bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para>
|
||||
<userinput>mv -f bzcat bunzip2 bzip2 bzip2recover $LFS/bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
<title>Command explanations</title>
|
||||
|
||||
<para><screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput>
|
||||
<userinput> lib/Makefile.in > tmp &&</userinput>
|
||||
<userinput> lib/Makefile.in > tmp &&</userinput>
|
||||
<userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput>
|
||||
<userinput> tmp > lib/Makefile.in : </userinput></screen> This is used
|
||||
to fix a problem with building fileutils statically on glibc 2.2.3 systems. If
|
||||
this isn't done, then there is the possibility of all of the fileutils
|
||||
programs causing segmentation faults once chroot is entered in chapter
|
||||
6.</para>
|
||||
<userinput> tmp > lib/Makefile.in : </userinput></screen> This
|
||||
is used to fix a problem with building fileutils statically on glibc 2.2.3
|
||||
systems. If this isn't done, then there is the possibility of all of the
|
||||
fileutils programs causing segmentation faults once chroot is entered
|
||||
in chapter 6.</para>
|
||||
|
||||
<para><userinput>--libexecdir=$LFS/bin:</userinput> This configure option will
|
||||
set the program executable directory to $LFS/bin. This is normally set
|
||||
|
@ -7,9 +7,9 @@ segmentation faults once we enter chroot in Chapter 6. The sed commands for
|
||||
those using glibc-2.2.3 are:
|
||||
|
||||
<screen><userinput>sed 's/\(.*\)\(fopen-safer\.c \)\\/\1\2atexit.c \\/' \</userinput>
|
||||
<userinput> lib/Makefile.in > tmp &&</userinput>
|
||||
<userinput> lib/Makefile.in > tmp &&</userinput>
|
||||
<userinput>sed 's/\(.*\)\(idcache\$U\.\$.*\)\\/\1\2atexit$U.$(OBJEXT) \\/' \</userinput>
|
||||
<userinput> tmp > lib/Makefile.in</userinput></screen></para>
|
||||
<userinput> tmp > lib/Makefile.in</userinput></screen></para>
|
||||
|
||||
<para>Install fileutils by running the following commands:
|
||||
<screen><userinput>./configure --disable-nls \</userinput>
|
||||
@ -17,7 +17,7 @@ those using glibc-2.2.3 are:
|
||||
<userinput>make LDFLAGS=-static &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd $LFS/usr/bin &&</userinput>
|
||||
<userinput>ln -s ../../bin/install</userinput></screen></para>
|
||||
<userinput>ln -sf ../../bin/install</userinput></screen></para>
|
||||
|
||||
<para>Once you have installed fileutils, you can test whether the
|
||||
segmentation fault problem has been avoided by running
|
||||
|
@ -16,11 +16,11 @@ and C++ compilers and not the other available compilers as they are, on
|
||||
the average, not often used. If those other compilers are needed,
|
||||
the --enable-languages parameter can be omitted.</para>
|
||||
|
||||
<para><userinput>ln -s ../usr/bin/cpp:</userinput> This
|
||||
<para><userinput>ln -sf ../usr/bin/cpp:</userinput> This
|
||||
creates the $LFS/lib/cpp symlink. Some packages explicitly try to find
|
||||
cpp in /lib.</para>
|
||||
|
||||
<para><userinput>ln -s ../bin/cpp:</userinput> This
|
||||
<para><userinput>ln -sf ../bin/cpp:</userinput> This
|
||||
creates the $LFS/usr/lib/cpp symlink as there are packages that expect
|
||||
cpp to be in /usr/lib.</para>
|
||||
|
||||
|
@ -12,11 +12,11 @@
|
||||
<userinput>make -e LDFLAGS=-static bootstrap &&</userinput>
|
||||
<userinput>make prefix=$LFS/usr install &&</userinput>
|
||||
<userinput>cd $LFS/lib &&</userinput>
|
||||
<userinput>ln -s ../usr/bin/cpp &&</userinput>
|
||||
<userinput>ln -sf ../usr/bin/cpp &&</userinput>
|
||||
<userinput>cd $LFS/usr/lib &&</userinput>
|
||||
<userinput>ln -s ../bin/cpp &&</userinput>
|
||||
<userinput>ln -sf ../bin/cpp &&</userinput>
|
||||
<userinput>cd $LFS/usr/bin &&</userinput>
|
||||
<userinput>ln -s gcc cc</userinput></screen></para>
|
||||
<userinput>ln -sf gcc cc</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -8,8 +8,8 @@ unpacked.</para>
|
||||
<userinput>./configure --prefix=$LFS/usr &&</userinput>
|
||||
<userinput>make LDFLAGS=-static &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cp $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &&</userinput>
|
||||
<userinput>rm $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para>
|
||||
<userinput>cp -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip $LFS/bin &&</userinput>
|
||||
<userinput>rm -f $LFS/usr/bin/gunzip $LFS/usr/bin/gzip</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -20,13 +20,13 @@ checks, but what we do care about is that make dep creates those
|
||||
aforementioned files in $LFS/usr/src/linux/include/linux we will be
|
||||
needing later on.</para>
|
||||
|
||||
<para><userinput>cp -a ../src/linux/include/linux .</userinput> and
|
||||
<userinput>mkdir asm && cp -a ../src/linux/include/asm/* .</userinput>:
|
||||
<para><userinput>cp -af ../src/linux/include/linux .</userinput> and
|
||||
<userinput>mkdir asm && cp -af ../src/linux/include/asm/* .</userinput>:
|
||||
These commands copy the kernel headers in the
|
||||
<filename>$LFS/usr/include</filename> directory.</para>
|
||||
|
||||
<para><userinput>chown root.root $LFS/usr/include/linux -R </userinput> and
|
||||
<userinput>chown root.root $LFS/usr/include/asm -R </userinput>:
|
||||
<para><userinput>chown -R root.root $LFS/usr/include/linux</userinput> and
|
||||
<userinput>chown -R root.root $LFS/usr/include/asm</userinput>:
|
||||
These commands change the ownership of the
|
||||
<filename>$LFS/usr/include/linux</filename> and the
|
||||
<filename>$LFS/usr/include/asm</filename> directories, plus all the
|
||||
|
@ -14,10 +14,10 @@ command:</para>
|
||||
<userinput>yes "" | make config &&</userinput>
|
||||
<userinput>make dep &&</userinput>
|
||||
<userinput>cd $LFS/usr/include &&</userinput>
|
||||
<userinput>cp -a ../src/linux/include/linux . &&</userinput>
|
||||
<userinput>cp -af ../src/linux/include/linux . &&</userinput>
|
||||
<userinput>chown -R root.root $LFS/usr/include/linux &&</userinput>
|
||||
<userinput>mkdir asm &&</userinput>
|
||||
<userinput>cp -a ../src/linux/include/asm/* asm &&</userinput>
|
||||
<userinput>cp -af ../src/linux/include/asm/* asm &&</userinput>
|
||||
<userinput>chown -R root.root $LFS/usr/include/asm</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
@ -13,7 +13,7 @@ normal Linux system uses by simply executing the library, like this:</para>
|
||||
interesting information. If you have Glibc-2.0.x installed on your starting
|
||||
distribution, copy the NSS library files by running:</para>
|
||||
|
||||
<para><screen><userinput>cp -av /lib/libnss* $LFS/lib</userinput></screen></para>
|
||||
<para><screen><userinput>cp -afv /lib/libnss* $LFS/lib</userinput></screen></para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -9,8 +9,8 @@ to be unpacked.</para>
|
||||
<userinput>make LDFLAGS=-static &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd $LFS/usr/bin &&</userinput>
|
||||
<userinput>mv date echo false pwd stty $LFS/bin &&</userinput>
|
||||
<userinput>mv su true uname hostname $LFS/bin</userinput></screen></para>
|
||||
<userinput>mv -f date echo false pwd stty $LFS/bin &&</userinput>
|
||||
<userinput>mv -f su true uname hostname $LFS/bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<para><screen><userinput>./configure --prefix=$LFS/usr --disable-nls &&</userinput>
|
||||
<userinput>make LDFLAGS=-static &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>mv $LFS/usr/bin/cat $LFS/bin</userinput></screen></para>
|
||||
<userinput>mv -f $LFS/usr/bin/cat $LFS/bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>logout</userinput>
|
||||
<userinput>mv $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin &&</userinput>
|
||||
<userinput>mv -f $LFS/usr/bin/bash $LFS/usr/bin/bashbug $LFS/bin &&</userinput>
|
||||
&c6-chrootcmd;</screen></para>
|
||||
|
||||
<para>The static bash is replaced with the dynamic bash after we exit
|
||||
|
@ -5,19 +5,19 @@
|
||||
|
||||
<para><screen><userinput>make -f Makefile-libbz2_so &&</userinput>
|
||||
<userinput>make bzip2recover libbz2.a &&</userinput>
|
||||
<userinput>cp bzip2-shared /bin/bzip2 &&</userinput>
|
||||
<userinput>cp bzip2recover /bin &&</userinput>
|
||||
<userinput>cp bzip2.1 /usr/share/man/man1 &&</userinput>
|
||||
<userinput>cp bzlib.h /usr/include &&</userinput>
|
||||
<userinput>cp -a libbz2.so* libbz2.a /lib &&</userinput>
|
||||
<userinput>rm /usr/lib/libbz2.a &&</userinput>
|
||||
<userinput>cp -f bzip2-shared /bin/bzip2 &&</userinput>
|
||||
<userinput>cp -f bzip2recover /bin &&</userinput>
|
||||
<userinput>cp -f bzip2.1 /usr/share/man/man1 &&</userinput>
|
||||
<userinput>cp -f bzlib.h /usr/include &&</userinput>
|
||||
<userinput>cp -af libbz2.so* libbz2.a /lib &&</userinput>
|
||||
<userinput>rm -f /usr/lib/libbz2.a &&</userinput>
|
||||
<userinput>cd /bin &&</userinput>
|
||||
<userinput>ln -sf bzip2 bunzip2 &&</userinput>
|
||||
<userinput>ln -sf bzip2 bzcat &&</userinput>
|
||||
<userinput>cd /usr/share/man/man1 &&</userinput>
|
||||
<userinput>ln -s bzip2.1 bunzip2.1 &&</userinput>
|
||||
<userinput>ln -s bzip2.1 bzcat.1 &&</userinput>
|
||||
<userinput>ln -s bzip2.1 bzip2recover.1</userinput></screen></para>
|
||||
<userinput>ln -sf bzip2.1 bunzip2.1 &&</userinput>
|
||||
<userinput>ln -sf bzip2.1 bzcat.1 &&</userinput>
|
||||
<userinput>ln -sf bzip2.1 bzip2recover.1</userinput></screen></para>
|
||||
|
||||
<para>Although it's not strictly a part of a basic LFS system it's worth
|
||||
mentioning that a patch for Tar can be downloaded which enables the tar
|
||||
|
@ -11,7 +11,7 @@ to be like that. We did not forget to supply a value there.</para>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>make install-libs &&</userinput>
|
||||
<userinput>mv /usr/sbin/mklost+found /sbin</userinput></screen></para>
|
||||
<userinput>mv -f /usr/sbin/mklost+found /sbin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
<userinput>./configure --prefix=/usr &&</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>mv /usr/bin/ed /usr/bin/red /bin</userinput></screen></para>
|
||||
<userinput>mv -f /usr/bin/ed /usr/bin/red /bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>ln -s flex lex</userinput></screen></para>
|
||||
<userinput>ln -sf flex lex</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -21,7 +21,7 @@ file <filename>tmp~</filename>. This is done because Glibc can't
|
||||
autodetect perl since it's not installed yet at the time when we install
|
||||
Glibc.</para>
|
||||
|
||||
<para><userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile:</userinput> The file
|
||||
<para><userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile:</userinput> The file
|
||||
<filename>tmp~</filename> is now moved back to
|
||||
<filename>../glibc-&glibc-version;/malloc/Makefile</filename>. We do this because
|
||||
when using sed, we can't write straight back to this file so we need to
|
||||
@ -35,7 +35,7 @@ because as we don't have glibc on the LFS system yet, usernames can't
|
||||
be resolved to their user id's. Therefore, we replace the username
|
||||
root with the id 0. </para>
|
||||
|
||||
<para><userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the
|
||||
<para><userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile:</userinput> Asabove, we are using a temporary file (<filename>tmp~</filename>) to store the
|
||||
edited Makefile and then copying it back over the original.</para>
|
||||
|
||||
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
|
||||
@ -52,7 +52,7 @@ test program to determine this, so it automatically defaults to a
|
||||
cross-compiler. The reason for the failed program is because Glibc
|
||||
hasn't been installed yet.</para>
|
||||
|
||||
<para><userinput>mv config.make~ config.make:</userinput> Again, we are moving
|
||||
<para><userinput>mv -f config.make~ config.make:</userinput> Again, we are moving
|
||||
the temporary file over the original.</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -14,15 +14,15 @@ would do.</para>
|
||||
<userinput>cd ../glibc-build &&</userinput>
|
||||
<userinput>sed 's|$(PERL)|/usr/bin/perl|' \</userinput>
|
||||
<userinput> ../glibc-&glibc-version;/malloc/Makefile > tmp~ &&</userinput>
|
||||
<userinput>mv tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput>
|
||||
<userinput>mv -f tmp~ ../glibc-&glibc-version;/malloc/Makefile &&</userinput>
|
||||
<userinput>sed 's/root/0/' ../glibc-&glibc-version;/login/Makefile > tmp~ &&</userinput>
|
||||
<userinput>mv tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput>
|
||||
<userinput>mv -f tmp~ ../glibc-&glibc-version;/login/Makefile &&</userinput>
|
||||
<userinput>../glibc-&glibc-version;/configure \</userinput>
|
||||
<userinput> --prefix=/usr --enable-add-ons \</userinput>
|
||||
<userinput> --libexecdir=/usr/bin &&</userinput>
|
||||
<userinput>sed 's/cross-compiling = yes/cross-compiling = no/' \</userinput>
|
||||
<userinput> config.make > config.make~ &&</userinput>
|
||||
<userinput>mv config.make~ config.make &&</userinput>
|
||||
<userinput>mv -f config.make~ config.make &&</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>make localedata/install-locales &&</userinput>
|
||||
|
@ -7,13 +7,13 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>mv gzip /bin &&</userinput>
|
||||
<userinput>rm gunzip zcat &&</userinput>
|
||||
<userinput>mv -f gzip /bin &&</userinput>
|
||||
<userinput>rm -f gunzip zcat &&</userinput>
|
||||
<userinput>cd /bin &&</userinput>
|
||||
<userinput>ln -sf gzip gunzip &&</userinput>
|
||||
<userinput>ln -s gzip zcat &&</userinput>
|
||||
<userinput>ln -s gzip compress &&</userinput>
|
||||
<userinput>ln -s gunzip uncompress</userinput></screen></para>
|
||||
<userinput>ln -sf gzip zcat &&</userinput>
|
||||
<userinput>ln -sf gzip compress &&</userinput>
|
||||
<userinput>ln -sf gunzip uncompress</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
data files (fonts, keymaps, and such) in the /usr/share/kbd directory, as
|
||||
the FHS suggests.</para>
|
||||
|
||||
<para><userinput>rm
|
||||
<para><userinput>rm -f
|
||||
/usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz:</userinput> We
|
||||
remove this file because we don't know which keymap you
|
||||
need to use. We will be defining the default keymap in
|
||||
|
@ -6,7 +6,7 @@
|
||||
<para><screen><userinput>./configure --datadir=/usr/share/kbd &&</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>rm /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz</userinput></screen></para>
|
||||
<userinput>rm -f /usr/share/kbd/keymaps/i386/qwerty/defkeymap.map.gz</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para><screen><userinput>for i in configure src/Makefile.in src/makewhatis.sh</userinput>
|
||||
<userinput>do sed s/gawk/awk/g $i > $i.fixed</userinput>
|
||||
<userinput>mv $i.fixed $i</userinput>
|
||||
<userinput>mv -f $i.fixed $i</userinput>
|
||||
<userinput>done</userinput>
|
||||
<userinput>chmod 700 configure &&</userinput>
|
||||
<userinput>./configure -default &&</userinput>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<userinput>make BINDIR=/usr/bin \</userinput>
|
||||
<userinput> MANDIR=/usr/share/man/man1 install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>ln -s mawk awk</userinput></screen></para>
|
||||
<userinput>ln -sf mawk awk</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -10,6 +10,6 @@
|
||||
<userinput>cd /lib &&</userinput>
|
||||
<userinput>mv libncurses.a libncurses_g.a libncurses++.a /usr/lib &&</userinput>
|
||||
<userinput>cd /usr/lib &&</userinput>
|
||||
<userinput>ln -s libncurses.a libcurses.a</userinput></screen></para>
|
||||
<userinput>ln -sf libncurses.a libcurses.a</userinput></screen></para>
|
||||
</sect2>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd etc.sample &&</userinput>
|
||||
<userinput>cp services protocols /etc</userinput></screen></para>
|
||||
<userinput>cp -f services protocols /etc</userinput></screen></para>
|
||||
|
||||
<para>There are other files in the <filename
|
||||
class="directory">etc.sample</filename> directory which might be of
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<para><screen><userinput>make &&</userinput>
|
||||
<userinput>make XSCPT='' install &&</userinput>
|
||||
<userinput>mv /usr/bin/kill /bin</userinput></screen></para>
|
||||
<userinput>mv -f /usr/bin/kill /bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
to the LFS system (because the normal system runs glibc-2.0) it's time to remove
|
||||
them now by running:</para>
|
||||
|
||||
<para><screen><userinput>rm /lib/libnss*.so.1 /lib/libnss*2.0*</userinput></screen></para>
|
||||
<para><screen><userinput>rm -f /lib/libnss*.so.1 /lib/libnss*2.0*</userinput></screen></para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
compilation bug which occurs due to a variable (nflg), being used but not
|
||||
defined.</para>
|
||||
|
||||
<para><userinput>cp limits login.access and others:</userinput> These files
|
||||
<para><userinput>cp -f limits login.access and others:</userinput> These files
|
||||
were not installed during the installation of the package so we copy
|
||||
them manually as those files are used to configure authentication
|
||||
details on the system.</para>
|
||||
|
@ -6,13 +6,13 @@ following commands:</para>
|
||||
|
||||
|
||||
<para><screen><userinput>sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \</userinput>
|
||||
<userinput> src/useradd.c > useradd.c.temp &&</userinput>
|
||||
<userinput>mv useradd.c.temp src/useradd.c &&</userinput>
|
||||
<userinput> src/useradd.c > useradd.c.temp &&</userinput>
|
||||
<userinput>mv -f useradd.c.temp src/useradd.c &&</userinput>
|
||||
<userinput>./configure --prefix=/usr &&</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd etc &&</userinput>
|
||||
<userinput>cp limits login.access /etc &&</userinput>
|
||||
<userinput>cp -f limits login.access /etc &&</userinput>
|
||||
<userinput>sed "s|/var/spool/mail|/var/mail|" login.defs.linux > /etc/login.defs</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
@ -7,8 +7,8 @@
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>mv date echo false pwd stty /bin &&</userinput>
|
||||
<userinput>mv su true uname hostname /bin</userinput></screen></para>
|
||||
<userinput>mv -f date echo false pwd stty /bin &&</userinput>
|
||||
<userinput>mv -f su true uname hostname /bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
@ -22,7 +22,7 @@ are built into the bash interpreter, but the FHS dictates that there should be a
|
||||
<filename>[</filename> binary. We create that in this way, while still in the
|
||||
<filename>/usr/bin</filename> directory:</para>
|
||||
|
||||
<para><screen><userinput>ln -s test [</userinput></screen></para>
|
||||
<para><screen><userinput>ln -sf test [</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -15,7 +15,7 @@ processes started by init the TERM signal".</para>
|
||||
<para><screen><userinput>sed \</userinput>
|
||||
<userinput> 's/\(.*\)\(Sending processes\)\(.*\)/\1\2 started by init\3/' \</userinput>
|
||||
<userinput> src/init.c > init.c.temp &&</userinput>
|
||||
<userinput>mv init.c.temp src/init.c &&</userinput>
|
||||
<userinput>mv -f init.c.temp src/init.c &&</userinput>
|
||||
<userinput>make -C src &&</userinput>
|
||||
<userinput>make -C src install</userinput></screen></para>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<para><screen><userinput>./configure --prefix=/usr &&</userinput>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>mv /usr/bin/cat /bin</userinput></screen></para>
|
||||
<userinput>mv -f /usr/bin/cat /bin</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -7,7 +7,7 @@ util-linux package, FHS-compliant, run the following.</para>
|
||||
|
||||
<para><screen><userinput>sed 's|etc/adjtime|var/lib/hwclock/adjtime|' \</userinput>
|
||||
<userinput> hwclock/hwclock.c > hwclock~ &&</userinput>
|
||||
<userinput>mv hwclock~ hwclock/hwclock.c &&</userinput>
|
||||
<userinput>mv -f hwclock~ hwclock/hwclock.c &&</userinput>
|
||||
<userinput>mkdir /var/lib/hwclock</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
@ -18,7 +18,7 @@ in which order it is done. Install Vim by running the following commands:</para>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>ln -s vim vi</userinput></screen></para>
|
||||
<userinput>ln -sf vim vi</userinput></screen></para>
|
||||
|
||||
<para>If you plan on installing the X Window system on your LFS
|
||||
system, you might want to re-compile Vim after you have installed X. Vim
|
||||
@ -42,7 +42,7 @@ instead of the one presented above:</para>
|
||||
<userinput>make &&</userinput>
|
||||
<userinput>make install &&</userinput>
|
||||
<userinput>cd /usr/bin &&</userinput>
|
||||
<userinput>ln -s vim vi &&</userinput>
|
||||
<userinput>ln -sf vim vi &&</userinput>
|
||||
<userinput>mkdir /var/lib/vim</userinput></screen></para>
|
||||
|
||||
</sect2>
|
||||
|
@ -18,38 +18,38 @@ K002otherdaemon.</para>
|
||||
<userinput>chmod 754 sendsignals setclock sysklogd template &&</userinput>
|
||||
<userinput>chmod 754 localnet ethnet &&</userinput>
|
||||
<userinput>cd ../rc0.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/sendsignals S800sendsignals &&</userinput>
|
||||
<userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput>
|
||||
<userinput>ln -s ../init.d/halt S999halt &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sendsignals S800sendsignals &&</userinput>
|
||||
<userinput>ln -sf ../init.d/mountfs S900mountfs &&</userinput>
|
||||
<userinput>ln -sf ../init.d/halt S999halt &&</userinput>
|
||||
<userinput>cd ../rc6.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/sendsignals S800sendsignals &&</userinput>
|
||||
<userinput>ln -s ../init.d/mountfs S900mountfs &&</userinput>
|
||||
<userinput>ln -s ../init.d/reboot S999reboot &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sendsignals S800sendsignals &&</userinput>
|
||||
<userinput>ln -sf ../init.d/mountfs S900mountfs &&</userinput>
|
||||
<userinput>ln -sf ../init.d/reboot S999reboot &&</userinput>
|
||||
<userinput>cd ../rcS.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/localnet S100localnet &&</userinput>
|
||||
<userinput>ln -s ../init.d/checkfs S200checkfs &&</userinput>
|
||||
<userinput>ln -s ../init.d/mountfs S300mountfs &&</userinput>
|
||||
<userinput>ln -s ../init.d/setclock S400setclock &&</userinput>
|
||||
<userinput>ln -s ../init.d/loadkeys S500loadkeys &&</userinput>
|
||||
<userinput>ln -sf ../init.d/localnet S100localnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/checkfs S200checkfs &&</userinput>
|
||||
<userinput>ln -sf ../init.d/mountfs S300mountfs &&</userinput>
|
||||
<userinput>ln -sf ../init.d/setclock S400setclock &&</userinput>
|
||||
<userinput>ln -sf ../init.d/loadkeys S500loadkeys &&</userinput>
|
||||
<userinput>cd ../rc1.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd K900sysklogd &&</userinput>
|
||||
<userinput>cd ../rc2.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet K800ethnet &&</userinput>
|
||||
<userinput>cd ../rc3.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet S200ethnet &&</userinput>
|
||||
<userinput>cd ../rc4.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet S200ethnet &&</userinput>
|
||||
<userinput>ln -sf ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet S200ethnet &&</userinput>
|
||||
<userinput>cd ../rc5.d &&</userinput>
|
||||
<userinput>ln -s ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -s ../init.d/ethnet S200ethnet</userinput></screen></para>
|
||||
<userinput>ln -sf ../init.d/sysklogd S100sysklogd &&</userinput>
|
||||
<userinput>ln -sf ../init.d/ethnet S200ethnet</userinput></screen></para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -17,8 +17,8 @@ following commands are run to build the kernel:</para>
|
||||
<userinput>make bzImage &&</userinput>
|
||||
<userinput>make modules &&</userinput>
|
||||
<userinput>make modules_install &&</userinput>
|
||||
<userinput>cp arch/i386/boot/bzImage /boot/lfskernel &&</userinput>
|
||||
<userinput>cp System.map /boot</userinput></screen></para>
|
||||
<userinput>cp -f arch/i386/boot/bzImage /boot/lfskernel &&</userinput>
|
||||
<userinput>cp -f System.map /boot</userinput></screen></para>
|
||||
|
||||
<para>Note: the arch/i386/boot/bzImage path may vary on
|
||||
different platforms.</para>
|
||||
|
@ -14,7 +14,7 @@ the host system or the LFS system).</para>
|
||||
system:</para>
|
||||
|
||||
<para><screen><userinput>logout</userinput>
|
||||
<userinput>cp $LFS/boot/lfskernel /boot</userinput></screen></para>
|
||||
<userinput>cp -f $LFS/boot/lfskernel /boot</userinput></screen></para>
|
||||
|
||||
<para>The next step is adding an entry to /etc/lilo.conf so that we can
|
||||
choose LFS when booting the computer:</para>
|
||||
@ -36,8 +36,8 @@ partition's designation.</para>
|
||||
<para>The last step is syncing the host system lilo config. files with the
|
||||
LFS system:</para>
|
||||
|
||||
<para><screen><userinput>cp /etc/lilo.conf $LFS/etc &&</userinput>
|
||||
<userinput>cp <kernel images> $LFS/boot</userinput></screen></para>
|
||||
<para><screen><userinput>cp -f /etc/lilo.conf $LFS/etc &&</userinput>
|
||||
<userinput>cp -f <kernel images> $LFS/boot</userinput></screen></para>
|
||||
|
||||
<para>To find out which kernel images files are being used, look at the
|
||||
/etc/lilo.conf file and find the lines starting with
|
||||
|
Loading…
Reference in New Issue
Block a user