File: README

package info (click to toggle)
nfsboot 0.0.12
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 88 kB
  • ctags: 7
  • sloc: sh: 75; makefile: 48
file content (222 lines) | stat: -rw-r--r-- 6,902 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
DocumentId:	$Id: README,v 1.6 2004/08/30 07:25:59 ola Exp $
Author:		$Author: ola $
		Ola Lundqvist <opal@debian.org>
Date:		$Date: 2004/08/30 07:25:59 $
Summary:
	Describes how to set up a server to serve nfs booted clients.


Introduction:
=============

There are a couple of things that needs to be correctly set up in order
to make nfs booted clients work.

On the server side:
-------------------

On the server side you have to have a couple of things set up.

* tftpd
  The server that transfers the initial bootloader and kernel images to the
  client.

* nfs-server
  The server that holds the root file system. The nfs server should really
  support nfs version 3. If not the client will not work properly.

* dhcp
  A bootp/dhcp server that configure the network for each client, and tell
  where to find the tftp and nfs-server.

  Both dhcp and bootp will be needed. The dhcp package can handle both, see
  below for more information about how to configure it.

* bootloader
  You also need a bootloader (like grub) that can be used to load the initial
  kernel. This is needed if you have a PXE loader in order to load the
  kernel properly. The the documentation for the netboot package if you have
  a network card that does not use PXE.

* client-kernel
  You have to compile a special kernel that have nfsroot enabled and the
  network driver added (not as a module). This kernel should not be
  runned by the server, just loaded by the client. If should also have
  boot from network enabled, either via bootp, rarp or dhcp.

* server-kernel
  If you use the nfs-kernel-server you have to use a kernel that allows
  you to have nfs version 3 enabled.

* image
  You have to make a debian image on the server that the client can use
  to boot from. This can be done using debootstrap. But you should use the
  same version of debian (ie, libc) on the image and server when creating
  the image because ldconfig will affect both images.

* dns
  You also have to have a dns server that can deliver the computername via
  reverse lookup. Dhcp-dns can make this work fine automaticly.

On the client side:
-------------------

* boot-prom
  Your network card have to have a boot-prom that can be loaded with
  code that allows network boot. Some cards support this by default, like
  the Intel Ethernet Express card (uses PXE).


Configuration:
==============


Dhcp:
-----

The /etc/dhcpd.conf file should look something like this:

# First some initial configuration.
option domain-name "foo.net";
option domain-name-servers 192.168.1.1;
option subnet-mask 255.255.255.0;
default-lease-time 3600;
max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 {
  # For boot use 192.168.1.192 -> 192.168.1.253 (hosts below)
  range 192.168.1.128 192.168.1.191;
  option broadcast-address 192.168.1.255;
  option routers 192.168.1.254;
  next-server 192.168.1.2;
  # The boot loader to be used, located in /boot, or any other place that
  # the tftp daemon points to.
  filename "pxegrub";

  # Needed for PXE.
  option dhcp-class-identifier "PXEClient";
  option vendor-encapsulated-options 01:04:00:00:00:00:ff;
  option option-132 "workgroup";

  # The grub config file.
  option option-150 "/rboot/desktops";

  use-host-decl-names on;
}

# Each host have to have a hardcoded bootp address if the kernel should
# be able to resolve it automaticly. If you do not add this you have
# to add that to the bootline in grub.

host opal {
  hardware ethernet 00:cc:cc:cc:0e:94;
#  option option-150 "/rboot/desktops";
  fixed-address 192.168.1.192;
}

Nfs:
----

You have to export the image directory to the clients. So you have to add
something like the following to the /etc/exports file.

/home 192.168.1.0/255.255.255.0(rw,insecure_locks,no_root_squash)
/images 192.168.1.0/255.255.255.0(rw,insecure_locks,no_root_squash)


Grub:
-----

If you use grub you have to recompile it to add support for the bootloader
you like. Maybe this have been changed but I have not had the time to check.

Download it from http://www.gnu.org/software/grub/ and recompile to make
a pxegrub binary that can be loaded by the client via tftp. Documentation
is available in the netboot directory.

The grub config file (in for example /boot/desktops) should look something
like this:

# Config file for debian.
default 0
# 15 sec timeout, then use the default.
timeout 5
#
color cyan/blue blue/cyan
fallback 0

title Netboot linux 2.4.2
root (nd)
# Points to the compiled kernel that have devfs loaded. The ip option is
# not needed for such early kernel.
kernel /boot/vmlinuz-2.4.2 root=/dev/nfs nfsroot=192.168.1.1:/images/debianclient devfs=mount vga=extended 
boot

title Netboot linux 2.4.18
root (nd)
# Points to the compiled kernel that have devfs loaded.
kernel /boot/vmlinuz-2.4.2 root=/dev/nfs nfsroot=:/images/debianclient devfs=mount vga=extended ip=::::::
boot

title Netboot linux 2.4.18-clientspecific
root (nd)
# Points to the compiled kernel that have devfs loaded.
kernel /boot/vmlinuz-2.4.2 root=/dev/nfs nfsroot=:/images/%s devfs=mount vga=extended ip=::::::
boot

# You can add more boot alternatives here.

For more information about the options see the 'nfsroot.txt' file from your
kernel source (or documentation) package.

Kernel:
-------

You have to compile a kernel (2.4 is recommended) with nfs version 3, nfsroot
and network card driver not as a module. It should also have boot over network
enabled so it can get an ip from bootp, rarp or dhcp.

The following things is important in the configuration of the kernel.

Networking options->IP: kernel level autoconfiguration
You only have to enable the one you need but all of them does not hurt.

 CONFIG_IP_PNP=y
 CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_RARP=y

Network device support->Ethernet (10 or 100Mbit)->EtherExpressPro/100 support
Now set yes to your network card. This example enables the Intel EtherExpress
100 network card.

 CONFIG_EEPRO100=y

File systems->Network File Systems->NFS file system support
File systems->Network File Systems->NFS file system support->
	Root file system on NFS

 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 CONFIG_ROOT_NFS=y


License
=======

  Copyright (C) 2001-2004 Ola Lundqvist <opal@debian.org>

This is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
 
This is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
 
You should have received a copy of the GNU General Public License with
the source package as the file COPYING.  If not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.