/[gentoo]/xml/htdocs/doc/en/altinstall.xml
Gentoo

Diff of /xml/htdocs/doc/en/altinstall.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.31 Revision 1.32
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.31 2004/06/24 13:43:12 dertobi123 Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.32 2004/06/30 23:04:41 neysx Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 4
6<guide link="/doc/en/altinstall.xml"> 5<guide link="/doc/en/altinstall.xml">
6
7<title>The Gentoo Linux alternative installation method HOWTO</title> 7<title>The Gentoo Linux alternative installation method HOWTO</title>
8
9<author title="Contributor">
8<author title="Contributor"><mail link="gerrynjr@gentoo.org">Gerald Normandin Jr.</mail></author> 10 <mail link="gerrynjr@gentoo.org">Gerald Normandin Jr.</mail>
11</author>
12<author title="Contributor">
9<author title="Contributor"><mail link="lordviram@rebelpacket.net">Travis Tilley</mail></author> 13 <mail link="lordviram@rebelpacket.net">Travis Tilley</mail>
10<author title="Contributor"><mail link="volontir@yahoo.com">Oleg Raisky</mail></author> 14</author>
11<author title="Contributor"><mail link="luminousit@hotmail.com">Alex Garbutt</mail></author> 15<author title="Contributor">
12<author title="Contributor"><mail link="alex@openvs.com">Alexandre Georges</mail></author> 16 <mail link="volontir@yahoo.com">Oleg Raisky</mail>
13<author title="Contributor"><mail link="vargen@b0d.org">Magnus Backanda</mail></author> 17</author>
14<author title="Contributor"><mail link="davoid@gentoo.org">Faust A. Tanasescu</mail></author> 18<author title="Contributor">
15<author title="Contributor"><mail link="aliz@gentoo.org">Daniel Ahlberg</mail></author> 19 <mail link="luminousit@hotmail.com">Alex Garbutt</mail>
20</author>
21<author title="Contributor">
22 <mail link="alex@openvs.com">Alexandre Georges</mail>
23</author>
24<author title="Contributor">
25 <mail link="vargen@b0d.org">Magnus Backanda</mail>
26</author>
27<author title="Contributor">
28 <mail link="davoid@gentoo.org">Faust A. Tanasescu</mail>
29</author>
30<author title="Contributor">
31 <mail link="aliz@gentoo.org">Daniel Ahlberg</mail>
32</author>
33<author title="Editor">
16<author title="Editor"><mail link="swift@gentoo.org">Sven Vermeulen</mail></author> 34 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
17<author title="Reviewer"><mail link="antifa@gentoo.org">Ken Nowack</mail></author> 35</author>
18<author title="Editor"><mail link="blubber@gentoo.org">Tiemo Kieft</mail></author> 36<author title="Reviewer">
37 <mail link="antifa@gentoo.org">Ken Nowack</mail>
38</author>
39<author title="Editor">
40 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
41</author>
42
19<abstract> 43<abstract>
20This HOWTO is meant to be a repository of alternative Gentoo installation 44This HOWTO is meant to be a repository of alternative Gentoo installation
21methods, for those with special installation needs such as lack of a cdrom 45methods, for those with special installation needs such as lack of a cdrom
22or a computer that can't boot cds. 46or a computer that can't boot cds.
23</abstract> 47</abstract>
30<chapter> 54<chapter>
31<title>About this document</title> 55<title>About this document</title>
32<section> 56<section>
33<body> 57<body>
34 58
59<p>
35<p>If the standard boot-from-CD install method doesn't work for you 60If the standard boot-from-CD install method doesn't work for you (or you just
36(or you just don't like it), 61don't like it), help is now here. This document serves to provide a repository
37help is now here. This document serves to 62of alternative Gentoo Linux installation techniques to those who need them.
38provide a repository of alternative Gentoo Linux installation techniques 63Or, if you prefer, it serves as a place to put your wacky installation methods.
39to those who need them.
40Or, if you prefer, it serves as
41a place to put your wacky installation methods. If you have an
42installation method that you yourself find useful, or you have devised an 64If you have an installation method that you yourself find useful, or you have
43amusing way of installing Gentoo, please don't hesitate to write something 65devised an amusing way of installing Gentoo, please don't hesitate to write
44up and <mail link="antifa@gentoo.org">send it to me.</mail></p> 66something up and <mail link="antifa@gentoo.org">send it to me.</mail>
45 67</p>
46 68
47</body> 69</body>
48</section> 70</section>
49</chapter> 71</chapter>
50 72
51<chapter> 73<chapter>
52<title>Booting the LiveCD with Smart BootManager</title> 74<title>Booting the LiveCD with Smart BootManager</title>
53<section> 75<section>
54
55<body> 76<body>
56<p>Download Smart BootManager <uri link="http://btmgr.sourceforge.net/index.php3?body=download.html">http://btmgr.sourceforge.net/index.php3?body=download.html</uri>. Linux source or binary format and windows .exe versions are available as well as many language packs. However, at this time, the preferred method would be to use the binary format, as the source will not compile with newer versions of NASM.</p>
57 77
58<p>Either compile the package from source or just grab the binary. There are several options that can be utilized while creating your boot floppy, as seen below.</p> 78<p>
79Download Smart BootManager <uri
80link="http://btmgr.sourceforge.net/index.php3?body=download.html">http://btmgr.sourceforge.net/index.php3?body=download.html</uri>.
81Linux source or binary format and windows .exe versions are available as well
82as many language packs. However, at this time, the preferred method would be to
83use the binary format, as the source will not compile with newer versions of
84NASM.
85</p>
86
87<p>
88Either compile the package from source or just grab the binary. There are
89several options that can be utilized while creating your boot floppy, as seen
90below.
91</p>
59 92
60<pre caption="Smart BootManager Options"> 93<pre caption="Smart BootManager Options">
61<i>sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file] 94<i>sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file]
62 95
63 -t theme select the theme to be used, in which the theme could be: 96 -t theme select the theme to be used, in which the theme could be:
88</pre> 121</pre>
89 122
90<pre caption="Using sbminst to build the boot floppy"> 123<pre caption="Using sbminst to build the boot floppy">
91# <i>sbminst -t us -d /dev/fd0</i> 124# <i>sbminst -t us -d /dev/fd0</i>
92</pre> 125</pre>
126
127<note>
93<note> Replace fd0 with your respective floppy device name if yours is different. </note> 128Replace fd0 with your respective floppy device name if yours is different.
94<p>Now simply place the floppy in the floppy drive of the computer you'd like to boot the LiveCD on, as well as placing the LiveCD in the CD-ROM and boot the computer.</p> 129</note>
95 130
96<p>You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and press ENTER to boot the LiveCD. Once booted proceed with the standard installation instructions.</p> 131<p>
132Now simply place the floppy in the floppy drive of the computer you'd like to
133boot the LiveCD on, as well as placing the LiveCD in the CD-ROM and boot the
134computer.
135</p>
97 136
98<p>Further information on Smart BootManager may be found at <uri>http://btmgr.sourceforge.net/</uri></p> 137<p>
138You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and
139press ENTER to boot the LiveCD. Once booted proceed with the standard
140installation instructions.
141</p>
142
143<p>
144Further information on Smart BootManager may be found at
145<uri>http://btmgr.sourceforge.net/</uri>
146</p>
147
99</body> 148</body>
100</section> 149</section>
101</chapter> 150</chapter>
102
103 151
104<chapter> 152<chapter>
105<title>Knoppix Installation</title> 153<title>Knoppix Installation</title>
106<section> 154<section>
107
108<body> 155<body>
109<p>Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a way to have a fully functional linux system while you're compiling Gentoo. Tux Racer will help you pass the time while you wait for bootstrap.</p>
110 156
111 <p>Boot from the Knoppix CD. It generally does a really good job of hardware detection. Although, you may have to add some boot options. </p> 157<p>
158Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a
159way to have a fully functional linux system while you're compiling Gentoo. Tux
160Racer will help you pass the time while you wait for bootstrap.
161</p>
112 162
113<p>By default Knoppix boots into a KDE 3.0 desktop. The first thing I did was open a konsole and typed <c>sudo passwd root</c>. This lets you set the root password for Knoppix.</p> 163<p>
164Boot from the Knoppix CD. It generally does a really good job of hardware
165detection. Although, you may have to add some boot options.
166</p>
114 167
115<p> Next, I su to root and typed <c>usermod -d /root -m root</c>. This sets user roots home directory to /root (the Gentoo way) from /home/root (the Knoppix way). If you do not do this, then you will receive errors when emerging about "/home/root: not found" or something to that effect.</p> 168<p>
169By default Knoppix boots into a KDE 3.0 desktop. The first thing I did was open
170a konsole and typed <c>sudo passwd root</c>. This lets you set the root
171password for Knoppix.
172</p>
116 173
117<p>I then typed <c>exit</c> and then <c>su</c> back into root. This loads the change that was made with the usermod command. Now create the <path>/mnt/gentoo</path> mountpoint using <c>mkdir</c>:</p> 174<p>
175Next, I su to root and typed <c>usermod -d /root -m root</c>. This sets user
176roots home directory to /root (the Gentoo way) from /home/root (the Knoppix
177way). If you do not do this, then you will receive errors when emerging about
178"/home/root: not found" or something to that effect.
179</p>
180
181<p>
182I then typed <c>exit</c> and then <c>su</c> back into root. This loads the
183change that was made with the usermod command. Now create the
184<path>/mnt/gentoo</path> mountpoint using <c>mkdir</c>:
185</p>
118 186
119<pre caption="Creating the /mnt/gentoo mountpoint"> 187<pre caption="Creating the /mnt/gentoo mountpoint">
120# <i>mkdir /mnt/gentoo</i> 188# <i>mkdir /mnt/gentoo</i>
121</pre> 189</pre>
122 190
191<p>
123<p>At this point, you can pick up with the standard install documentation at 192At this point, you can pick up with the standard install documentation at <uri
124<uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>. However, when you're asked to mount the proc system, issue the following command instead: </p> 193link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>.
194However, when you're asked to mount the proc system, issue the following
195command instead:
196</p>
125 197
126<pre caption = "Bind-mounting the proc pseudo filesystem"> 198<pre caption="Bind-mounting the proc pseudo filesystem">
127# <i>mount -o bind /proc /mnt/gentoo/proc</i> 199# <i>mount -o bind /proc /mnt/gentoo/proc</i>
128</pre> 200</pre>
129 201
130</body> 202</body>
131</section> 203</section>
134<chapter> 206<chapter>
135<title>Installing from Stage 1 without network access</title> 207<title>Installing from Stage 1 without network access</title>
136<section> 208<section>
137<body> 209<body>
138 210
139 211<p>
140<p>Burn a LiveCD iso.</p> 212Burn a LiveCD iso.
213</p>
141 214
142<p>Get the latest portage snapshot from <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri> (or your favorite <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place this tarball on an existing partition on the computer your are installing to, or burn it to a CD.</p> 215<p>
216Get the latest portage snapshot from
217<uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri>
218(or your favorite <uri
219link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place
220this tarball on an existing partition on the computer your are installing to,
221or burn it to a CD.
222</p>
143 223
144<p>Follow all instructions of the Gentoo Installation Handbook up to <c>chroot /mnt/gentoo</c> in Chapter 6. If you only have one CD-ROM remember to use the <c>cdcache</c> option while booting so you can unmount the LiveCD and mount your portage snapshot CD.</p> 224<p>
225Follow all instructions of the Gentoo Installation Handbook up to <c>chroot
226/mnt/gentoo</c> in Chapter 6. If you only have one CD-ROM remember to use the
227<c>cdcache</c> option while booting so you can unmount the LiveCD and mount
228your portage snapshot CD.
229</p>
145 230
231<p>
146<p>Open a new console (Alt-F2), we will continue with the Install Doc up to running the bootstrap.sh script.</p> 232Open a new console (Alt-F2), we will continue with the Install Doc up to
233running the bootstrap.sh script.
234</p>
147 235
148<warn>Older realeases of the livecd required you to change the password using the <c>passwd</c> command, before logging in manually.</warn> 236<warn>
149 237Older realeases of the livecd required you to change the password using the
238<c>passwd</c> command, before logging in manually.
239</warn>
150 240
151<p>Go back to the first console (Alt-F1, without chroot) and mount a second CD on <path>/mnt/gentoo/mnt/cdrom2</path>. Copy the portage tarball from cdrom2 and unpack it to <path>/mnt/gentoo/usr/portage</path>.</p> 241<p>
242Go back to the first console (Alt-F1, without chroot) and mount a second CD on
243<path>/mnt/gentoo/mnt/cdrom2</path>. Copy the portage tarball from cdrom2 and
244unpack it to <path>/mnt/gentoo/usr/portage</path>.
245</p>
152 246
153<pre caption="Mount the snapshot cd"> 247<pre caption="Mount the snapshot cd">
154# <i>umount /mnt/cdrom</i> 248# <i>umount /mnt/cdrom</i>
155# <i>mkdir /mnt/gentoo/mnt/cdrom2</i> 249# <i>mkdir /mnt/gentoo/mnt/cdrom2</i>
156# <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i> 250# <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i>
157# <i>cp /mnt/gentoo/mnt/cdrom2/portage-$date.tar.bz2 /mnt/gentoo/usr/portage</i> 251# <i>cp /mnt/gentoo/mnt/cdrom2/portage-$date.tar.bz2 /mnt/gentoo/usr/portage</i>
158# <i>cd /mnt/gentoo/usr/portage</i> 252# <i>cd /mnt/gentoo/usr/portage</i>
159# <i>tar xvjpf portage-$date.tar.bz2</i> 253# <i>tar xvjpf portage-$date.tar.bz2</i>
160</pre> 254</pre>
161 255
162<p>Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail because it won't be able to download any files. We will fetch these files somewhere else and put them in /usr/portage/distfiles (on F2 console). </p> 256<p>
257Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail
258because it won't be able to download any files. We will fetch these files
259somewhere else and put them in /usr/portage/distfiles (on F2 console).
260</p>
163 261
164<p>You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib, binutils, gcc, ncurses plus their dependencies. </p> 262<p>
263You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib,
264binutils, gcc, ncurses plus their dependencies.
265</p>
165 266
267<note>
166<note>Note that you need the versions of each package synced with your portage tree.</note> 268Note that you need the versions of each package synced with your portage tree.
269</note>
167 270
168<pre caption="Getting the download listing"> 271<pre caption="Getting the download listing">
169<comment>(Don't forget the 2 in front of the &gt;)</comment> 272<comment>(Don't forget the 2 in front of the &gt;)</comment>
170# <i>emerge -fp glibc baselayout texinfo gettext zlib binutils gcc ncurses 2&gt; stage1.list</i> 273# <i>emerge -fp glibc baselayout texinfo gettext zlib binutils gcc ncurses 2&gt; stage1.list</i>
171# <i>mount -t vfat /dev/fd0 /mnt/floppy</i> 274# <i>mount -t vfat /dev/fd0 /mnt/floppy</i>
173# <i>umount /mnt/floppy</i> 276# <i>umount /mnt/floppy</i>
174</pre> 277</pre>
175 278
176<p> 279<p>
177Take the floppy to the computer that has fast access. If you take a look at the 280Take the floppy to the computer that has fast access. If you take a look at the
178<path>stage1.list</path> file, you'll see that it provides you with several URLs 281<path>stage1.list</path> file, you'll see that it provides you with several
179to download. Sadly, it lists several possible URLs for each package as well, 282URLs to download. Sadly, it lists several possible URLs for each package as
180which isn't what you want. Strip all but one of the URLs first: 283well, which isn't what you want. Strip all but one of the URLs first:
181</p> 284</p>
182 285
183<pre caption="Stripping URLs"> 286<pre caption="Stripping URLs">
184<comment>(This script is depending on the output format given by emerge which 287<comment>(This script is depending on the output format given by emerge which
185 might change in the future without further notice - use with caution!)</comment> 288 might change in the future without further notice - use with caution!)</comment>
192 295
193<pre caption="Use wget to grab your source packages"> 296<pre caption="Use wget to grab your source packages">
194# <i>wget -N -i stage1.list</i> 297# <i>wget -N -i stage1.list</i>
195</pre> 298</pre>
196 299
197 300<p>
198 <p>Once you have obtained all the files, take them to the computer and copy them to <path>/mnt/gentoo/usr/portage/distfiles</path>. You will then be able to run <c>bootstrap.sh</c>. Repeat this same wget fetch and place procedure for stage2 and 3.</p> 301Once you have obtained all the files, take them to the computer and copy them
199 302to <path>/mnt/gentoo/usr/portage/distfiles</path>. You will then be able to run
200 303<c>bootstrap.sh</c>. Repeat this same wget fetch and place procedure for stage2
304and 3.
305</p>
201 306
202</body> 307</body>
203</section> 308</section>
204</chapter> 309</chapter>
205 310
311<chapter>
206<chapter><title>Diskless install using PXE boot</title> 312<title>Diskless install using PXE boot</title>
207 313<section>
208<section><title>Requirements</title> 314<title>Requirements</title>
315<body>
316
317<p>
318You will need a network card on the diskless client that uses the PXE protocol
319to boot, like many 3com cards. You will also need a BIOS that supports booting
320from PXE.
321</p>
322
209<body> 323</body>
210<p>You will need a network card on the diskless client that uses the PXE protocol to boot, like many 3com cards. You will also need a BIOS that supports booting from PXE.</p> 324</section>
211</body></section> 325<section>
212
213<section><title>Server base setup</title> 326<title>Server base setup</title>
214<body> 327<body>
215 <p>Create directories: The first thing to do is to create the directories where your diskless system will be stored. Create a directory called <path>/diskless</path> which houses a directory for each diskless client. For the rest of this howto we'll be working on the client 'eta'.</p> 328
329<p>
330Create directories: The first thing to do is to create the directories where
331your diskless system will be stored. Create a directory called
332<path>/diskless</path> which houses a directory for each diskless client. For
333the rest of this howto we'll be working on the client 'eta'.
334</p>
216 335
217<pre caption="directory setup"> 336<pre caption="directory setup">
218# <i>mkdir /diskless</i> 337# <i>mkdir /diskless</i>
219# <i>mkdir /diskless/eta</i> 338# <i>mkdir /diskless/eta</i>
220# <i>mkdir /diskless/eta/boot</i> 339# <i>mkdir /diskless/eta/boot</i>
221</pre> 340</pre>
222 341
223<p>DHCP and TFTP setup: The client will get boot informations using DHCP and download all the required files using TFTP. Just emerge DHCP and configure it for your basic needs. Then, add the following on <path>/etc/dhcp/dhcpd.conf</path>.</p> 342<p>
343DHCP and TFTP setup: The client will get boot informations using DHCP and
344download all the required files using TFTP. Just emerge DHCP and configure it
345for your basic needs. Then, add the following on
346<path>/etc/dhcp/dhcpd.conf</path>.
347</p>
224 348
225<note>This provide a static IP address for the client and the path of a PXE boot image, here pxegrub. You have to replace the MAC address of the Ethernet card of the client and the directory where you will put the client files with the one you use.</note> 349<note>
350This provide a static IP address for the client and the path of a PXE boot
351image, here pxegrub. You have to replace the MAC address of the Ethernet card
352of the client and the directory where you will put the client files with the
353one you use.
354</note>
226 355
227<pre caption="dhcp.conf"> 356<pre caption="dhcp.conf">
228option option-150 code 150 = text ; 357option option-150 code 150 = text ;
229host eta { 358host eta {
230hardware ethernet 00:00:00:00:00:00; 359hardware ethernet 00:00:00:00:00:00;
232option option-150 "/eta/boot/grub.lst"; 361option option-150 "/eta/boot/grub.lst";
233filename "/eta/boot/pxegrub"; 362filename "/eta/boot/pxegrub";
234} 363}
235</pre> 364</pre>
236 365
237<p>For TFTP, emerge <c>app-admin/tftp-hpa</c>. In <path>/etc/conf.d/in.tftpd</path>, put the following :</p> 366<p>
367For TFTP, emerge <c>app-admin/tftp-hpa</c>. In
368<path>/etc/conf.d/in.tftpd</path>, put the following :
369</p>
238 370
239<pre caption="in.tftpd"> 371<pre caption="in.tftpd">
240INTFTPD_PATH="/diskless" 372INTFTPD_PATH="/diskless"
241INTFTPD_USER="nobody" 373INTFTPD_USER="nobody"
242INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}" 374INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
243</pre> 375</pre>
244 376
245<p>Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by yourself to enable the PXE image compilation ... but that's quite easy. First, get the latest version of the GRUB source code (<c>emerge -f grub</c> will place the tarball in <path>/usr/portage/distfiles</path>). Copy the tarball to <path>/diskless</path> and then build it to make the pxe capable binary. Once the binary is built, copy it to the diskless client's boot directory. Then edit it's grub.lst config file.</p> 377<p>
378Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by
379yourself to enable the PXE image compilation ... but that's quite easy. First,
380get the latest version of the GRUB source code (<c>emerge -f grub</c> will
381place the tarball in <path>/usr/portage/distfiles</path>). Copy the tarball to
382<path>/diskless</path> and then build it to make the pxe capable binary. Once
383the binary is built, copy it to the diskless client's boot directory. Then edit
384it's grub.lst config file.
385</p>
246 386
247<pre caption="grub setup"> 387<pre caption="grub setup">
248# <i>tar zxvf grub-0.92.tar.gz</i> 388# <i>tar zxvf grub-0.92.tar.gz</i>
249# <i>cd grub-0.92</i> 389# <i>cd grub-0.92</i>
250# <i>./configure --help</i> 390# <i>./configure --help</i>
267 407
268<codenote>For the nfsroot option, the IP address is the one of the server and </codenote> 408<codenote>For the nfsroot option, the IP address is the one of the server and </codenote>
269<codenote>the directory is the one where your diskless client files are located (on the server).</codenote> 409<codenote>the directory is the one where your diskless client files are located (on the server).</codenote>
270</pre> 410</pre>
271 411
272<p>Setup NFS: NFS is quite easy to configure. The only thing you have to do is to add a line on the <path>/etc/exports</path> config file :</p> 412<p>
413Setup NFS: NFS is quite easy to configure. The only thing you have to do is to
414add a line on the <path>/etc/exports</path> config file :
415</p>
273 416
274<pre caption="/etc/exports"> 417<pre caption="/etc/exports">
275# <i>nano -w /etc/exports</i> 418# <i>nano -w /etc/exports</i>
276NFS file systems being exported. See exports(5). 419# /etc/exports: NFS file systems being exported. See exports(5).
277/diskless/eta eta(rw,sync,no_root_squash) 420/diskless/eta eta(rw,sync,no_root_squash)
278</pre> 421</pre>
279 422
280<p>Update your hosts: One important thing to do now is to modify your <path>/etc/hosts</path> file to fit your needs. </p> 423<p>
424Update your hosts: One important thing to do now is to modify your
425<path>/etc/hosts</path> file to fit your needs.
426</p>
281 427
282<pre caption="/etc/hosts"> 428<pre caption="/etc/hosts">
283127.0.0.1 localhost 429127.0.0.1 localhost
284 430
285192.168.1.10 eta.example.com eta 431192.168.1.10 eta.example.com eta
286192.168.1.20 sigma.example.com sigma 432192.168.1.20 sigma.example.com sigma
287</pre> 433</pre>
434
288</body> 435</body>
436</section>
289</section> 437<section>
290
291<section><title>Creating the system on the server</title> 438<title>Creating the system on the server</title>
292
293<body> 439<body>
294 440
295<p>Reboot the server on a Gentoo LiveCD. Follow the standard install procedure as explained in the Gentoo Install Howto BUT with the following differences. When you mount the file system, do the following (where hdaX is the partition where you created the /diskless directory). You do not need to mount any other partitions as all of the files will reside in the <path>/diskless/eta</path> directory.</p> 441<p>
442Reboot the server on a Gentoo LiveCD. Follow the standard install procedure as
443explained in the Gentoo Install Howto BUT with the following differences. When
444you mount the file system, do the following (where hdaX is the partition where
445you created the /diskless directory). You do not need to mount any other
446partitions as all of the files will reside in the <path>/diskless/eta</path>
447directory.
448</p>
296 449
297<pre caption="mounting the filesystem"> 450<pre caption="mounting the filesystem">
298#<i> mount /dev/hda3 /mnt/gentoo</i> 451#<i> mount /dev/hda3 /mnt/gentoo</i>
299</pre> 452</pre>
300 453
301<p>Stage tarballs and chroot: This example uses a stage3 tarball. Mount <path>/proc</path> to your diskless directory and chroot into it to continue with the install. Then follow the installation manual until kernel configuration.</p> 454<p>
455Stage tarballs and chroot: This example uses a stage3 tarball. Mount
456<path>/proc</path> to your diskless directory and chroot into it to continue
457with the install. Then follow the installation manual until kernel
458configuration.
459</p>
302 460
303<warn>Be very careful where you extract your stage tarball. You don't want to end up extracting over your existing installation.</warn> 461<warn>
462Be very careful where you extract your stage tarball. You don't want to end up
463extracting over your existing installation.
464</warn>
304 465
305<pre caption="extracting the stage tarball"> 466<pre caption="extracting the stage tarball">
306# <i>cd /mnt/gentoo/diskless/eta/</i> 467# <i>cd /mnt/gentoo/diskless/eta/</i>
307# <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i> 468# <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i>
308# <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i> 469# <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i>
310# <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i> 471# <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i>
311# <i>env-update</i> 472# <i>env-update</i>
312# <i>source /etc/profile</i> 473# <i>source /etc/profile</i>
313</pre> 474</pre>
314 475
315<p>Kernel configuration: When you do the <c>make menuconfig</c> of your kernel configuration, don't forget to enable the following options with the others recommended into the install howto.</p> 476<p>
477Kernel configuration: When you do the <c>make menuconfig</c> of your kernel
478configuration, don't forget to enable the following options with the others
479recommended into the install howto.
480</p>
316 481
317<pre caption="menuconfig options"> 482<pre caption="menuconfig options">
318- Your network card device support 483- Your network card device support
319 484
320- Under "Networking options" : 485- Under "Networking options" :
330&lt;*&gt; NFS file system support 495&lt;*&gt; NFS file system support
331[*] Provide NFSv3 client support 496[*] Provide NFSv3 client support
332[*] Root file system on NFS 497[*] Root file system on NFS
333</pre> 498</pre>
334 499
500<p>
335<p>Next configure your diskless client's <path>/etc/fstab</path>.</p> 501Next configure your diskless client's <path>/etc/fstab</path>.
502</p>
336 503
337<pre caption="/etc/fstab"> 504<pre caption="/etc/fstab">
338# <i>nano -w /etc/fstab</i> 505# <i>nano -w /etc/fstab</i>
339/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 506/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
340proc /proc proc defaults 0 0 507proc /proc proc defaults 0 0
341tmpfs /dev/shm tmpfs defaults 0 0 508tmpfs /dev/shm tmpfs defaults 0 0
342</pre> 509</pre>
343 510
344<p>Bootloader. Don't install another bootloader because we already have one - pxegrub. Simply finish the install and restart the server. Start the services you'll need to boot the new client: DHCP, TFTPD, and NFS.</p> 511<p>
512Bootloader. Don't install another bootloader because we already have one -
513pxegrub. Simply finish the install and restart the server. Start the services
514you'll need to boot the new client: DHCP, TFTPD, and NFS.
515</p>
345 516
346<pre caption="Starting services"> 517<pre caption="Starting services">
347# <i>/etc/init.d/dhcp start</i> 518# <i>/etc/init.d/dhcp start</i>
348# <i>/etc/init.d/tftpd start</i> 519# <i>/etc/init.d/tftpd start</i>
349# <i>/etc/init.d/nfs start</i> 520# <i>/etc/init.d/nfs start</i>
350</pre> 521</pre>
351 522
352</body></section>
353
354<section><title>Booting the new client</title>
355<body> 523</body>
356<p>For the new client to boot properly, you'll need to configure the bios and the network card to use PXE as the first boot method - before CD-ROM or floppy. For help with this consult your hardware manuals or manufacturers website. The network card should get an IP address using DHCP and download the GRUB PXE image using TFTP. Then, you should see a nice black and white GRUB bootmenu where you will select the kernel to boot and press Enter. If everything is ok the kernel should boot, mount the root filesystem using NFS and provide you with a login prompt. Enjoy.</p> 524</section>
357</body></section> 525<section>
526<title>Booting the new client</title>
527<body>
358 528
529<p>
530For the new client to boot properly, you'll need to configure the bios and the
531network card to use PXE as the first boot method - before CD-ROM or floppy. For
532help with this consult your hardware manuals or manufacturers website. The
533network card should get an IP address using DHCP and download the GRUB PXE
534image using TFTP. Then, you should see a nice black and white GRUB bootmenu
535where you will select the kernel to boot and press Enter. If everything is ok
536the kernel should boot, mount the root filesystem using NFS and provide you
537with a login prompt. Enjoy.
538</p>
539
540</body>
541</section>
359</chapter> 542</chapter>
360 543
361 544<chapter>
362
363<chapter> <title>Installing Gentoo from an existing Linux distribution </title> 545<title>Installing Gentoo from an existing Linux distribution</title>
546<section>
364<section> <title> Requirements </title> 547<title>Requirements</title>
365<body> 548<body>
549
550<p>
366<p>In order to install Gentoo from your existing Linux distribution you need to 551In order to install Gentoo from your existing Linux distribution you need to
367have chroot command installed, and have a copy of the Gentoo installation 552have chroot command installed, and have a copy of the Gentoo installation
368tarball or ISO you want to install. A network connection would be preferable if 553tarball or ISO you want to install. A network connection would be preferable if
369you want more than what's supplied in your tarball. (by the way, a tarball is 554you want more than what's supplied in your tarball. (by the way, a tarball is
370just a file ending in .tbz or .tar.gz). The author used RedHat Linux 7.3 as the 555just a file ending in .tbz or .tar.gz). The author used RedHat Linux 7.3 as the
371"host" operating system, but it is not very important. Let's get started! </p> 556"host" operating system, but it is not very important. Let's get started!
557</p>
558
372</body> 559</body>
560</section>
373</section> 561<section>
374
375<section> <title> Overview </title> 562<title>Overview</title>
376<body>
377<p>We will first allocate a partition to Gentoo by resizing our existing Linux partition, mount the partition, untar the tarball that is mounted, chroot inside the psuedo-system and start building. Once the bootstrap process is done, we will do some final configuration on the system so as to make sure it boots, then we are ready to reboot and use Gentoo. </p>
378</body> 563<body>
564
565<p>
566We will first allocate a partition to Gentoo by resizing our existing Linux
567partition, mount the partition, untar the tarball that is mounted, chroot
568inside the psuedo-system and start building. Once the bootstrap process is
569done, we will do some final configuration on the system so as to make sure it
570boots, then we are ready to reboot and use Gentoo.
571</p>
572
573</body>
574</section>
379</section> 575<section>
380
381<section> <title> How should we make space for Gentoo? </title> 576<title>How should we make space for Gentoo?</title>
382<body> 577<body>
383 578
579<p>
580The root partition is the filesystem mounted under <path>/</path>. A quick run
581of mount on my system shows what I am talking about. We well also use df (disk
582free) to see how much space I have left and how I will be resizing. Note that
583it is not mandatory to resize your root partition! You could be resizing
584anything else supported by our resizer, but let's talk about that later.
384<p> 585</p>
385The root partition is the filesystem mounted under <path>/</path>. A quick run of mount on my system shows what I am talking about. We well also use df (disk free) to see how much space I have left and how I will be resizing. Note that it is not mandatory to resize your root partition! You could be resizing anything else supported by our resizer, but let's talk about that later.</p>
386
387 586
388<pre caption="Filesystem information"> 587<pre caption="Filesystem information">
389# <i>mount</i> 588# <i>mount</i>
390/dev/hdb2 on / type ext3 (rw) 589/dev/hdb2 on / type ext3 (rw)
391none on /proc type proc (rw) 590none on /proc type proc (rw)
395Filesystem Size Used Avail Use% Mounted on 594Filesystem Size Used Avail Use% Mounted on
396/dev/hdb2 4.0G 1.9G 2.4G 82% / 595/dev/hdb2 4.0G 1.9G 2.4G 82% /
397none 38M 0 38M 0% /dev/shm 596none 38M 0 38M 0% /dev/shm
398</pre> 597</pre>
399 598
400<p>As we can see, the partition mounted as <path>/</path> named <path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes for Gentoo. Not bad, I could have quite some stuff installed. However, think that even one gigabyte is enough for most users. So let's partition this thing! </p> 599<p>
600As we can see, the partition mounted as <path>/</path> named
601<path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will
602resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes
603for Gentoo. Not bad, I could have quite some stuff installed. However, think
604that even one gigabyte is enough for most users. So let's partition this thing!
605</p>
401 606
402</body> 607</body>
403</section> 608</section>
404
405<section> 609<section>
406<title>Building parted to resize partition</title> 610<title>Building parted to resize partition</title>
407<body> 611<body>
408 612
409<p> 613<p>
410Parted is an utility supplied by the GNU foundation, an old and respectable huge project whose software you are using in this very moment. There is one tool, however, that is extremely useful for us at the moment. It's called parted, partition editor and we can get it from <uri>http://www.gnu.org/software/parted/</uri> 614Parted is an utility supplied by the GNU foundation, an old and respectable
615huge project whose software you are using in this very moment. There is one
616tool, however, that is extremely useful for us at the moment. It's called
617parted, partition editor and we can get it from
618<uri>http://www.gnu.org/software/parted/</uri>
411</p> 619</p>
412 620
413<note> 621<note>
414There are other tools for doing resize of partitions as well, but author 622There are other tools for doing resize of partitions as well, but author is
415is unsure/uninterested whether PartitionMagic(tm) or other software of the kind 623unsure/uninterested whether PartitionMagic(tm) or other software of the kind do
416do the job. It's the reader's job to check them out 624the job. It's the reader's job to check them out
417</note> 625</note>
418 626
419<p> 627<p>
420Look up on that page the type of filesystem you want to resize and see if parted 628Look up on that page the type of filesystem you want to resize and see if
421can do it. If not, you're out of luck, you will have to destroy some partition 629parted can do it. If not, you're out of luck, you will have to destroy some
422to make space for Gentoo, and reinstall back. Go ahead by downloading the 630partition to make space for Gentoo, and reinstall back. Go ahead by downloading
423software, install it. Here we have a problem. We want to resize our Linux root 631the software, install it. Here we have a problem. We want to resize our Linux
424partition, therefore we must boot from a floppy disk a minimal linux system and 632root partition, therefore we must boot from a floppy disk a minimal linux
425use previously-compiled parted copied to a diskette in order to resize <path>/</path>. 633system and use previously-compiled parted copied to a diskette in order to
426However, if you can unmount the partition while still in Linux you are lucky, 634resize <path>/</path>. However, if you can unmount the partition while still
427you don't need to do what follows. Just compile parted and run it on an 635in Linux you are lucky, you don't need to do what follows. Just compile parted
428unmounted partition you chose to resize. Here's how I did it for my system. 636and run it on an unmounted partition you chose to resize. Here's how I did it
637for my system.
429</p> 638</p>
430 639
431<impo> 640<impo>
432Make sure that the operations you want to do on your partition are 641Make sure that the operations you want to do on your partition are supported by
433supported by parted! 642parted!
434</impo> 643</impo>
435 644
436<p> 645<p>
437Get tomsrtbt boot/root disk (free of charge) from <uri>http://freshmeat.net/tomsrtbt </uri>, create a floppy as suggested in the Documentation that accompanies the software package and insert a new floppy in the drive for the next step. 646Get tomsrtbt boot/root disk (free of charge) from
647<uri>http://freshmeat.net/tomsrtbt </uri>, create a floppy as suggested in the
648Documentation that accompanies the software package and insert a new floppy in
649the drive for the next step.
438</p> 650</p>
439 651
440<note> 652<note>
441Note again that Linux is synonym of "There's one more way to do it". Your 653Note again that Linux is synonym of "There's one more way to do it". Your
442objective is to run parted on an unmounted partition so it can do its work. You 654objective is to run parted on an unmounted partition so it can do its work. You
453Zonesize=1024 665Zonesize=1024
454Maxsize=268966912 666Maxsize=268966912
455</pre> 667</pre>
456 668
457<p> 669<p>
458We will now proceed with the build of parted. If it's not already downloaded and untarred, do so now and cd into the corresponding directory. Now run the following set of commands to build the utility and copy it to your floppy disk. 670We will now proceed with the build of parted. If it's not already downloaded
671and untarred, do so now and cd into the corresponding directory. Now run the
672following set of commands to build the utility and copy it to your floppy disk.
459</p> 673</p>
460 674
461<pre caption="Building the utility floppy"> 675<pre caption="Building the utility floppy">
462# <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp; 676# <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp;
463export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure 677export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure
464&amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i> 678&amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i>
465</pre> 679</pre>
466 680
467<p> 681<p>
468Congratulations, you are ready to reboot and resize your partition. Do this only 682Congratulations, you are ready to reboot and resize your partition. Do this
469after taking a quick look at the parted documentation on the GNU website. The 683only after taking a quick look at the parted documentation on the GNU website.
470resize should take under 30 minutes for the largest hard-drives, be patient. 684The resize should take under 30 minutes for the largest hard-drives, be
471Reboot your system with the tomsrtbt boot disk (just pop it inside), and once 685patient. Reboot your system with the tomsrtbt boot disk (just pop it inside),
472you are logged in, switch the disk in the drive with your utility disk we have 686and once you are logged in, switch the disk in the drive with your utility disk
473created above and type mount /dev/fd0 /floppy to have parted under /floppy. 687we have created above and type mount /dev/fd0 /floppy to have parted under
474There you go. Run parted and you will be able to resize your partition. Once 688/floppy. There you go. Run parted and you will be able to resize your
475this lenghty process done, we are ready to have the real fun, by installing 689partition. Once this lenghty process done, we are ready to have the real fun,
476Gentoo. Reboot back into your old Linux system for now. Drive you wish to 690by installing Gentoo. Reboot back into your old Linux system for now. Drive you
477operate on is the drive containing the partition we want to resize. For 691wish to operate on is the drive containing the partition we want to resize. For
478example, if we want to resize /dev/hda3, the drive is /dev/hda 692example, if we want to resize /dev/hda3, the drive is /dev/hda
479</p> 693</p>
480 694
481<pre caption="Commands to run once logged into tomsrtbt system"> 695<pre caption="Commands to run once logged into tomsrtbt system">
482# <i>mount /dev/fd0 /floppy </i> 696# <i>mount /dev/fd0 /floppy </i>
499 onwards. 713 onwards.
500 START and END are in megabytes 714 START and END are in megabytes
501(parted) <i> resize 2 3133.266 4000.000 </i> 715(parted) <i> resize 2 3133.266 4000.000 </i>
502</pre> 716</pre>
503 717
718<impo>
504<impo> Be patient! The computer is working! Just look at the hardware LED on 719Be patient! The computer is working! Just look at the hardware LED on your case
505your case to see that it is really working. This should take between 2 and 30 720to see that it is really working. This should take between 2 and 30 minutes.
506minutes. </impo> 721</impo>
507 722
723<p>
508<p>Once you have resized, boot back into your old linux as described. Then go to 724Once you have resized, boot back into your old linux as described. Then go to
509<uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">The Gentoo Handbook: Preparing the Disks</uri> and follow the instructions. When chrooting, use the following command to flush your environment: 725<uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">The Gentoo
726Handbook: Preparing the Disks</uri> and follow the instructions. When
727chrooting, use the following command to flush your environment:
510</p> 728</p>
511 729
512<pre caption = "Flushing the environment during chroot"> 730<pre caption="Flushing the environment during chroot">
513# <i>env -i /usr/sbin/chroot /mnt/gentoo /bin/bash</i> 731# <i>env -i /usr/sbin/chroot /mnt/gentoo /bin/bash</i>
514</pre> 732</pre>
515 733
516<p> 734<p>
517Enjoy! 735Enjoy!
518</p> 736</p>
737
519</body> 738</body>
520</section> 739</section>
521</chapter> 740</chapter>
741
522</guide> 742</guide>

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20