Differences between version 20 and predecessor to the previous major change of TFTPInstall.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 20 | Last edited on Friday, July 7, 2006 8:51:59 am | by AristotlePagaltzis | Revert |
Older page: | version 19 | Last edited on Friday, June 9, 2006 8:24:18 am | by AristotlePagaltzis | Revert |
@@ -1,81 +1,62 @@
-See also LinuxInstallationNotes
-----
+''Note: this page was previously way outdated. Now it is merely incomplete, inconsistent and untested. Uh, yeah.''
-!!How to install GNU/
Linux by using
TFTP as the boot method
+!
!! How to install [
Linux]
by booting it from [
TFTP]
-Today I tried to install Debian Woody on
a machine with no CD
-ROM drive and a broken floppy
. Rather than steal a drive from another machine
, I thought
it would
be a piece of cake
to use
the TFTP method
. Boy was I wrong. :( I got it to work in
the end though,
and it works very nicely
.
+* The client should have
a [PXE] boot
-[
ROM]
. If it doesn't
, it might still
be possible
to do this – read
the notes at the [PXE] page about booting [PXE] off a FloppyDisk
. Otherwise, ~EtherBoot is very widely supported, but
the install process for ~EtherBoot is slightly different
and not documented here
.
-''(Although I did this with Debian, it should work just as well with any of
the [LinuxDistribution
]s)''
+ Set up the client
's [BIOS] to boot from
the [LAN
]. How to do this depends on your [BIOS] and [NIC].
-----
+* Then, of course, you need a [TFTP] server:
-!Before you begin
, you will need:
-* A network of some description
+ # Install the [TFTP] [Package]s
, such as <tt>tftpd-hpa</tt> or <tt>atftpd</tt> on [Debian].
-* A __Server__
-** A Linux box on
the network running
the following services:
-*** DHCP server (Debian package __dhcp__)
-*** TFTP server (Debian package __tftpd-hpa__)
-*** NFS server to share the Debian CD (Debian package __nfs-kernel-server__ or __nfs-user-server__). (FTP or HTTP would work just as well
.)
+ # Create a directory for
the tftpboot files. <tt>/tftpboot</tt> is
the standard location
.
-* A __Client__
-** A networkable box that you want to do
the install on. It will need to have a
[PXE] BootROM installed
. If your card doesn't have a PXE bootrom, it might still be possible - read the notes at [PXE
] to see about booting [PXE] off a floppy disk
. Otherwise, EtherBoot is very widely supported, but the install process for EtherBoot is slightly different (And not documented below)
+ ''See
the [PXELINUX homepage | http://syslinux
.zytor.com/pxe.php
] for which files
to copy here
.''
-* Software
-** [BpBatch | http:
//www
.pointless.nl
/~peter/docs/remote/bpbatch/bpb-2000-11-02.tar.gz]
-** Linux kernel (e.g. /path
/to/debian-cd-1/dists/woody/main/disks-i386/current/idepci/linux.bin)
-** Root disk image (e.g. /path/to/debian-cd-1/dists/woody/main/disks-i386/current/images-1.44/idepci/root.bin) You want Kernel 2.2! - It wont work with bf2.4 as BpBatch will claim some wrong kernel compression format (1) with linux.bin
-----
+ # Edit <tt>
/etc
/inetd
.conf<
/tt> and change the <tt>tftpd<
/tt> line
to something like this:
-!Method:
-# Setup tftp server:
-## Install the package. I used __tftpd-hpa__ but __atftpd__ is rumored to work too. Standard __tftpd__ will not work as it doesn't support some of the options PXE booting requires
-## Create a directory for the tftpboot files. /tftpboot is the standard location.
-## Edit /etc/inetd.conf and change the tftpd line to:%%% %%%
tftp dgram udp wait root /root /usr/sbin/in.tftpd in.tftpd -vvv -p -u nobody -s /tftpboot%%% %%%
-## Restart inetd ("killall -HUP inetd")%%% %%%
-# Add the tftpboot files:
-## Copy the __Linux kernel__ (linux.bin) and __Root image__ (root.bin) into
/tftpboot
-## Extract the BpBatch tarball and copy __bpbatch{.P,.hlp,.ovl}__ into /tftpboot
-## Create a text file called __debian.bpb__ in /tftpboot. It should contain the following:%%% %%%!ShowLog%%% %%%set !CacheNever = "ON"%%% %%%!LinuxBoot "linux.bin" "" "root.bin"%%% %%%
-# Setup dhcp server:
-## Edit /etc/dhcpd.conf. Here is a sample:%%% %%%option domain-name "example.com";%%%option domain-name-servers ns1.example.com;%%%option subnet-mask 255.255.255.;%%%default-lease-time 600;%%%max-lease-time 7200;%%% %%%subnet 192.168.1.0 netmask 255.255.255.0 {%%%range 192.168.1.200 192.168.1.253;%%%option routers 192.168.1.1;%%%}%%% %%%host clientname {%%%hardware ethernet 01:23:45:67:89:AB;%%%fixed-address 192.168.1.90;%%%filename "bpbatch.P";%%%option option-135 "debian";%%%}%%% %%%
-## Restart dhcpd ("/etc/init.d/dhcp restart")%%% %%%
-# Setup the NFS, FTP or HTTP server, depending on how you want to share the Debian CD. (I'll leave this as an exercise for the reader :)%%% %%%
-# Configure the client's BIOS to boot from the LAN. (How to do this depends on your BIOS and network card.)
+ <verbatim>
+
tftp dgram udp wait root /root /usr/sbin/in.tftpd in.tftpd -vvv -p -u nobody -s /tftpboot
+ <
/verbatim>
-!That's it. Now boot the client and you should get the Debian installer.
+ Then restart inetd(8): <tt>killall -HUP inetd</tt>
-----
+* As with any network
-based boot, you will also need a [DHCP] server:
-!How this actually works:
-
# The __Client__ computer starts up and its [PXE] BootROM is loaded.
-# The BootROM contacts the DHCP server and is given an IP address and the filename to download from the TFTP server.
-# The BootROM downloads the file (bpbatch.P) and executes it.
-# BpBatch downloads its .hlp (help text) and .ovl files.
-# BpBatch downloads the bpb script (debian.bpb) as given by option-135 in the
dhcpd.conf.
-# The bpb script tells BpBatch to download the kernel and root image from the TFTP server and then boot the kernel.
-# The kernel image loads the root image and the installation process starts.
+
# Edit <tt>/etc/
dhcpd.conf</tt>
. Here is a sample:
-----
+ <verbatim>
+ option domain
-name "example.com";
+ option domain
-name
-servers ns1.example.com;
+ option subnet
-mask 255.255.255.;
+ default-lease-time 600;
+ max-lease-time 7200;
-!Why use BpBatch when Debian provides a tftpboot
.img?
-For some reason I couldn't get my box to boot the tftpboot
.img
. The image I was using was just over 650K and my [PXE] BootROM complained that it couldn't fit into memory
. BpBatch is an extremely powerful boot loader which is able to load the kernel and root image into extended memory
.
+ subnet 192
.168.1.0 netmask 255.255.255.0 {
+ range 192
.168
.1
.200 192
.168.1.253;
+ option routers 192.168.1.1;
+ }
-This example doesn't even begin to show off some of the features of BpBatch
. It can also partition and wipe drives on the fly and download and install full hard disk images
. Combined with its GUI menu and password authentication support, it can be used to make multi-OS kiosk or network terminals
. If you want to read more about using BpBatch in this context, read the [Linux Remote-Boot mini-HOWTO: Configuring Remote-Boot Workstations with Linux, DOS, Windows 95/98 and Windows NT|http://cui
.unige.ch/info/pc/remote
-boot
/howto.html]
+ host clientname {
+ hardware ethernet 01:23:45:67:89:AB;
+ fixed-address 192
.168
.1
.90;
+ filename "bpbatch
.P";
+ option option
-135 "debian";
+ }
+ <
/verbatim>
-!Alternatives to BPBatch
:
-PXELinux, a SysLinux based bootloader for PXE, also works very well here
. Simply grab the tftpboot.img and the root.bin you wish to install from and add a PXELinux config fragment like the one below, and it all works fine and dandy
+ Then restart dhcpd(8)
: <tt>/etc/init
.d/dhcp restart</tt>
- label bf24
- kernel tftpboot
.img
- append console=null initrd=root
.bin root=/dev/ram flavor=bf2
.4
+* Finally, you need to share the install media somehow
. Set up an [NFS], [FTP] or [HTTP] server, depending on your preferences
. This is left as an exercise for the reader
. :)
-Note:
the flavor setting is important if
you are using one of the debian woody flavours, as otherwise it will try to
get the wrong drivers packages from the mirror
+Now boot
the client and
you should
get the [OS] installer.
-!I cant
use the network to continue with a tftp
install
-This probably means your boot kernel doesn't have drivers for your network card compiled in. The PXE rom can happily download your kernel and initrd, but once it gives control over to the kernel, the kernel needs to know about your network card.
-For example, the bf2.4 boot flavour for debian woody only has a limited set of drivers - ne2k-pci, realtek 8139 and 8029, and a handful of others. It doesn't have any 3com or intel drivers, for example, compiled in.
+!! If you can't
use the network to continue with a [TFTP]
install…
-Solution? Use another boot flavour -
the compact boot flavour has
a wider range of drivers compiled in, so probably has the driver for your NIC
. Remember --
this is *
only* your
boot kernel
. You
can install whichever other kernel
you like.
+…then you probably didn’t supply
the [Kernel] with a DeviceDriver for your [NIC]. The [PXE] [ROM] can happily download your [Kernel] and InitialRamDisk, but once it gives control over to the [Kernel], the [Kernel] needs to know about your network card. In that case, just pick a different kernel image with
a wider range of drivers compiled in. (
Remember,
this is ''
only to
boot the install''
. Once that comes up, you
can always
install whichever other [Kernel]
you like.) Or else you can build your own boot [Kernel]
.
-Or else you can build your own boot kernel for this. The instructions in the debian installation guide on
[Replacing the Rescue Kernel|http://www.debian.org/releases/stable/i386/ch-boot-floppy-techinfo.en.html#s-rescue-replace-kernel
] should help you here.
+!! See also
+
+*
[PXE
]
+* LinuxInstallationNotes