Sie sind auf Seite 1von 7

NFS-Root Mini-Howto

Andreas Kostyrka, andreas@ag.or.at


V8, 8 1997
mini-HOWTO Linux
workstation (ws) - (diskless), mount
root filesystems NFS.
mini-Howto ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/NFS-Root ,
mirror SunSite.
______________________________________________________________________
Table of Contents
1. Copyright
1.1
2.
3. server
3.1 compile
3.2 root filesystem
3.2.1 filesystem
3.2.2 root filesystem
3.2.3 export filesystem
3.2.4 RARP
3.2.5 BOOTP
3.2.6 hardware
4. Boot workstation
4.1
4.2
4.3
4.4

boot eprom

bootloader &
bootloader

5.
5.1 /sbin/init .
5.2 /dev .
6.

______________________________________________________________________
1. Copyright
(c) 1996 Andreas Kostyrka (e9207884@student.tuwien.ac.at ,
andreas@ag.or.at)
, Linux HOWTO
.
' ,
,
copyright .

. ,
. ,
,
Linux HOWTO,
copyright. ,
' HOWTO,
.
. '
Linux HOWTO,
. :
, .
, copyright
HOWTO,
HOWTOs.
, ' Andreas
Kostyrka <mailto:andreas@ag.or.at>, miniHOWTO, Tim Bynum, Linux HOWTO's,
<mailto:linux-howto@sunsite.unc.edu> email.
1.1.
Avery Pennarun <apenwarr@foxnet.net> ( boot LILO)

Ofer Maor <ofer@hadar.co.il> ( mini howto


diskless workstations.)

Christian Leutloff <leutloff@sundancer.tng.oche.de> (


netboot.)
2.
, ws :
IP, - -
Ethernet.
NFS-server mount path root
filesystem .
NFSROOT Linux ( 1.3.7x)
:
IP RARP,
Ethernet (
), LILO , LOADLIN.
mounting path NFS
, RARP-server
NFS-server, default compiled path. (
default : /tftpboot/<IP-
>.)
client BOOTP.
diskless , '
boot LILO , LOADLIN.

, .
boot Linux LILO ,
, .
3. server
3.1. compile
RARP server
. , boot
. ,
, client (subnet)
server.
ws
compiled :
NFS-filesystem . ( compiled
ext2 , module .)
"Root on NFS" .
Ethernet driver ws.
,
RARP , BOOTBP NFS-Root. ('
NFS make config.)
ws boot ,
root device 0:255.
(dummy) device, : mknod /dev/nfsroot b 0 255.
, root device
image , : rdev <kernel-image> /dev/nfsroot.
3.2. root filesystem
3.2.1. filesystem
:
,
. root filesystem
clients, NFS-Root-Client mini howto Ofer Maor
<ofer@hadar.co.il>.
root tree, () :
mkdir -p <directory> : tar cClf / - | tar xpCf <directory> -.
boot LILO, rootdir
: /tftpboot/<IP-address>. ,
- Makefile sources .
: NFS_ROOT =
-DNFS_ROOT="\"/tftpboot/%s\"" ,
compile .
3.2.2. root filesystem
, scripts /etc/rc.d
. :

, eth0. ws
( ) eth0. IP ws
IP server, . (

.)
, /etc/fstab ws.
nfs filesystems.
: root filesystems server
ws. ( rc.inet1 server,
server .)

3.2.3. export filesystem


export root dir ws. :
exports(5). nfsd/mountd
' . RedHat , :
/etc/rc.d/init.d/nfs stop ; /etc/rc.d/init.d/nfs start .
3.2.4. RARP
RARP . boot
nfsroot, server RARP server NFS .
( .) ,
RARP .
, ( /etc/rc.d
server!) :
/sbin/rarp -s <ip-addr> <hardware-addr>
:
ip-addr
IP ws,
hardware-addr
Ethernet ws.
: /sbin/rarp -s 131.131.90.200 00:00:c0:47:10:12

IP, server .
( /etc/hosts , DNS .)
3.2.5. BOOTP
BOOTP /etc/bootptab.
, man bootpd(8) bootptab(5) .
3.2.6. hardware

hardware ! ;
Boot ,
, .
6 bytes, ( ) hardware
.
Boot ws ,
TCP/IP . ping ws server.
cache ARP, : /sbin/arp -a
4. Boot workstation
4.1. boot eprom
,
( Christian
Leutloff <leutloff@sundancer.tng.oche.de>) :
"" bootroms.
netboot , Gero Kuhlmann,
bootroms Linux, . netboot
mirror Linux,
distribution Debian (netboot-0.4).
boot eprom .
tftpd server,
, boot eprom
.
boot eproms Linux,
, -
eprom programmer :( ( , ).
.
4.2.
export root filesystem
default , NFS server RARP
server ( ),
boot cating .
( root device 0:255.)
root directory server /tftpboot/IPAddress ( ' , compile
).
4.3. bootloader & RARP
,
: nfsroot=<server-ip-addr>:</path/to/mount> , :
server-ip-addr IP NFS-server ,
/path/to/mount path root directory.
:

LILO ,
"lock" :
, "lock" .
boot, LILO timeout.
ws,
append= lilo.conf .
4.4. bootloader RARP
nfsroot , :
nfsaddrs=<wst-IP>:<srv-IP>:<gw-IP>:<netm-IP>:<hostname> .
eth0 :
wst-IP
IP
srv-IP
IP NFS-server
gw-IP
gateway
netm-IP
netmask
hostname

5.
5.1. /sbin/init .
/sbin/init ()
distributions /sbin/init linked
. , /lib client.
, '
/sbin/init ( client) linked "Hello World".
'
linking.
5.2. /dev .
ttys,
MAKEDEV client /dev
directory.
64-bit dev. ,
e-mail .
/dev ramdisc,
device nodes .
6.
BOOTP :
ftp://sunsite.unc.edu/system/Network/admin/bootpc.v045.tgz

initrd ( Linux 2.0),


. , initrd
.
bootpd,
, Linux 2.0
BOOTP RARP. (,
compile ,
.)
directory source kernel,
NFS-Root.
patch ,
swapping NFS. (
, ), email. :(
http://www.linuxhq.com/ ,
"" patches.
public PGP finger
andreas@ag.or.at . : F1 F7 43 D5 07 C4
6C 87 BF 6B 33 A2 2C EE 5A F9.