source: introduction/important/starting.xml@ 4de7ca7

basic
Last change on this file since 4de7ca7 was 4de7ca7, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Numerous typos and text corrections

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/basic@20528 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 7.0 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="starting">
9 <?dbhtml filename="starting.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Getting Started After LFS</title>
17
18 <sect2>
19 <title>Deciding what to do next</title>
20
21 <para>
22 Now that LFS is complete and you have a bootable system, what do you do?
23 The next step is to decide how to use it. Generally, there are two broad
24 categories to consider: workstation or server. Indeed, these categories
25 are not mutually exclusive. The applications needed for each category
26 can be combined onto a single system, but let's look at them separately
27 for now.
28 </para>
29
30 <para>
31 A server is the simpler category. Generally this consists of a web
32 server such as the
33 <ulink url="&blfs-book;server/apache.html">Apache HTTP Server</ulink>
34 and a database server such as
35 <ulink url="&blfs-book;server/mariadb.html">MariaDB</ulink>.
36 However other services are possible. The operating system
37 embedded in a single use device falls into this category.
38 </para>
39
40 <para>
41 On the other hand, a workstation is much more complex. It generally
42 requires a graphical user environment such as
43 <ulink url="&blfs-book;lxde/lxde.html">LXDE</ulink>,
44 <ulink url="&blfs-book;xfce/xfce.html">XFCE</ulink>,
45 <ulink url="&blfs-book;kde/kde.html">KDE</ulink>, or
46 <ulink url="&blfs-book;gnome/gnome.html">Gnome</ulink>
47 (systemd versions of LFS only) based on the
48 <ulink url="&blfs-book;x/installing.html">X Window graphical environment</ulink>
49 and several graphical based applications such as the
50 <ulink url="&blfs-book;xsoft/firefox.html">Firefox web browser</ulink>,
51 <ulink url="&blfs-book;xsoft/thunderbird.html">Thunderbird email client</ulink>,
52 or
53 <ulink url="&blfs-book;xsoft/libreoffice.html">LibreOffice office suite</ulink>.
54 These applications require many (several hundred depending on
55 desired capabilities) more packages of support applications and
56 libraries.
57 </para>
58
59 <para>
60 In addition to the above, there is a set of applications that are
61 suitable for all systems for system management. These applications are
62 all in the full BLFS book but are repeated here for convenience. Not
63 all packages are needed in all environments. For example
64 <xref linkend='dhcpcd'/>
65 is not appropriate for a server and
66 <xref linkend='wireless_tools'/>
67 are normally only
68 useful for a laptop system. If you are not sure if a package presented
69 here is needed or not, it can either be installed now or later as the
70 need arises.
71 </para>
72
73 </sect2>
74
75 <sect2>
76 <title>Working in a partial BLFS environment</title>
77
78 <para>
79 When you initially boot into LFS, you have all the internal tools to build
80 additional packages. Unfortunately, the user environment is quite sparse.
81 There are a couple of ways to improve this:
82 </para>
83
84 <sect3>
85 <title>Work from the LFS host in chroot</title>
86
87 <para>
88 This method provides a complete graphical environment where a full
89 featured browser and copy/paste capabilites are available. This method
90 allows using applications like the host's version of wget to download
91 package sources to a location available when working in the chroot
92 envirnment.
93 </para>
94
95 <para>
96 In order to properly build packages in chroot, you will also need to
97 remember to mount the virtual file systems if they are not already
98 mounted. One way to do this is to create a script on the
99 <command>HOST</command> system:
100 </para>
101
102<screen><command>cat &gt; ~/mount-virt.sh &lt;&lt; "EOF"
103#!/bin/bash
104
105function mountbind
106{
107 if ! mountpoint $LFS/$1 >/dev/null; then
108 $SUDO mount --bind /$1 $LFS/$1
109 echo $LFS/$1 mounted
110 else
111 echo $LFS/$1 already mounted
112 fi
113}
114
115function mounttype
116{
117 if ! mountpoint $LFS/$1 >/dev/null; then
118 $SUDO mount -t $2 $3 $4 $5 $LFS/$1
119 echo $LFS/$1 mounted
120 else
121 echo $LFS/$1 already mounted
122 fi
123}
124
125if [ $EUID -ne 0 ]; then
126 SUDO=sudo
127else
128 SUDO=""
129fi
130
131if [ x$LFS == x ]; then
132 echo "LFS not set"
133 exit 1
134fi
135
136mountbind dev
137mounttype dev/pts devpts devpts -o gid=5,mode=620
138mounttype proc proc proc
139mounttype sys sysfs sysfs
140mounttype run tmpfs run
141mkdir $LFS/run/shm
142#mountbind usr/src
143#mountbind boot
144#mountbind home
145EOF</command></screen>
146
147 <para>
148 Note that the last three commands in the script are commented out. These
149 are useful if those directories are mounted as separate partitions on the
150 host system and will be mounted when booting the completed LFS/BLFS system.
151 </para>
152
153 <para>
154 The script can be run with <command>bash ~/mount-virt.sh</command> as
155 either a regular user (recommended) or as root. If run as a regular
156 user, sudo is required on the host system.
157 </para>
158
159 <para>
160 Another issue pointed out by the script is where to store downloaded
161 package files. This location is arbitrary. It can be in a regular
162 user's home directory such as ~/sources or in a global location like
163 /usr/src. Our recommendation is not to mix BLFS sources and LFS sources
164 in (from the chroot environment) /sources. In any case, the packages
165 must be accessible inside the chroot environment.
166 </para>
167
168 <para>
169 A last convenience feature presented here is to streamline the process
170 of entering the chroot environment. This can be done with an alias
171 placed in a user's ~/.bashrc file on the host system:
172 </para>
173
174<screen><command>alias lfs='sudo /usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root TERM="$TERM" PS1="\u:\w\\\\$ "
175PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login'</command></screen>
176
177 <para>
178 This alias is a little tricky because of the quoting and levels of
179 backslash characters. It must be all on a single line. The above command
180 has been split in two for presentation purposes.
181 </para>
182
183 </sect3>
184
185 <sect3>
186 <title>Work remotely via ssh</title>
187
188 <para>
189 This method also provides a full graphical environment, but first
190 requires installing
191 <xref linkend='sshd'/> and
192 <xref linkend='wget'/>
193 on the LFS system, usually in chroot. It also requires a second
194 computer. This method has the advantage of being simple by not requiring
195 the complexity of the chroot environment. It also uses your LFS built
196 kernel for all additional packages and still provides a complete system
197 for installing packages.
198 </para>
199
200 </sect3>
201
202
203
204 </sect2>
205
206
207</sect1>
Note: See TracBrowser for help on using the repository browser.