View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Sat May 13, 2006 6:29 pm 
Offline
Joined: Sun Mar 07, 2004 5:34 am
Posts: 116
Location: UK
Greg,

Yes as you say this approach is supposedly used for classrooms full of thin clients, just as you describe, with common root, but individual /home

Ok just in cas eyou stayed up late waiting to try this. (i,m in the UK an dit is late :-)

Here my first attempt at a walk through. Please give it a whirl and I will try and fault find any probs you get. Most likely on eis the NFSroot being mounted ro and that causes it all to go badly wrong.


Quote:
This is how I set up a frontend to network boot. It is currently working for both PXE enabled boot NIC's and Etherboot if you have it.

I have a frontend, which I want to be 192.168.254.1
I have a backend whih is 192.168.254.4
I have installed the nfsroot in /myth/terminal_server/nfsroot

You can change all of these, but this guide assumes you are using these values.

Basic Terminal services install.
1) Install and test Terminal Services on the backend. All the hard work is done for you by the most excellent Knoppmyth.
With the Knoppmyth CD in the drive of the backend type:

ts-prep

This will install Knoppix terminal services, configure pxe, start DHCP and TFTP demons, and basically do all the heavy lifting for you. When it is installed the frontend machine should be able to network boot from the backend.
I wont explain how it all works here, but the default Terminal services lets you boot as if you are booting from CD on the frontend. The filesystem is read only, and any changes you make are lost on reboot.

If this stage doesnt work, dont bother going any further till it does.


2) Install and configure the frontend, as a normal KnopMyth install.

You need a normal HD in your "diskless" frontend to start with. Do a normal install on the frontend, and get it just the way you like it. You may want to follow the how to on frontend only installs, to clear out some of the stuff you dont need on the frontend.

What I did then was to tar up the whole of hda1 (the root partition) of the frontend, and copy it over to the backend.
As you have allready installed terminal services, there will be a directory on the backend.
/myth/terminal_services which contains KNOPPIX. untar the tarball of / (hda1) from the frontend, in this directory, rename this nfsroot.
So the directory structure needs to be /myth/terminal_services/nfsroot/[contents of frontend /]

You can also copy the files individually across the network, with

mount /dev/hda1 /mnt/hda1
sudo mkdir /myth/terminal_server/nfsroot
sudo cp -rax * /myth/terminal_server/nfsroot


3) Now you need to recompile your kernel to support NFS, NFSroot

cd /usr/src/linux
make menuconfig

Then chose these options. Make sure they are not compiled as modules, but included in the kernel [*] not [M}

Device Crivers --> Network Device support --> Ethernet (10 or 100Mbit) -->[ your NIC cards]
Networking --> Networking Options-->IP: Kernel level autoconfiguration
--> IP: DHCP support
--> IP: BOOTP support
--> IP: RARP support

File Systems --> Network File Systems -->NFS Filesystem support
--> root filesystem on NFS


4) IF YOU RUN Knoppix_terminalserver AGAIN EVER YOU WILL NEED TO REPEAT THESE STAGES. Knoppix_terminalserver rewrites a lot of these files every time it is run. Took me a while to catch on to that ;-)

Replace vmlinuz in /tftpboot with the new kernel.

cp /usr/src/linux/arch/i386/boot/bzImage /tftpboot/vmlinuz

This may vary based on the machine you recompiled on. (?)

Now you need to edit a couple of files on the backend.

edit /etc/exports

change:

/myth/terminal_server 192.168.254.0/255.255.255.0(ro,no_root_squash,async)
to
/myth/terminal_server 192.168.254.0/255.255.255.0(rw,no_root_squash,async)

and save.

then:

edit /tftpboot/pxelinux.cfg/default

remove the DEFAULT entry and replace with:

DEFAULT vmlinuz
APPEND root=/dev/nfs ip=192.168.254.1:192.168.254.4:192.168.254.254:255.255.255.0::: nfsroot=192.168.254.4:/myth/terminal_server/nfsroot
TIMEOUT 300

and save

edit /etc/fstab

remove any refrences to local disks, as on the frontend there arnt going to be any !
remove
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1

replace with:

192.168.254.4:/myth/terminal_server/nfsroot / nfs defaults,auto,noatime 0 2

so that you are sure that your loading the right root filesystem.

[ Actually I think this is probably unneccesary, but it doesnt do any harm ]

5) Now as you are never going to run knoppmyth_terminalserver again, remeber we talked about that ? :-)

You need to make sure that dhcp tftp and nfs all start at boot time so you need to:

update-rc.d nfs-common defaults
update-rc.d nfs-kernel-server defaults
update-rc.d dhcp3-server defaults

tftp should be covered by inet.d

Either restart all these services manually, or reboot to check they start automatically, before the next stage.

6) Moment of truth.

Start the frontend, and try and boot from the network.

The sequence of PXE, TFTP , Knoppix boot screen should be familiar from stage 1). At the Knoppix screen hit return to select the default boot that you edited in stage 4.

The frontend should now boot as if it is booting from its own hard disk, but the root is now sitting on the backend.As it is mounted read/write, you can do anything you want to the config.

Cool :-)


7) But my frontend uses etherboot....

Etherboot requires two changes.

First you need to rebuild the etherboot.nbi.

cd /tftpboot

mkelf-linux vmlinuz -0 etherboot.nbi root=/dev/nfs nfsroot=192.168.254.2:/myth/
terminal_server/nfsroot ip=192.168.254.1:192.168.254.4:255.255.255.0:::

Then edit /etc/dhcp3/dhcp.conf and change

# if substring (option vendor-class-identifier, 0, 9) = "Etherboot" { filename
"etherboot.nbi"; }
# else { filename "pxelinux.0"; }
filename "pxelinux.0";

to

if substring (option vendor-class-identifier, 0, 9) = "Etherboot" { filename
"etherboot.nbi"; }
else { filename "pxelinux.0"; }
# filename "pxelinux.0";

This should allow both PXE and etherboot clients to work


Needs fonts highlighting and tidy up before adding to the WiKi, but give it a whirl.


Last edited by red321 on Sun May 14, 2006 6:40 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 14, 2006 6:36 am 
Offline
Joined: Sun Mar 07, 2004 5:34 am
Posts: 116
Location: UK
Just in case anybody tried this, I forgot a bit, you need to edit your /etc/fstab file. I have edited the original instructions.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu