Diskless-root-NFS-HOWTO(1).pdf
(
54 KB
)
Pobierz
Root over nfs clients & server Howto.
Root over nfs clients & server Howto.
Root over nfs clients & server Howto.
Table of Contents
Root over nfs clients & server Howto.
.............................................................................................................1
Hans de Goede hans@highrise.nl.
..........................................................................................................1
1. Introduction.
.........................................................................................................................................1
2. Basic principle
.....................................................................................................................................1
3. Preparing the server.
............................................................................................................................1
4. Adding workstations.
...........................................................................................................................1
5. Added bonus: booting from cdrom.
.....................................................................................................1
6. Thanks.
.................................................................................................................................................1
7. Comments.
...........................................................................................................................................1
1. Introduction.
.........................................................................................................................................2
1.1 Copyright.
..........................................................................................................................................2
1.2 Changelog.
.........................................................................................................................................2
2. Basic principle
.....................................................................................................................................2
2.1 Things can't be that simple..
...............................................................................................................3
Each ws needs its own writable copy of a number of dirs.
........................................................3
Write access to /home might be needed..
...................................................................................4
How does a ws find out it's ip so that it can communicate with the server?
.............................4
What about ws sepecific configuration.
.....................................................................................4
Miscelancious problems .
...........................................................................................................4
3. Preparing the server.
............................................................................................................................5
3.1 Building a kerne.
...............................................................................................................................5
3.2 Creating and populating /tftpboot, making symlinks for /tmp etc..
...................................................6
The automagic part .
...................................................................................................................6
Manual adjustments to some files..
............................................................................................8
3.3 Exporting the appropriate file systems and setting up bootp.
............................................................9
Exporting the appropriate file systems .
.....................................................................................9
Setting up bootp .
........................................................................................................................9
4. Adding workstations.
...........................................................................................................................9
4.1 Creating a boot disk or bootrom.
.......................................................................................................9
Creating a bootdisk .
...................................................................................................................9
Creating a bootrom .
.................................................................................................................10
4.2 Creating a ws dir.
.............................................................................................................................10
4.3 Add entries to /etc/bootptab and /etc/hosts.
.....................................................................................10
4.4 Booting the ws for the first time.
.....................................................................................................11
4.5 Set the ws specific configuration..
...................................................................................................11
5. Added bonus: booting from cdrom.
...................................................................................................11
5.1 Basic Principle.
................................................................................................................................11
Things can't be that simple .
.....................................................................................................11
5.2 Creating a test setup..
.......................................................................................................................12
5.3 Creating the cd.
................................................................................................................................13
Creating a boot image .
.............................................................................................................14
Creating the iso image .
............................................................................................................14
Verifying the iso image.
...........................................................................................................14
Writing the actual cd.
...............................................................................................................15
5.4 Boot the cd and test it.
.....................................................................................................................15
6. Thanks.
...............................................................................................................................................15
7. Comments.
.........................................................................................................................................15
i
Root over nfs clients & server Howto.
Hans de Goede
hans@highrise.nl
v1.0 30 March 1999
Howto setup a server and configure clients for diskless operation from a network.
1.
Introduction
·
1.2 Changelog
1.1 Copyright
·
2.
Basic principle
·
2.1 Things can't be that simple
3.
Preparing the server
·
3.2 Creating and populating /tftpboot, making symlinks for /tmp etc.
3.1 Building a kernel
·
3.3 Exporting the appropriate file systems and setting up bootp
·
4.
Adding workstations
·
4.2 Creating a ws dir
4.1 Creating a boot disk or bootrom
·
4.3 Add entries to /etc/bootptab and /etc/hosts
·
4.4 Booting the ws for the first time
·
4.5 Set the ws specific configuration.
·
5.
Added bonus: booting from cdrom
·
5.2 Creating a test setup.
5.1 Basic Principle
·
5.3 Creating the cd
·
5.4 Boot the cd and test it
·
6.
Thanks
7.
Comments
Root over nfs clients & server Howto.
1
Root over nfs clients & server Howto.
1.
Introduction
This howto is also available at −
http://xmame.retrogames.com/hans
. This document describes a setup for nfs
over root. This document differs from the other root over nfs howto's in 2 ways:
1.
It describes both the server and the client side offering a complete solution, it doesn't desribe the
generic principles off root over nfs although they will become clear. Instead it offers a working setup
for root over nfs. One of the many possible setup's I might add.
2.
This solution is unique in that it shares the root of the server with the workstations (ws). Instead of
having a mini−root per ws. This has a number of advantages:
low diskspace usage
¨
any changes on the serverside are also automagicly made at the client side, all configuration
has only to be done once!
¨
¨
only one system to maintain
Very easy adding of new clients
¨
This document is heavily based on a RedHat−5.2 system. Quite a bit of prior linux sysadmin experience is
assumed in this howto, if you have that it shouldn't be a problem to addept this solutions to other
distributions.
1.1 Copyright
Well here's the standard howto legal stuff:
This manual may be reproduced and distributed in whole or in part, without fee, subject to the following
conditions:
·
The copyright notice above and this permission notice must be preserved complete on all complete or
partial copies.
·
If you distribute this work in part, instructions for obtaining the complete version of this manual must
be included, and a means for obtaining a complete version provided.
Any translation or derived work must be approved by the author in writing before distribution.
·
·
Small portions may be reproduced as illustrations for reviews or quotes in other works without this
permission notice if proper citation is given.
Exceptions to these rules may be granted for academic purposes: Write to the author and ask. These
restrictions are here to protect us as authors, not to restrict you as learners and educators.
1.2 Changelog
·
v1.0, 30 March 1999: First released version partially written in time of ISM
v0.1, 20 January 1999: First draft written at the HHS, where the setup was originally developed.
·
2.
Basic principle
As already said with this setup the clients share basicly the entire root−fs with the server. But the clients
ofcourse only get read access to it. This is basicly how things work.
1. Introduction
2
Root over nfs clients & server Howto.
2.1 Things can't be that simple
Unfortunatly things aren't that simple, there are a couple of problems the overcome with this simple setup.
Each ws needs its own writable copy of a number of dirs
A normal linux setup needs to have write access to the following dirs:
1.
/dev
2.
/var
3.
/tmp
There are 3 solutions for this, of which one will only work for /dev:
1.
mount a ramdisk and populate it by untarring a tarball, or by copying a template dir.
Advantages:
It's cleaned up every reboot, which removes tmp files and logs. Thus it needs no
maintaince unlike server sided dirs.
¨
1.
2.
It doesn't take up any space on the server, and that it doesn't generate any network
traffic. A ramdisk takes less server and network resources, and is faster.
¨
Disadvantages:
It takes memory.
1.
2.
The logs aren't kept after a reboot, if you really want logging of all your clients tell
syslog to redirect the logging to your server.
2.
create a dir for each ws on the server and mount it rw over nfs.
Advantages & disadvantages:
The above arguments work in reverse for serversided dirs.
¨
1.
3.
With kernel 2.2 devfs can be used for /dev, this is a virtual filesystem ala /proc for /dev.
Advantages:
Devfs takes very little memory when compared to a ramdisk / no diskspace on the
server and is very fast. A normal /dev takes at least 1.5 mb since the minimal size for
a file (and thus for a device) is 1k, and there are somewhere around 1200 devices.
You can offcourse use a template of a stripped /dev with only the entries you need to
save some space. 1.5 Mb is a lott for a ramdisk and also isn't nice on a server.
¨
1.
2.
Devfs automagicly creates entries for newly added & detected devices, so no
maintainance is needed.
¨
Disadvantages:
Any changes to /dev like creating symlinks for the mouse and cdrom are lost. Devfs
comes with a script called rc.devfs to save these chances. The script's provided in
this howto will automagicly restore these symlinks settings by calling rc.devfs If you
make any changes to /dev you need to call the rc.devfs yourself to save them by
typing:
1.
/etc/rc.d/rc.devfs save /etc/sysconfig
As you can see, there are a number of ways to solve this problem. For the rest of this Howto the following
choices are assumed:
·
For /var and /tmp we'll use a shared ramdisk of 1mb. It's shared to use the space as effeciently as
possible. /tmp is replaced by a symlink to /var/tmp to make the sharing possible.
For /dev we'll use Devfs
·
2.1 Things can't be that simple
3
Plik z chomika:
megaskrypty
Inne pliki z tego folderu:
3-Button-Mouse(1).pdf
(58 KB)
XWindow-Overview-HOWTO(1).pdf
(30 KB)
Xterm-Title(1).pdf
(39 KB)
Xterminals(1).pdf
(30 KB)
Xinerama-HOWTO(1).pdf
(33 KB)
Inne foldery tego chomika:
Programowanie
Zgłoś jeśli
naruszono regulamin