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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.52 - (hide annotations) (download) (as text)
Wed Apr 6 09:39:59 2005 UTC (9 years, 3 months ago) by neysx
Branch: MAIN
Changes since 1.51: +3 -3 lines
File MIME type: application/xml
<codenote> is being deprecated, replacing them with <comment> that should have been used anyway
***No content change***

1 zhen 1.3 <?xml version='1.0' encoding="UTF-8"?>
2 neysx 1.52 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/altinstall.xml,v 1.51 2005/02/19 16:25:21 swift Exp $ -->
3 antifa 1.12 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 drobbins 1.1
5 zhen 1.2 <guide link="/doc/en/altinstall.xml">
6 neysx 1.32
7 drobbins 1.1 <title>The Gentoo Linux alternative installation method HOWTO</title>
8 neysx 1.32
9     <author title="Contributor">
10     <mail link="gerrynjr@gentoo.org">Gerald Normandin Jr.</mail>
11     </author>
12     <author title="Contributor">
13     <mail link="lordviram@rebelpacket.net">Travis Tilley</mail>
14     </author>
15     <author title="Contributor">
16     <mail link="volontir@yahoo.com">Oleg Raisky</mail>
17     </author>
18     <author title="Contributor">
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">
34     <mail link="swift@gentoo.org">Sven Vermeulen</mail>
35     </author>
36     <author title="Reviewer">
37 swift 1.36 Ken Nowack <!-- antifa@gentoo.org seems out -->
38 neysx 1.32 </author>
39     <author title="Editor">
40     <mail link="blubber@gentoo.org">Tiemo Kieft</mail>
41     </author>
42 bennyc 1.37 <author title="Editor">
43     <mail link="bennyc@gentoo.org">Benny Chuang</mail>
44     </author>
45 neysx 1.32
46 drobbins 1.1 <abstract>
47     This HOWTO is meant to be a repository of alternative Gentoo installation
48     methods, for those with special installation needs such as lack of a cdrom
49 gerrynjr 1.14 or a computer that can't boot cds.
50 drobbins 1.1 </abstract>
51    
52 swift 1.21 <license/>
53    
54 swift 1.51 <version>0.59</version>
55     <date>2005-02-19</date>
56 gerrynjr 1.9
57 drobbins 1.1 <chapter>
58     <title>About this document</title>
59     <section>
60     <body>
61    
62 neysx 1.32 <p>
63     If the standard boot-from-CD install method doesn't work for you (or you just
64     don't like it), help is now here. This document serves to provide a repository
65     of alternative Gentoo Linux installation techniques to those who need them.
66     Or, if you prefer, it serves as a place to put your wacky installation methods.
67     If you have an installation method that you yourself find useful, or you have
68     devised an amusing way of installing Gentoo, please don't hesitate to write
69     something up and <mail link="antifa@gentoo.org">send it to me.</mail>
70     </p>
71 gerrynjr 1.9
72     </body>
73     </section>
74     </chapter>
75    
76     <chapter>
77     <title>Booting the LiveCD with Smart BootManager</title>
78     <section>
79 neysx 1.32 <body>
80 gerrynjr 1.9
81 neysx 1.32 <p>
82 swift 1.36 Download Smart BootManager available from
83     <uri>http://btmgr.sourceforge.net/download.html</uri>.
84 neysx 1.32 Linux source or binary format and windows .exe versions are available as well
85     as many language packs. However, at this time, the preferred method would be to
86     use the binary format, as the source will not compile with newer versions of
87     NASM.
88     </p>
89 gerrynjr 1.9
90 neysx 1.32 <p>
91     Either compile the package from source or just grab the binary. There are
92     several options that can be utilized while creating your boot floppy, as seen
93     below.
94     </p>
95 gerrynjr 1.9
96     <pre caption="Smart BootManager Options">
97 neysx 1.49 sbminst [-t theme] [-d drv] [-b backup_file] [-u backup_file]
98 gerrynjr 1.9
99 neysx 1.49 -t theme select the theme to be used, in which the theme could be:
100     us = English theme de = German theme
101     hu = Hungarian theme zh = Chinese theme
102     ru = Russian theme cz = Czech theme
103     es = Spanish theme fr = French theme
104     pt = Portuguese theme
105 gerrynjr 1.9
106    
107 neysx 1.49 -d drv set the drive that you want to install Smart BootManager on;
108     for Linux:
109     /dev/fd0 is the first floppy driver,
110     /dev/hda is the first IDE harddisk driver.
111     /dev/sda is the first SCSI harddisk driver.
112     for DOS:
113     0 is the first floppy drive
114     128 is the first hard drive;
115 gerrynjr 1.9
116     -c disable CD-ROM booting feature;
117    
118 gerrynjr 1.14 -b backup_file backup the data that will be overwritten for
119 gerrynjr 1.9 future uninstallation;
120    
121     -u backup_file uninstall Smart BootManager, should be used alone;
122    
123 neysx 1.49 -y do not ask any question or warning.
124 gerrynjr 1.9 </pre>
125    
126     <pre caption="Using sbminst to build the boot floppy">
127     # <i>sbminst -t us -d /dev/fd0</i>
128     </pre>
129    
130 neysx 1.32 <note>
131     Replace fd0 with your respective floppy device name if yours is different.
132     </note>
133    
134     <p>
135     Now simply place the floppy in the floppy drive of the computer you'd like to
136     boot the LiveCD on, as well as placing the LiveCD in the CD-ROM and boot the
137     computer.
138     </p>
139    
140     <p>
141     You'll be greeted with the Smart BootManager dialog. Select your CD-ROM and
142     press ENTER to boot the LiveCD. Once booted proceed with the standard
143     installation instructions.
144     </p>
145    
146     <p>
147     Further information on Smart BootManager may be found at
148     <uri>http://btmgr.sourceforge.net/</uri>
149     </p>
150 gerrynjr 1.9
151     </body>
152     </section>
153     </chapter>
154    
155     <chapter>
156     <title>Knoppix Installation</title>
157     <section>
158     <body>
159    
160 swift 1.51 <note>
161     Knoppix is only available for x86 users.
162     </note>
163    
164 neysx 1.32 <p>
165     Booting from the <uri link="http://www.knoppix.org/">Knoppix</uri> LiveCD is a
166     way to have a fully functional linux system while you're compiling Gentoo. Tux
167     Racer will help you pass the time while you wait for bootstrap.
168     </p>
169 gerrynjr 1.9
170 neysx 1.32 <p>
171     Boot from the Knoppix CD. It generally does a really good job of hardware
172     detection. Although, you may have to add some boot options.
173     </p>
174 gerrynjr 1.9
175 neysx 1.32 <p>
176     By default Knoppix boots into a KDE 3.0 desktop. The first thing I did was open
177     a konsole and typed <c>sudo passwd root</c>. This lets you set the root
178     password for Knoppix.
179     </p>
180 gerrynjr 1.9
181 neysx 1.32 <p>
182 bennyc 1.44 Next, I <c>su</c> to root and typed <c>usermod -d /root -m root</c>. This sets
183     user roots home directory to /root (the Gentoo way) from /home/root (the Knoppix
184 neysx 1.32 way). 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>
189     I then typed <c>exit</c> and then <c>su</c> back into root. This loads the
190     change that was made with the usermod command. Now create the
191     <path>/mnt/gentoo</path> mountpoint using <c>mkdir</c>:
192     </p>
193 swift 1.16
194 swift 1.22 <pre caption="Creating the /mnt/gentoo mountpoint">
195     # <i>mkdir /mnt/gentoo</i>
196     </pre>
197    
198 neysx 1.32 <p>
199     At this point, you can pick up with the standard install documentation at <uri
200     link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">part 4</uri>.
201     However, when you're asked to mount the proc system, issue the following
202     command instead:
203     </p>
204 swift 1.22
205 neysx 1.32 <pre caption="Bind-mounting the proc pseudo filesystem">
206 swift 1.16 # <i>mount -o bind /proc /mnt/gentoo/proc</i>
207     </pre>
208    
209 swift 1.50 <!--
210     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
212     a 50-50 chance of winning the gold strike.
213    
214    
215 swift 1.45 <p>
216     You will also need to bind-mount the device tree to resolve permission issues
217     with various device files.
218     </p>
219    
220 swift 1.50 < ! - -
221 swift 1.45 If this doesn't seem to work, #71901 mentions the following command:
222     mount -o remount,rw,nosuid /dev/hd* /mnt/hd*
223     before all. Looks weird to me, but if this doesn't work, we might want to try
224     that.
225 swift 1.50 - - >
226 swift 1.45
227     <pre caption="Bind-mounting the device tree">
228     # <i>mount -o bind /dev /mnt/gentoo/dev</i>
229     </pre>
230 swift 1.50 -->
231 swift 1.45
232 gerrynjr 1.9 </body>
233     </section>
234     </chapter>
235    
236     <chapter>
237     <title>Installing from Stage 1 without network access</title>
238     <section>
239     <body>
240    
241 neysx 1.32 <p>
242     Burn a LiveCD iso.
243     </p>
244 gerrynjr 1.9
245 neysx 1.32 <p>
246     Get the latest portage snapshot from
247     <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri>
248     (or your favorite <uri
249     link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri>). Either place
250     this tarball on an existing partition on the computer your are installing to,
251     or burn it to a CD.
252     </p>
253 gerrynjr 1.9
254 neysx 1.32 <p>
255     Follow 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 dertobi123 1.38 <c>docache</c> option while booting so you can unmount the LiveCD and mount
258 neysx 1.32 your portage snapshot CD.
259     </p>
260 gerrynjr 1.9
261 neysx 1.32 <p>
262     Open a new console (Alt-F2), we will continue with the Install Doc up to
263     running the bootstrap.sh script.
264     </p>
265 gerrynjr 1.9
266 neysx 1.32 <warn>
267     Older realeases of the livecd required you to change the password using the
268     <c>passwd</c> command, before logging in manually.
269 cam 1.47 </warn>
270 gerrynjr 1.9
271 neysx 1.32 <p>
272     Go 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
274 cam 1.47 unpack it to <path>/mnt/gentoo/usr</path>.
275 neysx 1.32 </p>
276 gerrynjr 1.9
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 cam 1.47 # <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 gerrynjr 1.9 </pre>
285    
286 neysx 1.32 <p>
287     Switch back to the F2 console. Now if you try to run bootstrap.sh it will fail
288     because it won't be able to download any files. We will fetch these files
289     somewhere else and put them in /usr/portage/distfiles (on F2 console).
290     </p>
291 gerrynjr 1.9
292 neysx 1.32 <p>
293     You need a list of Stage1 packages: glibc, baselayout, texinfo, gettext, zlib,
294     binutils, gcc, ncurses plus their dependencies.
295     </p>
296 gerrynjr 1.9
297 neysx 1.32 <note>
298     Note that you need the versions of each package synced with your portage tree.
299     </note>
300 gerrynjr 1.9
301 swift 1.27 <pre caption="Getting the download listing">
302 swift 1.26 <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 gerrynjr 1.9 # <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 swift 1.26 <p>
310     Take the floppy to the computer that has fast access. If you take a look at the
311 neysx 1.32 <path>stage1.list</path> file, you'll see that it provides you with several
312     URLs to download. Sadly, it lists several possible URLs for each package as
313     well, which isn't what you want. Strip all but one of the URLs first:
314 swift 1.26 </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>
323     Now use <c>wget</c> to fetch all the listed sources:
324     </p>
325 gerrynjr 1.9
326     <pre caption="Use wget to grab your source packages">
327 neysx 1.33 # <i>wget -N -i stage1.download</i>
328 gerrynjr 1.9 </pre>
329    
330 neysx 1.32 <p>
331     Once you have obtained all the files, take them to the computer and copy them
332     to <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
334     and 3.
335     </p>
336 gerrynjr 1.9
337 neysx 1.32 </body>
338     </section>
339     </chapter>
340 gerrynjr 1.9
341 neysx 1.32 <chapter>
342     <title>Diskless install using PXE boot</title>
343     <section>
344     <title>Requirements</title>
345     <body>
346 drobbins 1.1
347 neysx 1.32 <p>
348     You will need a network card on the diskless client that uses the PXE protocol
349     to boot, like many 3com cards. You will also need a BIOS that supports booting
350     from PXE.
351     </p>
352 drobbins 1.1
353     </body>
354     </section>
355 neysx 1.32 <section>
356     <title>Server base setup</title>
357 gerrynjr 1.9 <body>
358    
359 neysx 1.32 <p>
360     Create directories: The first thing to do is to create the directories where
361     your diskless system will be stored. Create a directory called
362     <path>/diskless</path> which houses a directory for each diskless client. For
363     the rest of this howto we'll be working on the client 'eta'.
364     </p>
365 gerrynjr 1.9
366     <pre caption="directory setup">
367     # <i>mkdir /diskless</i>
368     # <i>mkdir /diskless/eta</i>
369     # <i>mkdir /diskless/eta/boot</i>
370     </pre>
371    
372 neysx 1.32 <p>
373     DHCP and TFTP setup: The client will get boot informations using DHCP and
374     download all the required files using TFTP. Just emerge DHCP and configure it
375     for your basic needs. Then, add the following on
376     <path>/etc/dhcp/dhcpd.conf</path>.
377     </p>
378 gerrynjr 1.9
379 neysx 1.32 <note>
380     This provide a static IP address for the client and the path of a PXE boot
381     image, here pxegrub. You have to replace the MAC address of the Ethernet card
382     of the client and the directory where you will put the client files with the
383     one you use.
384     </note>
385 gerrynjr 1.9
386 swift 1.46 <p>
387     For DHCPd, run <c>emerge dhcp</c> (or any other DHCP server of your choice).
388     Make sure that the correct interface is selected in
389     <path>/etc/conf.d/dhcp</path>.
390     </p>
391    
392 gerrynjr 1.9 <pre caption="dhcp.conf">
393     option option-150 code 150 = text ;
394 swift 1.46 ddns-update-style none ;
395 gerrynjr 1.9 host eta {
396     hardware ethernet 00:00:00:00:00:00;
397 cam 1.24 fixed-address <i>ip.add.re.ss</i>;
398 gerrynjr 1.9 option option-150 "/eta/boot/grub.lst";
399     filename "/eta/boot/pxegrub";
400     }
401     </pre>
402    
403 neysx 1.32 <p>
404     For TFTP, emerge <c>app-admin/tftp-hpa</c>. In
405     <path>/etc/conf.d/in.tftpd</path>, put the following :
406     </p>
407 gerrynjr 1.9
408     <pre caption="in.tftpd">
409     INTFTPD_PATH="/diskless"
410     INTFTPD_USER="nobody"
411     INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"
412     </pre>
413    
414 neysx 1.32 <p>
415     Setup GRUB: To provide PXE booting I use GRUB. You have to compile it by
416     yourself to enable the PXE image compilation ... but that's quite easy. First,
417     get the latest version of the GRUB source code (<c>emerge -f grub</c> will
418     place 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
420     the binary is built, copy it to the diskless client's boot directory. Then edit
421     it's grub.lst config file.
422     </p>
423 gerrynjr 1.9
424     <pre caption="grub setup">
425     # <i>tar zxvf grub-0.92.tar.gz</i>
426     # <i>cd grub-0.92</i>
427     # <i>./configure --help</i>
428 swift 1.43 <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 gerrynjr 1.9 # <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>
435     # <i>nano -w /diskless/eta/boot/grub.lst</i>
436     </pre>
437    
438     <pre caption="grub.lst">
439     default 0
440     timeout 30
441    
442     title=Diskless Gentoo
443     root (nd)
444 cam 1.24 kernel /eta/bzImage ip=dhcp root=/dev/nfs nfsroot=<i>ip.add.re.ss</i>:/diskless/eta
445 drobbins 1.1
446 neysx 1.52 <comment>(For the nfsroot option, the IP address is the one of the server and
447     the directory is the one where your diskless client files are located on the server).</comment>
448 gerrynjr 1.9 </pre>
449    
450 neysx 1.32 <p>
451     Setup NFS: NFS is quite easy to configure. The only thing you have to do is to
452     add a line on the <path>/etc/exports</path> config file :
453     </p>
454 gerrynjr 1.9
455     <pre caption="/etc/exports">
456     # <i>nano -w /etc/exports</i>
457 neysx 1.32 # /etc/exports: NFS file systems being exported. See exports(5).
458 gerrynjr 1.9 /diskless/eta eta(rw,sync,no_root_squash)
459     </pre>
460    
461 neysx 1.32 <p>
462     Update your hosts: One important thing to do now is to modify your
463     <path>/etc/hosts</path> file to fit your needs.
464     </p>
465 gerrynjr 1.9
466     <pre caption="/etc/hosts">
467     127.0.0.1 localhost
468    
469     192.168.1.10 eta.example.com eta
470     192.168.1.20 sigma.example.com sigma
471     </pre>
472 neysx 1.32
473 gerrynjr 1.9 </body>
474     </section>
475 neysx 1.32 <section>
476     <title>Creating the system on the server</title>
477 gerrynjr 1.9 <body>
478    
479 neysx 1.32 <p>
480 swift 1.34 You might want to reboot the server with a Gentoo LiveCD, although you can
481     very well continue immediately if you know how to proceed with the Gentoo
482     Installation Instructions from an existing installation. Follow the standard
483     install procedure as explained in the Gentoo Install Howto BUT with the
484     following differences:
485     When you mount the file system, do the following (where hdaX is the partition
486     where you created the /diskless directory). You do not need to mount any other
487 neysx 1.32 partitions as all of the files will reside in the <path>/diskless/eta</path>
488     directory.
489     </p>
490 gerrynjr 1.9
491     <pre caption="mounting the filesystem">
492     #<i> mount /dev/hda3 /mnt/gentoo</i>
493     </pre>
494    
495 neysx 1.32 <p>
496     Stage tarballs and chroot: This example uses a stage3 tarball. Mount
497     <path>/proc</path> to your diskless directory and chroot into it to continue
498     with the install. Then follow the installation manual until kernel
499     configuration.
500     </p>
501 gerrynjr 1.9
502 neysx 1.32 <warn>
503     Be very careful where you extract your stage tarball. You don't want to end up
504     extracting over your existing installation.
505     </warn>
506 gerrynjr 1.9
507     <pre caption="extracting the stage tarball">
508     # <i>cd /mnt/gentoo/diskless/eta/</i>
509     # <i>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</i>
510     # <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>
512     # <i>chroot /mnt/gentoo/diskless/eta/ /bin/bash</i>
513     # <i>env-update</i>
514     # <i>source /etc/profile</i>
515     </pre>
516    
517 neysx 1.32 <p>
518     Kernel configuration: When you do the <c>make menuconfig</c> of your kernel
519     configuration, don't forget to enable the following options with the others
520     recommended into the install howto.
521     </p>
522 gerrynjr 1.9
523     <pre caption="menuconfig options">
524     - Your network card device support
525 swift 1.34 <comment>(In the kernel, *not* as a module!)</comment>
526 gerrynjr 1.9
527     - Under "Networking options" :
528    
529     [*] TCP/IP networking
530     [*] IP: kernel level autoconfiguration
531     [*] IP: DHCP support
532     [*] IP: BOOTP support
533    
534    
535     - Under "File systems --> Network File Systems" :
536    
537     &lt;*&gt; NFS file system support
538     [*] Provide NFSv3 client support
539     [*] Root file system on NFS
540     </pre>
541    
542 neysx 1.32 <p>
543 swift 1.43 Save the kernel in your chrooted <path>/</path> (not in <path>/boot</path>)
544     according to the pxegrub setting defined earlier. Next configure your
545     diskless client's <path>/etc/fstab</path>.
546 neysx 1.32 </p>
547 gerrynjr 1.9
548     <pre caption="/etc/fstab">
549     # <i>nano -w /etc/fstab</i>
550     /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
551     proc /proc proc defaults 0 0
552 vapier 1.41 tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
553 gerrynjr 1.9 </pre>
554    
555 neysx 1.32 <p>
556 swift 1.35 You also need to prevent the client to run a filesystem check:
557     </p>
558    
559     <pre caption="Preventing the client to run a filesystem check">
560     # <i>touch /fastboot</i>
561     # <i>echo "touch /fastboot" &gt;&gt; /etc/conf.d/local.start</i>
562     </pre>
563    
564     <p>
565 swift 1.43 Install <c>nfs-utils</c> since your client will heavily depend on it:
566     </p>
567    
568     <pre caption="Installing nfs-utils">
569     # <i>emerge nfs-utils</i>
570     </pre>
571    
572     <p>
573 neysx 1.32 Bootloader. Don't install another bootloader because we already have one -
574     pxegrub. Simply finish the install and restart the server. Start the services
575     you'll need to boot the new client: DHCP, TFTPD, and NFS.
576     </p>
577 gerrynjr 1.9
578     <pre caption="Starting services">
579     # <i>/etc/init.d/dhcp start</i>
580 swift 1.43 # <i>/etc/init.d/in.tftpd start</i>
581 gerrynjr 1.9 # <i>/etc/init.d/nfs start</i>
582     </pre>
583    
584 neysx 1.32 </body>
585     </section>
586     <section>
587     <title>Booting the new client</title>
588     <body>
589 gerrynjr 1.9
590 neysx 1.32 <p>
591     For the new client to boot properly, you'll need to configure the bios and the
592     network card to use PXE as the first boot method - before CD-ROM or floppy. For
593     help with this consult your hardware manuals or manufacturers website. The
594     network card should get an IP address using DHCP and download the GRUB PXE
595     image using TFTP. Then, you should see a nice black and white GRUB bootmenu
596     where you will select the kernel to boot and press Enter. If everything is ok
597     the kernel should boot, mount the root filesystem using NFS and provide you
598     with a login prompt. Enjoy.
599     </p>
600 gerrynjr 1.9
601 neysx 1.32 </body>
602     </section>
603 gerrynjr 1.9 </chapter>
604 drobbins 1.1
605 neysx 1.32 <chapter>
606     <title>Installing Gentoo from an existing Linux distribution</title>
607     <section>
608     <title>Requirements</title>
609     <body>
610 drobbins 1.1
611 neysx 1.32 <p>
612     In order to install Gentoo from your existing Linux distribution you need to
613 drobbins 1.1 have chroot command installed, and have a copy of the Gentoo installation
614     tarball or ISO you want to install. A network connection would be preferable if
615     you want more than what's supplied in your tarball. (by the way, a tarball is
616     just a file ending in .tbz or .tar.gz). The author used RedHat Linux 7.3 as the
617 neysx 1.32 "host" operating system, but it is not very important. Let's get started!
618     </p>
619    
620 drobbins 1.1 </body>
621     </section>
622 neysx 1.32 <section>
623     <title>Overview</title>
624     <body>
625    
626     <p>
627     We will first allocate a partition to Gentoo by resizing our existing Linux
628     partition, mount the partition, untar the tarball that is mounted, chroot
629     inside the psuedo-system and start building. Once the bootstrap process is
630     done, we will do some final configuration on the system so as to make sure it
631     boots, then we are ready to reboot and use Gentoo.
632     </p>
633 drobbins 1.1
634     </body>
635     </section>
636 neysx 1.32 <section>
637     <title>How should we make space for Gentoo?</title>
638 drobbins 1.1 <body>
639    
640     <p>
641 neysx 1.32 The root partition is the filesystem mounted under <path>/</path>. A quick run
642     of mount on my system shows what I am talking about. We well also use df (disk
643     free) to see how much space I have left and how I will be resizing. Note that
644     it is not mandatory to resize your root partition! You could be resizing
645     anything else supported by our resizer, but let's talk about that later.
646     </p>
647 drobbins 1.1
648     <pre caption="Filesystem information">
649     # <i>mount</i>
650 vapier 1.41 /dev/hdb2 on / type ext3 (rw)
651     none on /proc type proc (rw)
652     none on /dev/pts type devpts (rw,gid=5,mode=620)
653     none on /dev/shm type tmpfs (rw,nodev,nosuid,noexec)
654 drobbins 1.1 # <i>df -h </i>
655     Filesystem Size Used Avail Use% Mounted on
656     /dev/hdb2 4.0G 1.9G 2.4G 82% /
657 neysx 1.49 none 38M 0 38M 0% /dev/shm
658 drobbins 1.1 </pre>
659    
660 neysx 1.32 <p>
661     As 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
663     resize it as to leave 400Megs free of space, therefore allocating 2 gigabytes
664     for Gentoo. Not bad, I could have quite some stuff installed. However, think
665     that even one gigabyte is enough for most users. So let's partition this thing!
666     </p>
667 drobbins 1.1
668 swift 1.21 </body>
669     </section>
670     <section>
671     <title>Building parted to resize partition</title>
672 drobbins 1.1 <body>
673 swift 1.21
674     <p>
675 neysx 1.32 Parted is an utility supplied by the GNU foundation, an old and respectable
676     huge project whose software you are using in this very moment. There is one
677     tool, however, that is extremely useful for us at the moment. It's called
678     parted, partition editor and we can get it from
679     <uri>http://www.gnu.org/software/parted/</uri>
680 drobbins 1.1 </p>
681 swift 1.21
682     <note>
683 neysx 1.32 There are other tools for doing resize of partitions as well, but author is
684     unsure/uninterested whether PartitionMagic(tm) or other software of the kind do
685     the job. It's the reader's job to check them out
686 swift 1.21 </note>
687 drobbins 1.1
688     <p>
689 neysx 1.32 Look up on that page the type of filesystem you want to resize and see if
690     parted can do it. If not, you're out of luck, you will have to destroy some
691     partition to make space for Gentoo, and reinstall back. Go ahead by downloading
692     the software, install it. Here we have a problem. We want to resize our Linux
693     root partition, therefore we must boot from a floppy disk a minimal linux
694     system and use previously-compiled parted copied to a diskette in order to
695     resize <path>/</path>. However, if you can unmount the partition while still
696     in Linux you are lucky, you don't need to do what follows. Just compile parted
697     and run it on an unmounted partition you chose to resize. Here's how I did it
698     for my system.
699 drobbins 1.1 </p>
700    
701 swift 1.21 <impo>
702 neysx 1.32 Make sure that the operations you want to do on your partition are supported by
703     parted!
704 swift 1.21 </impo>
705 drobbins 1.1
706 swift 1.21 <p>
707 neysx 1.49 Get the mininux boot/root disk (a 2.4-powered mini Linux distribution on a
708     floppy - free of charge) from <uri>http://mininux.free.fr/uk/</uri>, create a
709     floppy as suggested in the Documentation that accompanies the software package
710     and insert a new floppy in the drive for the next step.
711 swift 1.21 </p>
712 drobbins 1.1
713 swift 1.21 <note>
714     Note again that Linux is synonym of "There's one more way to do it". Your
715 drobbins 1.1 objective is to run parted on an unmounted partition so it can do its work. You
716 swift 1.48 might use some other boot/root diskset other than mininux. You might not even
717 drobbins 1.1 need to do this step at all, that is only umount the filesystem you want to
718 swift 1.21 repartition in your Linux session and run parted on it.
719     </note>
720 drobbins 1.1
721     <pre caption="Utility disk creation">
722     # <i>mkfs.minix /dev/fd0</i>
723     480 inodes
724     1440 blocks
725     Firstdatazone=19 (19)
726     Zonesize=1024
727     Maxsize=268966912
728     </pre>
729    
730 swift 1.21 <p>
731 neysx 1.32 We will now proceed with the build of parted. If it's not already downloaded
732     and untarred, do so now and cd into the corresponding directory. Now run the
733     following set of commands to build the utility and copy it to your floppy disk.
734 swift 1.21 </p>
735 drobbins 1.1
736     <pre caption="Building the utility floppy">
737     # <i> mkdir /floppy; mount -t minix /dev/fd0 /floppy &amp;&amp;
738     export 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>
740     </pre>
741    
742     <p>
743 neysx 1.32 Congratulations, you are ready to reboot and resize your partition. Do this
744     only after taking a quick look at the parted documentation on the GNU website.
745     The resize should take under 30 minutes for the largest hard-drives, be
746 swift 1.48 patient. Reboot your system with the mininux boot disk (just pop it inside),
747 neysx 1.32 and once you are logged in, switch the disk in the drive with your utility disk
748     we have created above and type mount /dev/fd0 /floppy to have parted under
749     /floppy. There you go. Run parted and you will be able to resize your
750     partition. Once this lenghty process done, we are ready to have the real fun,
751     by installing Gentoo. Reboot back into your old Linux system for now. Drive you
752     wish to operate on is the drive containing the partition we want to resize. For
753 swift 1.8 example, if we want to resize /dev/hda3, the drive is /dev/hda
754     </p>
755 drobbins 1.1
756 swift 1.48 <pre caption="Commands to run once logged into mininux system">
757 drobbins 1.1 # <i>mount /dev/fd0 /floppy </i>
758     # <i>cd /floppy; ./parted [drive you wish to operate on]</i>
759     (parted) <i> print </i>
760     Disk geometry for /dev/hdb: 0.000-9787.148 megabytes
761     Disk label type: msdos
762     Minor Start End Type Filesystem Flags
763     1 0.031 2953.125 primary ntfs
764     3 2953.125 3133.265 primary linux-swap
765     2 3133.266 5633.085 primary ext3
766     4 5633.086 9787.148 extended
767     5 5633.117 6633.210 logical
768     6 6633.242 9787.148 logical ext3
769     (parted) <i> help resize </i>
770     resize MINOR START END resize filesystem on partition MINOR
771    
772     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
774     onwards.
775     START and END are in megabytes
776     (parted) <i> resize 2 3133.266 4000.000 </i>
777     </pre>
778    
779 neysx 1.32 <impo>
780     Be patient! The computer is working! Just look at the hardware LED on your case
781     to see that it is really working. This should take between 2 and 30 minutes.
782     </impo>
783 drobbins 1.1
784 neysx 1.32 <p>
785     Once you have resized, boot back into your old linux as described. Then go to
786     <uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=4">The Gentoo
787     Handbook: Preparing the Disks</uri> and follow the instructions. When
788     chrooting, use the following command to flush your environment:
789 swift 1.17 </p>
790 drobbins 1.1
791 neysx 1.32 <pre caption="Flushing the environment during chroot">
792 swift 1.39 # <i>env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash</i>
793 swift 1.42 # <i>/usr/sbin/env-update</i>
794 swift 1.40 # <i>source /etc/profile</i>
795 swift 1.17 </pre>
796 drobbins 1.1
797 swift 1.17 <p>
798 drobbins 1.1 Enjoy!
799     </p>
800 neysx 1.32
801 drobbins 1.1 </body>
802     </section>
803     </chapter>
804 neysx 1.32
805 drobbins 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20