This documents my experiences setting up a bunch of workstations to = boot Fedora diskless. These = are actually=20 nodes of a beowulf cluster, and that usage colours this description.=20
Right now these are just quick notes made as I went along. I'll write = this up=20 properly later.=20
Standard server install for Fedora.=20
In the beowulf context set up two ethernet cards:=20
IP: 192.168.1.249
GW: 192.168.1.254
mask: 255.255.255.0
DHCP: 192.168.1.249
Install dhcp-3.0pl2-6.16.rpm from distribution (or from http://isc.org/sw/dhcp/). This is = the ISC=20 DHCP server.=20
Configure /etc/dhcpd.conf. IP addresses I use are LAN addresses for = the=20 beowulf:
option domain-name "my.domain.name";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
ddns-update-style none;
option routers 192.168.1.254;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.101 192.168.1.150;
next-server 192.168.1.249;
filename "/pxelinux.0";
}
Test: # /usr/sbin/dhcpd -d -f.=20
Start:
# chkconfig dhcpd on # service dhcpd start
Install from fedora=20 core: # yum install tftp-server. This is standard tftp server HPA (by H. = Peter=20 Anvin).=20
Test: # /usr/sbin/in.tftpd -vvv -l -s /tftpboot=20
Configure in /etc/xinetd.d/tftp:
server_args =
=3D -s /tftpboot
Start: # chkconfig tftp on (xinetd will start it when needed).=20
Latest syslinux from http://www.kernel.org/pub/linux/utils/boot/syslinux/. = Includes=20 pxelinux.0. Copy to /tftpboot.=20
Create /tftpboot/pxelinux.cfg/default:
display =
pxeboot.msg
prompt 1
label linux
kernel vmlinuz
append ip=3Ddhcp root=3D/dev/nfs \
nfsroot=3D192.168.1.249:/home/cns/local/beowulf/client-root =
vga=3D0x0f01
label local
localboot 0
We need to set up a network boot kernel, and a = Fedora = installation hosted=20 on the server.=20
Block devices:=20
Networking options:=20
Copy bzImage to /tftpboot/linux.=20
Set root to nfsroot:
# mknod /dev/nfsroot b 0 = 255 # rdev path/to/bzImage /dev/nfsroot
Install to a spare partition. Boot another = partition and=20 use tar (to preserve links, char and block devices, etc) to copy it = across:
spare# tar cvpf client_root.tar = /mnt/spare_partition/ server# tar oxvpf client_root.tar /home/beowulf/.NOTE: 'p' option is very important to preserve file permissions = (e.g.=20 setuids, etc).=20
Make mount points for virtual filesystems:
# cd = /home/beowulf/client_root # mkdir proc # rm -rf dev; mkdir dev
Need to write: /dev, /var, /tmp. We will use devfs, and use a ramdisk = for=20 /var. /tmp will be a symlink to /var/tmp.=20
Set up shadow passwords:
# chroot = /home/beowulf/client_root /usr/sbin/pwconv
In order to login make sure you install passwd and set root password. =
We set this by lookup from /etc/hosts in rc.diskless. Normally = hostname=20 is set in /etc/rc.d/rc.sysinit to value in /etc/sysconfig/network, so = make sure=20 this file doesn't have a HOSTNAME entry, or it will overwrite our value. =
Make keys by hand ... they can be same for all client, since they're = not too=20 secret anyway (not on local filesystem).
# cd = /home/beowulf/client_root/etc/ssh # ssh-keygen -t rsa1 -f ./ssh_host_key -C '' -N '' # ssh-keygen -t rsa -f ./ssh_host_rsa_key -C '' -N '' # ssh-keygen -t dsa -f ./ssh_host_dsa_key -C '' -N '' # chmod 600 *_key # chmod 644 *_key.pub
We want nodes to log to the master. In node etc/syslog.conf we just = need one=20 line:
*.* =
@master
And on the master syslog must be started with the -r option, so =
edit=20
:/etc/sysconfig/syslog to have: SYSLOGD_OPTIONS=3D"-r -m 0"
Need to make sure setuid bit set on su:
# chroot = /home/beowulf/client_root =20 # chmod u+s /bin/suDitto unix_chkpasswd.=20
May be that /etc/pam.d/sshd isn't there. It should be installed from=20 openssh-server RPM.=20
In client /etc/sysconfig/network, add:
NISDOMAIN=3Dypcnsand in client /etc/yp.conf:
domain ypcns = server colemanand in client /etc/nsswitch.conf set all the right things (see = standard=20 CNS setup notes). In client /etc/{passed,shadow,group} add the usual = things.=20
rc.diskless = will also=20 need
mkdir -p /var/yp/bindingthen
# chroot /home/client/root # chkconfig --add ypbind # chkconfig ypbind on
rpm will not work on clients, since /var is a ramdisk and doesn't = contain the=20 real RPM database.=20
Instead, simply chroot and do it on the master:
# cp foo.rpm /home/client/root/. # chroot /home/client/root # rpm -ivh /foo.rpm # exit