/[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.51 Revision 1.75
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.51 2005/02/19 16:25:21 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.75 2008/05/23 20:29:44 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/altinstall.xml"> 5<guide link="/doc/en/altinstall.xml">
6 6
7<title>The Gentoo Linux alternative installation method HOWTO</title> 7<title>The Gentoo Linux alternative installation method HOWTO</title>
39<author title="Editor"> 39<author title="Editor">
40 <mail link="blubber@gentoo.org">Tiemo Kieft</mail> 40 <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
41</author> 41</author>
42<author title="Editor"> 42<author title="Editor">
43 <mail link="bennyc@gentoo.org">Benny Chuang</mail> 43 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
44</author>
45<author title="Editor">
46 <mail link="smithj@gentoo.org">Jonathan Smith</mail>
44</author> 47</author>
45 48
46<abstract> 49<abstract>
47This HOWTO is meant to be a repository of alternative Gentoo installation 50This HOWTO is meant to be a repository of alternative Gentoo installation
48methods, for those with special installation needs such as lack of a cdrom 51methods, for those with special installation needs such as lack of a cdrom
49or a computer that can't boot cds. 52or a computer that can't boot cds.
50</abstract> 53</abstract>
51 54
55<!-- The content of this document is licensed under the CC-BY-SA license -->
56<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
52<license/> 57<license/>
53 58
54<version>0.59</version> 59<version>0.73</version>
55<date>2005-02-19</date> 60<date>2008-01-09</date>
56 61
57<chapter> 62<chapter>
58<title>About this document</title> 63<title>About this document</title>
59<section> 64<section>
60<body> 65<body>
64don't like it), help is now here. This document serves to provide a repository 69don't like it), help is now here. This document serves to provide a repository
65of alternative Gentoo Linux installation techniques to those who need them. 70of alternative Gentoo Linux installation techniques to those who need them.
66Or, if you prefer, it serves as a place to put your wacky installation methods. 71Or, if you prefer, it serves as a place to put your wacky installation methods.
67If you have an installation method that you yourself find useful, or you have 72If you have an installation method that you yourself find useful, or you have
68devised an amusing way of installing Gentoo, please don't hesitate to write 73devised an amusing way of installing Gentoo, please don't hesitate to write
69something up and <mail link="antifa@gentoo.org">send it to me.</mail> 74something up and post it on <uri link="http://bugs.gentoo.org">Bugzilla</uri>.
70</p> 75</p>
71 76
72</body> 77</body>
73</section> 78</section>
74</chapter> 79</chapter>
75 80
76<chapter> 81<chapter>
77<title>Booting the LiveCD with Smart BootManager</title> 82<title>Booting the Install CD with Smart BootManager</title>
78<section> 83<section>
79<body> 84<body>
80 85
81<p> 86<p>
82Download Smart BootManager available from 87Download Smart BootManager available from
83<uri>http://btmgr.sourceforge.net/download.html</uri>. 88<uri>http://btmgr.sourceforge.net/download.html</uri>.
84Linux source or binary format and windows .exe versions are available as well 89Linux source or binary format and windows .exe versions are available as well
85as many language packs. However, at this time, the preferred method would be to 90as many language packs. However, at this time, the preferred method would be to
86use the binary format, as the source will not compile with newer versions of 91use the binary format, as the source will not compile with newer versions of
87NASM. 92NASM.
95 100
96<pre caption="Smart BootManager Options"> 101<pre caption="Smart BootManager Options">
97sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file] 102sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file]
98 103
99 -t theme select the theme to be used, in which the theme could be: 104 -t theme select the theme to be used, in which the theme could be:
100 us = English theme de = German theme 105 us = English theme de = German theme
101 hu = Hungarian theme zh = Chinese theme 106 hu = Hungarian theme zh = Chinese theme
102 ru = Russian theme cz = Czech theme 107 ru = Russian theme cz = Czech theme
103 es = Spanish theme fr = French theme 108 es = Spanish theme fr = French theme
104 pt = Portuguese theme 109 pt = Portuguese theme
105 110
106 111
107 -d drv set the drive that you want to install Smart BootManager on; 112 -d drv set the drive that you want to install Smart BootManager on;
108 for Linux: 113 for Linux:
109 /dev/fd0 is the first floppy driver, 114 /dev/fd0 is the first floppy driver,
110 /dev/hda is the first IDE harddisk driver. 115 /dev/hda is the first IDE harddisk driver.
111 /dev/sda is the first SCSI harddisk driver. 116 /dev/sda is the first SCSI harddisk driver.
112 for DOS: 117 for DOS:
113 0 is the first floppy drive 118 0 is the first floppy drive
114 128 is the first hard drive; 119 128 is the first hard drive;
126<pre caption="Using sbminst to build the boot floppy"> 131<pre caption="Using sbminst to build the boot floppy">
127# <i>sbminst -t us -d /dev/fd0</i> 132# <i>sbminst -t us -d /dev/fd0</i>
128</pre> 133</pre>
129 134
130<note> 135<note>
131Replace fd0 with your respective floppy device name if yours is different. 136Replace <path>fd0</path> with your respective floppy device name if yours is
137different.
132</note> 138</note>
133 139
134<p> 140<p>
135Now simply place the floppy in the floppy drive of the computer you'd like to 141Now simply place the floppy in the floppy drive of the computer you'd like to
136boot the LiveCD on, as well as placing the LiveCD in the CD-ROM and boot the 142boot the Install CD on, as well as placing the Install CD in the CD-ROM and boot
137computer. 143the computer.
138</p> 144</p>
139 145
140<p> 146<p>
141You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and 147You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and
142press ENTER to boot the LiveCD. Once booted proceed with the standard 148press ENTER to boot the Install CD. Once booted proceed with the standard
143installation instructions. 149installation instructions.
144</p> 150</p>
145 151
146<p> 152<p>
147Further information on Smart BootManager may be found at 153Further information on Smart BootManager may be found at
156<title>Knoppix Installation</title> 162<title>Knoppix Installation</title>
157<section> 163<section>
158<body> 164<body>
159 165
160<note> 166<note>
161Knoppix is only available for x86 users. 167Knoppix is only available for x86 users.
162</note> 168</note>
163 169
170<!-- this works with knoppix 3.6+ and gentoo 2004.3, 2005.0-->
171
164<p> 172<p>
165Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a 173Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a
166way to have a fully functional linux system while you're compiling Gentoo. Tux 174way to have a fully functional system while you're compiling Gentoo. Tux Racer
167Racer will help you pass the time while you wait for bootstrap. 175will help you pass the time while you wait, and you can use OpenOffice for
168</p> 176work.
169
170<p> 177</p>
171Boot from the Knoppix CD. It generally does a really good job of hardware 178
172detection. Although, you may have to add some boot options. 179<warn>
180Be aware that if you save anything in Knoppix's home directory while waiting
181for your Gentoo system to install, it will not be available when you reboot
182into Gentoo. Be sure to save important files on the hard disk or on some other
183computer!
184</warn>
185
173</p> 186<p>
174 187Boot from the Knoppix CD. If you have Knoppix 3.6-3.8.2, you will need to
188specify <c>knoppix26</c> as a boot option to load a 2.6 kernel. If you miss
189this step, when you <c>chroot</c>, you will recieve an error saying that your
190kernel is too old. If, however, you have Knoppix 3.9+, this step is
191unnecessary, since the 2.6 kernel is default.
175<p> 192</p>
176By default Knoppix boots into a KDE 3.0 desktop. The first thing I did was open 193
177a konsole and typed <c>sudo passwd root</c>. This lets you set the root
178password for Knoppix.
179</p> 194<p>
180 195By default Knoppix boots into a KDE desktop. Open a <c>konsole</c> and <c>su
181<p> 196-</c> so you can change your password. This lets you set the root password for
182Next, I <c>su</c> to root and typed <c>usermod -d /root -m root</c>. This sets 197Knoppix. You can now configure <c>sshd</c> for remote login, at your
183user roots home directory to /root (the Gentoo way) from /home/root (the Knoppix 198preference.
184way). If you do not do this, then you will receive errors when emerging about
185"/home/root: not found" or something to that effect.
186</p>
187
188<p>
189I then typed <c>exit</c> and then <c>su</c> back into root. This loads the
190change that was made with the usermod command. Now create the
191<path>/mnt/gentoo</path> mountpoint using <c>mkdir</c>:
192</p> 199</p>
193 200
194<pre caption="Creating the /mnt/gentoo mountpoint"> 201<pre caption="Creating the /mnt/gentoo mountpoint">
195# <i>mkdir /mnt/gentoo</i> 202# <i>mkdir /mnt/gentoo</i>
196</pre> 203</pre>
197 204
198<p> 205<p>
199At this point, you can pick up with the standard install documentation at <uri 206At this point, you can pick up with the standard install documentation at <uri
200link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>. 207link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>.
201However, when you're asked to mount the proc system, issue the following 208However, when you are asked to mount the proc system, issue the following
202command instead: 209command instead:
203</p> 210</p>
204 211
205<pre caption="Bind-mounting the proc pseudo filesystem"> 212<pre caption="Bind-mounting the proc pseudo filesystem">
206# <i>mount -o bind /proc /mnt/gentoo/proc</i> 213# <i>mount -o bind /proc /mnt/gentoo/proc</i>
207</pre> 214</pre>
208 215
216<p>
217Also, know that some of Portage's FEATURES will not work in knoppix. Especially
218watch out for <c>userpriv</c> and <c>usersandbox</c>. If you find yourself
219getting errors, it might be wise to disable some or all of the optional
220features.
221</p>
222
209<!-- 223<!--
210 Commenting out due to #78716. If it needs to be restated again, note 224 Commenting out due to #78716. If it needs to be restated again, note
211 that some will require to bind-mount it, others don't, and that you have 225 that some will require to bind-mount it, others don't, and that you have
212 a 50-50 chance of winning the gold strike. 226 a 50-50 chance of winning the gold strike.
213 227
214 228
215<p> 229<p>
216You will also need to bind-mount the device tree to resolve permission issues 230You will also need to bind-mount the device tree to resolve permission issues
217with various device files. 231with various device files.
218</p> 232</p>
232</body> 246</body>
233</section> 247</section>
234</chapter> 248</chapter>
235 249
236<chapter> 250<chapter>
237<title>Installing from Stage 1 without network access</title>
238<section>
239<body>
240
241<p>
242Burn a LiveCD iso.
243</p>
244
245<p>
246Get the latest portage snapshot from
247<uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri>
248(or your favorite <uri
249link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place
250this tarball on an existing partition on the computer your are installing to,
251or burn it to a CD.
252</p>
253
254<p>
255Follow all instructions of the Gentoo Installation Handbook up to <c>chroot
256/mnt/gentoo</c> in Chapter 6. If you only have one CD-ROM remember to use the
257<c>docache</c> option while booting so you can unmount the LiveCD and mount
258your portage snapshot CD.
259</p>
260
261<p>
262Open a new console (Alt-F2), we will continue with the Install Doc up to
263running the bootstrap.sh script.
264</p>
265
266<warn>
267Older realeases of the livecd required you to change the password using the
268<c>passwd</c> command, before logging in manually.
269</warn>
270
271<p>
272Go back to the first console (Alt-F1, without chroot) and mount a second CD on
273<path>/mnt/gentoo/mnt/cdrom2</path>. Copy the portage tarball from cdrom2 and
274unpack it to <path>/mnt/gentoo/usr</path>.
275</p>
276
277<pre caption="Mount the snapshot cd">
278# <i>umount /mnt/cdrom</i>
279# <i>mkdir /mnt/gentoo/mnt/cdrom2</i>
280# <i>mount /dev/cdroms/cdrom0 /mnt/gentoo/mnt/cdrom2</i>
281# <i>cp /mnt/gentoo/mnt/cdrom2/portage-$date.tar.bz2 /mnt/gentoo/usr</i>
282# <i>cd /mnt/gentoo/usr</i>
283# <i>tar -xvjpf portage-$date.tar.bz2</i>
284</pre>
285
286<p>
287Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail
288because it won't be able to download any files. We will fetch these files
289somewhere else and put them in /usr/portage/distfiles (on F2 console).
290</p>
291
292<p>
293You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib,
294binutils, gcc, ncurses plus their dependencies.
295</p>
296
297<note>
298Note that you need the versions of each package synced with your portage tree.
299</note>
300
301<pre caption="Getting the download listing">
302<comment>(Don't forget the 2 in front of the &gt;)</comment>
303# <i>emerge -fp glibc baselayout texinfo gettext zlib binutils gcc ncurses 2&gt; stage1.list</i>
304# <i>mount -t vfat /dev/fd0 /mnt/floppy</i>
305# <i>cp /mnt/gentoo/stage1.list /mnt/floppy</i>
306# <i>umount /mnt/floppy</i>
307</pre>
308
309<p>
310Take the floppy to the computer that has fast access. If you take a look at the
311<path>stage1.list</path> file, you'll see that it provides you with several
312URLs to download. Sadly, it lists several possible URLs for each package as
313well, which isn't what you want. Strip all but one of the URLs first:
314</p>
315
316<pre caption="Stripping URLs">
317<comment>(This script is depending on the output format given by emerge which
318 might change in the future without further notice - use with caution!)</comment>
319# <i>cut -f 1 -d ' ' stage1.list > stage1.download</i>
320</pre>
321
322<p>
323Now use <c>wget</c> to fetch all the listed sources:
324</p>
325
326<pre caption="Use wget to grab your source packages">
327# <i>wget -N -i stage1.download</i>
328</pre>
329
330<p>
331Once you have obtained all the files, take them to the computer and copy them
332to <path>/mnt/gentoo/usr/portage/distfiles</path>. You will then be able to run
333<c>bootstrap.sh</c>. Repeat this same wget fetch and place procedure for stage2
334and 3.
335</p>
336
337</body>
338</section>
339</chapter>
340
341<chapter>
342<title>Diskless install using PXE boot</title> 251<title>Diskless install using PXE boot</title>
343<section> 252<section>
344<title>Requirements</title> 253<title>Requirements</title>
345<body> 254<body>
346 255
361your diskless system will be stored. Create a directory called 270your diskless system will be stored. Create a directory called
362<path>/diskless</path> which houses a directory for each diskless client. For 271<path>/diskless</path> which houses a directory for each diskless client. For
363the rest of this howto we'll be working on the client 'eta'. 272the rest of this howto we'll be working on the client 'eta'.
364</p> 273</p>
365 274
366<pre caption="directory setup"> 275<pre caption="Directory setup">
367# <i>mkdir /diskless</i> 276# <i>mkdir /diskless</i>
368# <i>mkdir /diskless/eta</i> 277# <i>mkdir /diskless/eta</i>
369# <i>mkdir /diskless/eta/boot</i> 278# <i>mkdir /diskless/eta/boot</i>
370</pre> 279</pre>
371 280
376<path>/etc/dhcp/dhcpd.conf</path>. 285<path>/etc/dhcp/dhcpd.conf</path>.
377</p> 286</p>
378 287
379<note> 288<note>
380This provide a static IP address for the client and the path of a PXE boot 289This provide a static IP address for the client and the path of a PXE boot
381image, here pxegrub. You have to replace the MAC address of the Ethernet card 290image, here <path>pxegrub</path>. You have to replace the MAC address of the
382of the client and the directory where you will put the client files with the 291Ethernet card of the client and the directory where you will put the client
383one you use. 292files with the one you use.
384</note> 293</note>
385 294
386<p> 295<p>
387For DHCPd, run <c>emerge dhcp</c> (or any other DHCP server of your choice). 296For DHCPd, run <c>emerge dhcp</c> (or any other DHCP server of your choice).
388Make sure that the correct interface is selected in 297Make sure that the correct interface is selected in
389<path>/etc/conf.d/dhcp</path>. 298<path>/etc/conf.d/dhcpd</path>.
390</p> 299</p>
391 300
392<pre caption="dhcp.conf"> 301<pre caption="dhcpd.conf">
393option option-150 code 150 = text ; 302option option-150 code 150 = text ;
394ddns-update-style none ; 303ddns-update-style none ;
395host eta { 304host eta {
396hardware ethernet 00:00:00:00:00:00; 305hardware ethernet 00:00:00:00:00:00;
397fixed-address <i>ip.add.re.ss</i>; 306fixed-address <i>ip.add.re.ss</i>;
399filename "/eta/boot/pxegrub"; 308filename "/eta/boot/pxegrub";
400} 309}
401</pre> 310</pre>
402 311
403<p> 312<p>
313Next you'll need to configure your interface in <path>/etc/conf.d/net</path> so
314that it doesn't get cleared at bootup. See <path>/etc/conf.d/net.example</path>
315for more information.
316</p>
317
318<pre caption="/etc/conf.d/net">
319<comment>(Replace eth0 with the correct interface)</comment>
320config_eth0=( "noop" )
321</pre>
322
323<p>
404For TFTP, emerge <c>app-admin/tftp-hpa</c>. In 324For TFTP, emerge <c>app-admin/tftp-hpa</c>. In
405<path>/etc/conf.d/in.tftpd</path>, put the following : 325<path>/etc/conf.d/in.tftpd</path>, put the following :
406</p> 326</p>
407 327
408<pre caption="in.tftpd"> 328<pre caption="in.tftpd">
410INTFTPD_USER="nobody" 330INTFTPD_USER="nobody"
411INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}" 331INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
412</pre> 332</pre>
413 333
414<p> 334<p>
415Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by 335Setup GRUB: To provide PXE booting I use GRUB with the <c>netboot</c> USE flag
416yourself to enable the PXE image compilation ... but that's quite easy. First, 336enabled. Once GRUB is compiled, copy the PXE image to the diskless client's
417get the latest version of the GRUB source code (<c>emerge -f grub</c> will 337boot directory. Then edit its <path>grub.lst</path> config file.
418place the tarball in <path>/usr/portage/distfiles</path>). Copy the tarball to
419<path>/diskless</path> and then build it to make the pxe capable binary. Once
420the binary is built, copy it to the diskless client's boot directory. Then edit
421it's grub.lst config file.
422</p> 338</p>
423 339
424<pre caption="grub setup"> 340<pre caption="Grub setup">
425# <i>tar zxvf grub-0.92.tar.gz</i> 341# <i>echo "sys-boot/grub netboot" &gt;&gt; /etc/portage/package.use</i>
426# <i>cd grub-0.92</i> 342# <i>emerge -av grub</i>
427# <i>./configure --help</i>
428<comment>(In the options you will see a list of supported network interface drivers.
429 Select the driver compatible with your client's network card. Herein referenced
430 as $nic)</comment>
431# <i>./configure --enable-diskless --enable-$nic</i>
432# <i>make</i>
433# <i>cd stage2</i>
434# <i>cp pxegrub /diskless/eta/boot/pxegrub</i> 343# <i>cp /usr/lib/grub/pxegrub /diskless/eta/boot/pxegrub</i>
435# <i>nano -w /diskless/eta/boot/grub.lst</i> 344# <i>nano -w /diskless/eta/boot/grub.lst</i>
436</pre> 345</pre>
437 346
438<pre caption="grub.lst"> 347<pre caption="grub.lst">
439default 0 348default 0
441 350
442title=Diskless Gentoo 351title=Diskless Gentoo
443root (nd) 352root (nd)
444kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=<i>ip.add.re.ss</i>:/diskless/eta 353kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=<i>ip.add.re.ss</i>:/diskless/eta
445 354
446<codenote>For the nfsroot option, the IP address is the one of the server and </codenote> 355<comment># For the nfsroot option, the IP address is the one of the server and
447<codenote>the directory is the one where your diskless client files are located (on the server).</codenote> 356the directory is the one where your diskless client files are located (on the server).</comment>
448</pre> 357</pre>
449 358
450<p> 359<p>
451Setup NFS: NFS is quite easy to configure. The only thing you have to do is to 360Setup NFS: NFS is quite easy to configure. The only thing you have to do is to
452add a line on the <path>/etc/exports</path> config file : 361add a line on the <path>/etc/exports</path> config file:
453</p> 362</p>
454 363
455<pre caption="/etc/exports"> 364<pre caption="/etc/exports">
456# <i>nano -w /etc/exports</i> 365# <i>nano -w /etc/exports</i>
457# /etc/exports: NFS file systems being exported. See exports(5). 366# /etc/exports: NFS file systems being exported. See exports(5).
458/diskless/eta eta(rw,sync,no_root_squash) 367/diskless/eta eta(rw,sync,no_root_squash)
459</pre> 368</pre>
460 369
461<p> 370<p>
462Update your hosts: One important thing to do now is to modify your 371Update your hosts: One important thing to do now is to modify your
463<path>/etc/hosts</path> file to fit your needs. 372<path>/etc/hosts</path> file to fit your needs.
464</p> 373</p>
465 374
466<pre caption="/etc/hosts"> 375<pre caption="/etc/hosts">
467127.0.0.1 localhost 376127.0.0.1 localhost
475<section> 384<section>
476<title>Creating the system on the server</title> 385<title>Creating the system on the server</title>
477<body> 386<body>
478 387
479<p> 388<p>
480You might want to reboot the server with a Gentoo LiveCD, although you can 389You might want to reboot the server with a Gentoo Install CD, although you can
481very well continue immediately if you know how to proceed with the Gentoo 390very well continue immediately if you know how to proceed with the Gentoo
482Installation Instructions from an existing installation. Follow the standard 391Installation Instructions from an existing installation. Follow the standard
483install procedure as explained in the Gentoo Install Howto BUT with the 392install procedure as explained in the <uri link="/doc/en/handbook/">Gentoo
484following differences: 393Handbook</uri> BUT with the following differences:
485When you mount the file system, do the following (where hdaX is the partition 394When you mount the file system, do the following (where <path>hdaX</path> is
486where you created the /diskless directory). You do not need to mount any other 395the partition where you created the <path>/diskless</path> directory). You do
487partitions as all of the files will reside in the <path>/diskless/eta</path> 396not need to mount any other partitions as all of the files will reside in the
488directory. 397<path>/diskless/eta</path> directory.
489</p> 398</p>
490 399
491<pre caption="mounting the filesystem"> 400<pre caption="Mounting the filesystem">
492#<i> mount /dev/hda3 /mnt/gentoo</i> 401#<i> mount /dev/hdaX /mnt/gentoo</i>
493</pre> 402</pre>
494 403
495<p> 404<p>
496Stage tarballs and chroot: This example uses a stage3 tarball. Mount 405Stage tarballs and chroot: This example uses a stage3 tarball. Mount
497<path>/proc</path> to your diskless directory and chroot into it to continue 406<path>/proc</path> to your diskless directory and chroot into it to continue
502<warn> 411<warn>
503Be very careful where you extract your stage tarball. You don't want to end up 412Be very careful where you extract your stage tarball. You don't want to end up
504extracting over your existing installation. 413extracting over your existing installation.
505</warn> 414</warn>
506 415
507<pre caption="extracting the stage tarball"> 416<pre caption="Extracting the stage tarball">
508# <i>cd /mnt/gentoo/diskless/eta/</i> 417# <i>cd /mnt/gentoo/diskless/eta/</i>
509# <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i> 418# <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i>
510# <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i> 419# <i>mount -t proc /proc /mnt/gentoo/diskless/eta/proc</i>
511# <i>cp /etc/resolv.conf /mnt/gentoo/diskless/eta/etc/resolv.conf</i> 420# <i>cp /etc/resolv.conf /mnt/gentoo/diskless/eta/etc/resolv.conf</i>
512# <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i> 421# <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i>
539[*] Root file system on NFS 448[*] Root file system on NFS
540</pre> 449</pre>
541 450
542<p> 451<p>
543Save the kernel in your chrooted <path>/</path> (not in <path>/boot</path>) 452Save the kernel in your chrooted <path>/</path> (not in <path>/boot</path>)
544according to the pxegrub setting defined earlier. Next configure your 453according to the pxegrub setting defined earlier. Next configure your
545diskless client's <path>/etc/fstab</path>. 454diskless client's <path>/etc/fstab</path>.
546</p> 455</p>
547 456
548<pre caption="/etc/fstab"> 457<pre caption="/etc/fstab">
549# <i>nano -w /etc/fstab</i> 458# <i>nano -w /etc/fstab</i>
601</body> 510</body>
602</section> 511</section>
603</chapter> 512</chapter>
604 513
605<chapter> 514<chapter>
606<title>Installing Gentoo from an existing Linux distribution</title> 515<title>Installing Gentoo from an existing Linux distribution</title>
607<section> 516<section>
608<title>Requirements</title> 517<title>Requirements</title>
609<body> 518<body>
610 519
611<p> 520<p>
623<title>Overview</title> 532<title>Overview</title>
624<body> 533<body>
625 534
626<p> 535<p>
627We will first allocate a partition to Gentoo by resizing our existing Linux 536We will first allocate a partition to Gentoo by resizing our existing Linux
628partition, mount the partition, untar the tarball that is mounted, chroot 537partition, mount the partition, untar the tarball to the partition that is
629inside the psuedo-system and start building. Once the bootstrap process is 538mounted, chroot inside the pseudo-system and start building. Once the bootstrap
630done, we will do some final configuration on the system so as to make sure it 539process is done, we will do some final configuration on the system so as to
631boots, then we are ready to reboot and use Gentoo. 540make sure it boots, then we are ready to reboot and use Gentoo.
632</p> 541</p>
633 542
634</body> 543</body>
635</section> 544</section>
636<section> 545<section>
637<title>How should we make space for Gentoo?</title> 546<title>How should we make space for Gentoo?</title>
638<body> 547<body>
639 548
640<p> 549<p>
641The root partition is the filesystem mounted under <path>/</path>. A quick run 550The root partition is the filesystem mounted under <path>/</path>. A quick run
642of mount on my system shows what I am talking about. We well also use df (disk 551of <c>mount</c> on my system shows what I am talking about. We well also use
643free) to see how much space I have left and how I will be resizing. Note that 552<c>df</c> (disk free) to see how much space I have left and how I will be
644it is not mandatory to resize your root partition! You could be resizing 553resizing. Note that it is not mandatory to resize your root partition! You
645anything else supported by our resizer, but let's talk about that later. 554could be resizing anything else supported by our resizer, but let's talk about
555that later.
646</p> 556</p>
647 557
648<pre caption="Filesystem information"> 558<pre caption="Filesystem information">
649# <i>mount</i> 559# <i>mount</i>
650/dev/hdb2 on / type ext3 (rw) 560/dev/hdb2 on / type ext3 (rw)
651none on /proc type proc (rw) 561none on /proc type proc (rw)
652none on /dev/pts type devpts (rw,gid=5,mode=620) 562none on /dev/pts type devpts (rw,gid=5,mode=620)
653none on /dev/shm type tmpfs (rw,nodev,nosuid,noexec) 563none on /dev/shm type tmpfs (rw,nodev,nosuid,noexec)
654# <i>df -h </i> 564# <i>df -h </i>
655Filesystem Size Used Avail Use% Mounted on 565Filesystem Size Used Avail Use% Mounted on
656/dev/hdb2 4.0G 1.9G 2.4G 82% / 566/dev/hdb2 4.0G 1.9G 2.4G 82% /
657none 38M 0 38M 0% /dev/shm 567none 38M 0 38M 0% /dev/shm
658</pre> 568</pre>
659 569
660<p> 570<p>
661As we can see, the partition mounted as <path>/</path> named 571As we can see, the partition mounted as <path>/</path> named
662<path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will 572<path>/dev/hdb2</path> has 2.4 gigabytes free. In my case, I think I will
663resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes 573resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes
664for Gentoo. Not bad, I could have quite some stuff installed. However, think 574for Gentoo. Not bad, I could have quite some stuff installed. However, I think
665that even one gigabyte is enough for most users. So let's partition this thing! 575that even one gigabyte is enough for most users. So let's partition this thing!
666</p> 576</p>
667 577
668</body> 578</body>
669</section> 579</section>
670<section> 580<section>
671<title>Building parted to resize partition</title> 581<title>Building parted to resize partition</title>
672<body> 582<body>
673 583
674<p> 584<p>
675Parted is an utility supplied by the GNU foundation, an old and respectable 585Parted is an utility supplied by the GNU foundation, an old and respectable
676huge project whose software you are using in this very moment. There is one 586huge project whose software you are using in this very moment. There is one
678parted, partition editor and we can get it from 588parted, partition editor and we can get it from
679<uri>http://www.gnu.org/software/parted/</uri> 589<uri>http://www.gnu.org/software/parted/</uri>
680</p> 590</p>
681 591
682<note> 592<note>
683There are other tools for doing resize of partitions as well, but author is 593There are other tools for doing resize of partitions as well, but the author is
684unsure/uninterested whether PartitionMagic(tm) or other software of the kind do 594unsure/uninterested whether PartitionMagic(tm) or other software of the kind do
685the job. It's the reader's job to check them out 595the job. It's the reader's job to check them out
686</note> 596</note>
687 597
688<p> 598<p>
689Look up on that page the type of filesystem you want to resize and see if 599Look up on that page the type of filesystem you want to resize and see if
690parted can do it. If not, you're out of luck, you will have to destroy some 600parted can do it. If not, you're out of luck, you will have to destroy some
691partition to make space for Gentoo, and reinstall back. Go ahead by downloading 601partition to make space for Gentoo, and reinstall back. Go ahead by downloading
692the software, install it. Here we have a problem. We want to resize our Linux 602the software, install it. Here we have a problem. We want to resize our Linux
693root partition, therefore we must boot from a floppy disk a minimal linux 603root partition, therefore we must boot from a floppy disk a minimal linux
711</p> 621</p>
712 622
713<note> 623<note>
714Note again that Linux is synonym of "There's one more way to do it". Your 624Note again that Linux is synonym of "There's one more way to do it". Your
715objective is to run parted on an unmounted partition so it can do its work. You 625objective is to run parted on an unmounted partition so it can do its work. You
716might use some other boot/root diskset other than mininux. You might not even 626might use some boot/root diskset other than mininux. You might not even
717need to do this step at all, that is only umount the filesystem you want to 627need to do this step at all, ie. you might only have umount the filesystem you
718repartition in your Linux session and run parted on it. 628want to repartition in your Linux session and run parted on it.
719</note> 629</note>
720 630
721<pre caption="Utility disk creation"> 631<pre caption="Utility disk creation">
722# <i>mkfs.minix /dev/fd0</i> 632# <i>mkfs.minix /dev/fd0</i>
723480 inodes 633480 inodes
727Maxsize=268966912 637Maxsize=268966912
728</pre> 638</pre>
729 639
730<p> 640<p>
731We will now proceed with the build of parted. If it's not already downloaded 641We will now proceed with the build of parted. If it's not already downloaded
732and untarred, do so now and cd into the corresponding directory. Now run the 642and untarred, do so now and <c>cd</c> into the corresponding directory. Now run
733following set of commands to build the utility and copy it to your floppy disk. 643the following set of commands to build the utility and copy it to your floppy
644disk.
734</p> 645</p>
735 646
736<pre caption="Building the utility floppy"> 647<pre caption="Building the utility floppy">
737# <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp; 648# <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp;
738export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure 649export CFLAGS="-O3 -pipe -fomit-frame-pointer -static" &amp;&amp; ./configure
739&amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i> 650&amp;&amp; make &amp;&amp; cp parted/parted /floppy &amp;&amp; umount /floppy </i>
740</pre> 651</pre>
741 652
742<p> 653<p>
743Congratulations, you are ready to reboot and resize your partition. Do this 654Congratulations, you are ready to reboot and resize your partition. Do this
744only after taking a quick look at the parted documentation on the GNU website. 655only after taking a quick look at the parted documentation on the GNU website.
745The resize should take under 30 minutes for the largest hard-drives, be 656The resize should take under 30 minutes for the largest hard-drives, be
746patient. Reboot your system with the mininux boot disk (just pop it inside), 657patient. Reboot your system with the mininux boot disk (just pop it inside),
747and once you are logged in, switch the disk in the drive with your utility disk 658and once you are logged in, switch the disk in the drive with your utility disk
748we have created above and type mount /dev/fd0 /floppy to have parted under 659we have created above and type <c>mount /dev/fd0 /floppy</c> to have parted
749/floppy. There you go. Run parted and you will be able to resize your 660under <path>/floppy</path>. There you go. Run parted and you will be able to
750partition. Once this lenghty process done, we are ready to have the real fun, 661resize your partition. Once this lenghty process done, we are ready to have the
751by installing Gentoo. Reboot back into your old Linux system for now. Drive you 662real fun, by installing Gentoo. Reboot back into your old Linux system for now.
752wish to operate on is the drive containing the partition we want to resize. For 663The drive you wish to operate on is the drive containing the partition we want
753example, if we want to resize /dev/hda3, the drive is /dev/hda 664to resize. For example, if we want to resize /dev/hda3, the drive is /dev/hda.
754</p> 665</p>
755 666
756<pre caption="Commands to run once logged into mininux system"> 667<pre caption="Commands to run once logged into mininux system">
757# <i>mount /dev/fd0 /floppy </i> 668# <i>mount /dev/fd0 /floppy </i>
758# <i>cd /floppy; ./parted [drive you wish to operate on]</i> 669# <i>cd /floppy; ./parted [drive you wish to operate on]</i>
759(parted) <i> print </i> 670(parted) <i> print </i>
760Disk geometry for /dev/hdb: 0.000-9787.148 megabytes 671Disk geometry for /dev/hdb: 0.000-9787.148 megabytes
761Disk label type: msdos 672Disk label type: msdos
762Minor Start End Type Filesystem Flags 673Minor Start End Type Filesystem Flags
7631 0.031 2953.125 primary ntfs 6741 0.031 2953.125 primary ntfs
7643 2953.125 3133.265 primary linux-swap 6753 2953.125 3133.265 primary linux-swap
7652 3133.266 5633.085 primary ext3 6762 3133.266 5633.085 primary ext3
7664 5633.086 9787.148 extended 6774 5633.086 9787.148 extended
7675 5633.117 6633.210 logical 6785 5633.117 6633.210 logical
7686 6633.242 9787.148 logical ext3 6796 6633.242 9787.148 logical ext3
769(parted) <i> help resize </i> 680(parted) <i> help resize </i>
770 resize MINOR START END resize filesystem on partition MINOR 681 resize MINOR START END resize filesystem on partition MINOR
771 682
772 MINOR is the partition number used by Linux. On msdos disk labels, the 683 MINOR is the partition number used by Linux. On msdos disk labels, the
773 primary partitions number from 1-4, and logical partitions are 5 684 primary partitions number from 1-4, and logical partitions are 5
775 START and END are in megabytes 686 START and END are in megabytes
776(parted) <i> resize 2 3133.266 4000.000 </i> 687(parted) <i> resize 2 3133.266 4000.000 </i>
777</pre> 688</pre>
778 689
779<impo> 690<impo>
780Be patient! The computer is working! Just look at the hardware LED on your case 691Be patient! The computer is working! Just look at the harddrive LED on your case
781to see that it is really working. This should take between 2 and 30 minutes. 692to see that it is really working. This should take between 2 and 30 minutes.
782</impo> 693</impo>
783 694
784<p> 695<p>
785Once you have resized, boot back into your old linux as described. Then go to 696Once you have resized, boot back into your old linux as described. Then go to
799</p> 710</p>
800 711
801</body> 712</body>
802</section> 713</section>
803</chapter> 714</chapter>
804
805</guide> 715</guide>

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.20