This page describes how to prepare a system with a Debian Etch server and many diskless EMC2 thin clients. Client machines have no harddisk and they use server's harddisk to store and read files. But they use their own RAM and CPU power to run EMC2.
su - apt-get install portmap nfs-common |
Because of dependencies the following packages will be installed too:
libevent1 libgssapi2 libnfsidmap2 librpcsecgss3 ucf
apt-get install openssh-server |
apt-get clean cd / tar czf root.tar.gz \ bin/ \ boot/ \ cdrom \ dev/ \ etc/ \ home/ \ initrd/ \ initrd.img \ lib/ \ media/ \ mnt/ \ opt/ \ root/ \ sbin/ \ srv/ \ tmp/ \ usr/ \ var/ \ vmlinuz |
apt-get install bind9 |
* The IP address of Debian Etch server is 192.168.0.1 * Gateway address is 192.168.0.254 * MAC address of 1st diskless client machine is 08:03:2b:4c:49:33 * MAC address of 2nd diskless client machine is 08:03:2b:4c:49:34 * MAC address of 3rd diskless client machine is 08:03:2b:4c:49:35
To install DHCP server
apt-get install dhcp3-server dhcp3-common |
/etc/dhcp3/dhcpd.conf
ddns-update-style none; option domain-name "domain.loc"; option domain-name-servers 192.168.0.1; default-lease-time 600; max-lease-time 7200; authoritative; log-facility local7; subnet 192.168.0.0 netmask 255.255.255.0 { option broadcast-address 192.168.0.255; option routers 192.168.0.254; next-server 192.168.0.1; filename "pxelinux.0"; host client_01 { hardware ethernet 08:03:2b:4c:49:33; fixed-address 192.168.0.11; } host client_02 { hardware ethernet 08:03:2b:4c:49:34; fixed-address 192.168.0.12; } host client_03 { hardware ethernet 08:03:2b:4c:49:35; fixed-address 192.168.0.13; } } |
Change INTERFACES in /etc/default/dhcp3-server
INTERFACES="eth0" |
apt-get install tftpd-hpa cd /var/lib/tftpboot mkdir client_01 mkdir client_01/nfsroot cp /boot/vmlinuz-2.6.17-rtai client_01/ cp /boot/initrd.img-2.6.17-rtai client_01/ mkdir client_02 mkdir client_02/nfsroot cp /boot/vmlinuz-2.6.17-rtai client_02/ cp /boot/initrd.img-2.6.17-rtai client_02/ mkdir client_03 mkdir client_03/nfsroot cp /boot/vmlinuz-2.6.17-rtai client_03/ cp /boot/initrd.img-2.6.17-rtai client_03/ |
Change RUN_DAEMON in /etc/default/tftpd-hpa
RUN_DAEMON="yes" |
apt-get install nfs-kernel-server touch /etc/modprobe.d/lockd |
Change STATDOPTS in /etc/default/nfs-common
STATDOPTS="--port 32765 --outgoing-port 32766" |
Change RPCMOUNTDOPTS in /etc/default/nfs-kernel-server
RPCMOUNTDOPTS="-p 32767" |
/etc/modprobe.d/lockd
options lockd nlm_udpport=32764 nlm_tcpport=32764 |
Add following lines to /etc/exports
/var/lib/tftpboot/client_01/nfsroot 192.168.0.11(rw,sync,no_root_squash,subtree_check) /var/lib/tftpboot/client_02/nfsroot 192.168.0.12(rw,sync,no_root_squash,subtree_check) /var/lib/tftpboot/client_03/nfsroot 192.168.0.13(rw,sync,no_root_squash,subtree_check) |
apt-get install syslinux cd /var/lib/tftpboot touch pxelinux.txt cp /usr/lib/syslinux/pxelinux.0 . mkdir pxelinux.cfg cd pxelinux.cfg touch 01-08:03:2b:4c:49:33 touch 01-08:03:2b:4c:49:34 touch 01-08:03:2b:4c:49:35 |
/var/lib/tftpboot/pxelinux.cfg/01-08:03:2b:4c:49:33
DISPLAY pxelinux.txt DEFAULT EMC2 LABEL EMC2 KERNEL client_01/vmlinuz-2.6.17-rtai APPEND initrd=client_01/initrd.img-2.6.17-rtai root=/dev/nfs nfsroot=192.168.0.1:/var/lib/tftpboot/client_01/nfsroot nfsopts="hard,intr,rsize=8192,wsize=8192" ip=dhcp vga=normal ramdisk_size=10240 pnpbios=off rw -- LABEL local localboot 0 PROMPT 1 TIMEOUT 50 |
/var/lib/tftpboot/pxelinux.cfg/01-08:03:2b:4c:49:34
DISPLAY pxelinux.txt DEFAULT EMC2 LABEL EMC2 KERNEL client_02/vmlinuz-2.6.17-rtai APPEND initrd=client_02/initrd.img-2.6.17-rtai root=/dev/nfs nfsroot=192.168.0.1:/var/lib/tftpboot/client_02/nfsroot nfsopts="hard,intr,rsize=8192,wsize=8192" ip=dhcp vga=normal ramdisk_size=10240 pnpbios=off rw -- LABEL local localboot 0 PROMPT 1 TIMEOUT 50 |
/var/lib/tftpboot/pxelinux.cfg/01-08:03:2b:4c:49:35
DISPLAY pxelinux.txt DEFAULT EMC2 LABEL EMC2 KERNEL client_03/vmlinuz-2.6.17-rtai APPEND initrd=client_03/initrd.img-2.6.17-rtai root=/dev/nfs nfsroot=192.168.0.1:/var/lib/tftpboot/client_03/nfsroot nfsopts="hard,intr,rsize=8192,wsize=8192" ip=dhcp vga=normal ramdisk_size=10240 pnpbios=off rw -- LABEL local localboot 0 PROMPT 1 TIMEOUT 50 |
/var/lib/tftpboot/pxelinux.txt
Boot Menu --------- EMC2 to start diskless EMC2 client local to boot from local harddisk |
/etc/init.d/dhcp3-server restart /etc/init.d/tftpd-hpa restart /etc/init.d/portmap restart /etc/init.d/nfs-common restart /etc/init.d/nfs-kernel-server restart |
cd /var/lib/tftpboot/client_01/nfsroot tar zxf /root.tar.gz mkdir proc mkdir sys |
Change client's hostname in /var/lib/tftpboot/client_01/nfsroot/etc/hostname
client_01 |
/var/lib/tftpboot/client_01/nfsroot/etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface #allow-hotplug eth0 iface eth0 inet dhcp |
Remove all lines from /var/lib/tftpboot/client_01/nfsroot/etc/fstab and add the followings
proc /proc proc defaults 0 0 /dev/nfs / nfs defaults 0 0 none /tmp tmpfs defaults 0 0 none /var/tmp tmpfs defaults 0 0 none /var/run tmpfs defaults 0 0 none /var/lock tmpfs defaults 0 0 |
cd apt-get install unzip wget http://downloads.sourceforge.net/thinstation/BootDisk522b.zip?modtime=1070186918&big_mirror=1 unzip BootDisk522b.zip dd if=ebnet522.dsk of=/dev/fd0 |
Use this floppy disk to boot from network on diskless EMC2 client machines.