/[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.18 Revision 1.19
19This HOWTO is meant to be a repository of alternative Gentoo installation 19This HOWTO is meant to be a repository of alternative Gentoo installation
20methods, for those with special installation needs such as lack of a cdrom 20methods, for those with special installation needs such as lack of a cdrom
21or a computer that can't boot cds. 21or a computer that can't boot cds.
22</abstract> 22</abstract>
23 23
24<version>0.34</version> 24<version>0.35</version>
25<date>September 25, 2003</date> 25<date>October 31, 2003</date>
26 26
27<license/> 27<license/>
28 28
29<chapter> 29<chapter>
30<title>About this document</title> 30<title>About this document</title>
353 353
354</body> 354</body>
355</section> 355</section>
356</chapter> 356</chapter>
357 357
358<chapter>
359<title>Netboot install</title>
360<section>
361<title>Requirements</title>
362<body>
363<p>The requirements for a netboot install are a host computer than can
364provide a tftp server and a computer
365that can netboot itself via either bios or a floppy drive used to boot GRUB
366or another network bootloader. A dhcp server might also be necessary. Of
367course, you will also need the latest build ISO, which can be found at
368<uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/releases/</uri></p>
369<note>Due to changes in the LiveCD, this procedure will only work for the 1.2 LiveCD. </note>
370</body>
371</section>
372
373<section>
374<title>Overview</title>
375<body>
376
377<p>In order to load images off the network, the first thing a netboot machine
378must do is obtain an IP address. There are multiple ways of obtaining
379an IP address, and any
380one of them will do. Personally, I prefer to use GRUB for everything, but if
381your computer supports booting from a network already then grub might not
382be necessary, even if it might be easier to just use GRUB's <c>ifconfig</c> command
383instead of setting up a bootp or dhcp server.</p>
384
385<p>Once your computer has obtained an IP address, the next logical step is to find
386out what you are going to be booting and where it might be held. Once again,
387it would be easiest to do this with GRUB commands as opposed to setting up
388a bootp or dhcp server. You will also need to specify how to obtain an initrd
389and tell the kernel that it will be using this as it's root filesystem.</p>
390
391<p>With your kernel loaded and root filesystem mounted, you may proceed
392with installation as normal. The build image could be loaded from a cd, or it
393can be downloaded from the network via tftp.</p>
394
395</body>
396</section>
397<section>
398<title>Using GRUB</title>
399<body>
400
401<p>To use GRUB for network booting purposes, you must first have GRUB
402compiled with support for your network card. It doesn't matter if you install
403to floppy, or to the hard drive of the computer you wish to install Gentoo
404on. If your install target already has GRUB with network support installed,
405then you are one step ahead. GRUB can be downloaded from
406<uri>ftp://alpha.gnu.org/gnu/grub/</uri></p>
407
408<p>A configure example for enabling tulip support, the network card in my
409box:</p>
410
411<pre caption="Manual GRUB installation">
412# <i>./configure --enable-tulip --prefix=/usr</i>
413# <i>make &amp;&amp; make install</i>
414</pre>
415
416<p>If you are currently in Gentoo and wish to install GRUB using Gentoo
417tools, then you need to install step by step in order to configure in support
418for your network card. An example for using ebuild to install GRUB with
419tulip support:</p>
420
421<pre caption="Installing and configuring GRUB on Gentoo Linux">
422# <i>ebuild /usr/portage/sys-apps/grub/grub-0.91.ebuild clean fetch unpack</i>
423# <i>cd /var/tmp/portage/grub-0.91/work/grub-0.91/</i>
424# <i>./configure --prefix=/usr --sbindir=/sbin --mandir=/usr/share/man \ </i>
425> <i>--infodir=/usr/share/info --enable-tulip</i>
426# <i>make</i>
427# <i>touch /var/tmp/portage/grub-0.91/.compiled</i>
428# <i>cd /usr/portage/</i>
429# <i>ebuild sys-apps/grub/grub-0.91.ebuild install merge</i>
430</pre>
431
432<p>Now that we have the GRUB shell itself installed, we need to install to
433a boot sector. Although you could install GRUB to the boot sector of your
434install computer's hard drive, here we will assume that you are installing
435GRUB on a boot floppy. There are two ways of doing this. You can use the GRUB
436shell itself, or you can use a provided script called <c>grub-install</c>. It is
437preferable to use <c>grub-install</c> when installing GRUB to a floppy.</p>
438
439<pre caption="grub-install example">
440# <i>mkfs.ext2 /dev/fd0</i>
441# <i>mount /dev/fd0 /mnt/floppy/</i>
442# <i>grub-install --root-directory=/mnt/floppy/ '(fd0)'</i>
443# <i>umount /mnt/floppy/</i>
444</pre>
445
446<p><c>grub-install</c> does not always work... and isn't always the best way to install
447GRUB. And since the GRUB shell works exactly like GRUB would when booted
448via the boot sector, it might be more desirable just to use the GRUB shell. Here
449is an example of how to use the GRUB shell to install GRUB to a floppy:</p>
450
451<pre caption="Using the GRUB shell instead">
452# <i>mkfs.ext2 /dev/fd0</i>
453# <i>mount /dev/fd0 /mnt/floppy/</i>
454# <i>mkdir -p /mnt/floppy/boot/grub/</i>
455# <i>cp -v /usr/share/grub/i386-pc/* /mnt/floppy/boot/grub/</i>
456# <i>grub</i>
457grub> <i>root (fd0)</i>
458grub> <i>setup (fd0)</i>
459grub> <i>quit</i>
460# <i>umount /mnt/floppy/</i>
461</pre>
462
463<p>Now that we have a bootable GRUB floppy, we need to set up the host tftp server
464(I suggest netkit's tftp server)
465for loading our kernel and initrd. If you use inetd then you will need
466a line in your <path>/etc/inetd.conf</path> that looks
467like this:</p>
468
469<pre caption="/etc/inetd.conf">
470tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd
471</pre>
472
473<p>To install the netkit tftp server under Gentoo Linux, emerge net-misc/netkit-tftp</p>
474
475<note>There is an ebuild for xinetd... if you prefer to use this than feel free to do
476so. However I do not use xinetd, and do not know how to set up tftp with it. If you
477use it and such, please send me info on how to get xinetd working and I will include
478them in this howto.</note>
479
480<p>Now that we have our tftp server ready, we need a kernel and a root initrd to
481put in it. You can compile a custom kernel yourself, but make sure it has all the
482things necessary for running Gentoo (like devfs) and for netbooting (like initrd
483support). The root initrd will be the rescue.gz included in the Gentoo ISO.</p>
484
485<impo>Mounting an ISO file without burning it to cd requires loopback filesystem
486support.</impo>
487
488<pre>
489# <i>mkdir /tftpboot</i>
490# <i>mount -o loop /path/to/gentoo-ix86-1.1a.iso /mnt/cdrom/</i>
491# <i>cp /mnt/cdrom/isolinux/kernel /mnt/cdrom/isolinux/rescue.gz /tftpboot</i>
492# <i>chmod 644 /tftpboot/*</i>
493# <i>umount /mnt/cdrom/</i>
494</pre>
495
496<p>Boot the machine you want to install to with your incredibly useful grub floppy.
497Once booted you need to specify a way for the machine to get
498its IP address, specify where
499to get a kernel and it's options, and where to get it's initrd.</p>
500
501<pre>
502grub> <i>ifconfig --address=<c>ip.add.re.ss</c> --server=<c>ip.add.re.ss</c></i>
503grub> <i>root (nd)</i>
504grub> <i>kernel /tftpboot/kernel devfs=nomount vga=normal load_ramdisk=1 </i>
505 <i>prompt_ramdisk=0 ramdisk_size=24000 root=/dev/ram0 rw</i> <comment>(all on one line)</comment>
506grub> <i>initrd /tftpboot/rescue.gz</i>
507grub> <i>boot</i>
508</pre>
509
510<note>You can also use bootp and dhcp to configure your ip via grub. Use the bootp
511and dhcp commands.</note>
512
513<p>Now that you have your machine booted, you can install as normal. Refer to the
514from source cd install howto.</p>
515
516</body>
517</section>
518</chapter>
519
520<chapter><title>Diskless install using PXE boot</title> 358<chapter><title>Diskless install using PXE boot</title>
521 359
522<section><title>Requirements</title> 360<section><title>Requirements</title>
523<body> 361<body>
524<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> 362<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>

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20