1 AUTHOR: Randy Blythe [rblythe] <rblythe714 at comcast dot net>
5 LICENSE: GNU Free Documentation License v 1.2
7 SYNOPSIS: Building BLFS from newly installed LFS system
12 This hint is designed to detail a way to build your BLFS
13 system from within your newly created LFS system. It is a help to
14 lessen and possibly eliminate typographical errors while building the
17 This hint was used by me to build BLFS-SVN from within LFS-SVN.
23 This hint requires that you have a working LFS or LFS-SVN build
24 completed and able to boot successfully.
26 You have already set up your (unpriviledged) user account
28 Working Internet connection (able to ping your ISP or favorite website
31 Required packages (these should be downloaded BEFORE you start building
32 your new BLFS system):
33 * unhtml-2.3.8.tar.gz - http://linux.maruhn.com/sec/unhtml.html
34 (also located in the debian repositories)
36 * BLFS{-SVN} bootscripts
38 * GPM (see BLFS{-SVN} for installation instructions)
39 (this is vital for your build to go smoothly)
41 For BLFS (standard build) -
42 * BLFS book (HTML Format, multiple pages)
43 (see download section at
44 http://www.linuxfromscratch.org/blfs/download.html)
47 * blfs-book-cvs-html-*.tar.bz2 (see download section at
48 http://www.linuxfromscratch.org/blfs/downloads/svn/)
52 During non-X Window phase of the build -
54 * Screen (see BLFS{-SVN} for installation instructions)
56 * Lynx or your favorite text web browser
57 (see BLFS{-SVN} for installation instructions)
59 * Vi(m) installed during LFS{-SVN}, not linked to the X window
64 * Boot into your newly installed LFS{-SVN} system
68 * edit the Makefile (optional) - The make file puts everything
69 (executable, man pages) in places that may not be consistent with your
70 system. Change it accordingly. I did not do this because I didn't
71 realize this until after it was installed, but the install portion of the
72 Makefile copies what is compiled to directories specified in the
73 Makefile and changing those destinations should not affect the
74 performance of the program.
76 * install unhtml (as root): make && make install
78 * install GPM-*, GPM bootscript, configure the mouse, and start the
79 daemon, according to the BLFS{-SVN} instructions
81 * create a directory (i.e. $HOME/blfsbook) and unpack the BLFS book
84 * create a directory (i.e. $HOME/blfsbook-text) to hold the text file
85 versions of each BLFS html page
87 * copy and edit the script (see below) accordingly. chmod +x script and
88 execute (this will make a text page for each BLFS html page)
90 Here's the beauty of this hint. From here to the end of your system
91 installation, you can simply use vi(m) to read each one of your newly
92 created .txt files for each package of the complete BLFS{-SVN} install
93 and use your mouse to copy/paste build instructiona accordingly. You
94 can also edit the instructions as necessary for your specific build
95 parameters (flags, optimizations, etc.) and check them before copy/paste
96 to lessen (if not eliminate) your typing errors.
98 * install Lynx or your favorite text based web browser according to the
99 BLFS{-SVN} instructions. This will be needed to access this hint
100 online as well other BLFS instructions or other pages of interest.
101 Also lynx can be used to save html pages in text format so you can use
102 the copy/paste method to install programs outside of BLFS{-SVN}.
104 * install other Suggested packages as needed.
106 * use Lynx or your favorite text based web browser to download other
107 programs and patches according to your needs.
109 * Enjoy your (possibly error free) build of BLFS{-SVN}!!!
112 copy this and edit according to your needs:
114 cat > $HOME/convert.sh << "EOF"
117 # Created by rblythe <Randy Blythe> <rblythe714 at comcast dot net>
119 # images and stylesheets directories ommitted because they
120 # do not have any HTML pages within them.
123 for DIR in "appendices" "basicnet" "connect" "general" "gnome" \
124 "introduction" "kde" "multimedia" "postlfs" \
125 "preface" "pst" "server" "x" "xsoft"
128 for i in $(ls *.html); do
129 export v=$(echo $i | sed 's/.html/.txt/')
130 # if you did not edit the Makefile then change this to
131 # /usr/local/bin/unhtml $i > $HOME/blfsbook-text/$v
132 /usr/bin/unhtml $i > $HOME/blfsbook-text/$v
141 And make it executable: chmod +x $HOME/convert.sh
144 How I used the information in this hint:
146 I created three (3) screens (see man screen for details)
147 screen 0 was for my build. screen 1 was for my txt files. Screen 2 was
148 for lynx (in case I needed to get to the internet). I would open a file in
149 screen 1 and copy/paste the supplied build instructions to the command
150 line in screen 0 and the system did the rest. I did this until X was built
151 and then I used multiple xterms instead of screen and repeated the process.
152 Screen 2 was used to download some of the optional dependencies as
155 It should be noted that some html files (and their txt equivalents) are not
156 named after the package, i.e. the file known as printing.html (which
157 will be converted to printing.txt if using the above script) is actually
160 unhtml can also be used from the command line for other html files that
161 you want to convert to txt by simply issuing:
162 unhtml nameoffile.html > anynameyouwant.txt
163 Also see man unhtml for more details.
165 The only drawback to this method is the large amounts of whitespace that
166 are created in the converted text file. I am not sure why that happens,
167 but you files will have whitespace.
172 Everyone on the LFS/BLFS mailing list(s) who encouraged me to do a
173 little research and try to find the answers myself before performing
174 "fishing expeditions" on the list(s). :)
176 Kevin Swan <013639s at dragon dot acadiau at ca> for creating unhtml