Difference between revisions of "LittleFe:PXE Booting"
Line 31: | Line 31: | ||
<tt>update-rc.d -f kdm remove</tt> | <tt>update-rc.d -f kdm remove</tt> | ||
+ | |||
+ | Since the littlefe0's hard drive has every node's filesystem it is important to backup regularly. There is a backup script in root's home directory on the diskless nodes, backupfe0.sh. It requires that there is a hard drive connected to the diskless node's ide0 channel. This script mounts littlefe0's root directory to /mnt/fe0, the local hard drive to /mnt/part1 . <b>It will delete everything on the hard drive connected to the diskless node.</b> Then, it rsyncs the /mnt/part1 to a copy of /mnt/fe0. |
Revision as of 15:03, 25 July 2005
In order to setup PXE booting the client nodes must get their DHCP information from the node serving the kernel. We have setup dhcpcd on littlefe0 with the following entry for each littlefe node to know where to get it's kernel.
group {
next-server 192.168.10.100; filename "pxelinux.0"; use-host-decl-names on;
host littlefe1 { hardware ethernet 00:40:63:d8:a2:2c; fixed-address 192.168.10.101; } host littlefe2 { hardware ethernet 00:40:63:d8:a2:93; fixed-address 192.168.10.102; }
....
}
The host entry gives the remote its own hostname through dhcp. The "filename" entry here specifies the pxe boot loader. We use the pxe linux bootloader based on the syslinux bootloader (http://syslinux.zytor.com/pxe.php). The filename is relative to the tftpd root directory, /tftpboot/ on littlefe0. The "/tftpboot/pxelinux.cfg" file specifies the kernel binary, again relative to the tftp root directory, and kernel options to be passed on client nodes. We pass the following options:
DEFAULT vmlinuz-2.6.12 ramdisk_size=16384 ip=dhcp root=/dev/nfs nfsroot=192.168.10.100:/diskless/
This specifies which kernel binary to load. It also prepares a ramdisk and tells the client to mount /diskless/ nfs export from littlefe0. The /diskless/ directory on littlefe0 is the root directory of each of the client nodes.
The ramdisk on each client node is further prepared by the /init/local script. This script formats the ramdisk, mounts it to /mnt/ramdisk, and copies the skeleton ramdisk directory sturcture from /mnt/ramdisk_skel. Currently we put three directories on the ramdisk, /var/lock/ , /var/run/ , and /var/spool/ each of these are linked to the equivalent ramdisk directory, ie /var/lock -> /mnt/ramdisk/lock.
In order to make changes to client nodes, first boot littlefe0 and another node with all of the networking in place so that they can communicate. Next, login to the client node. This node has littlefe0's /diskless/ directory mounted as its root directory, / . In order to make changes that affect each client node simply modify the root directory on the single booted client node. These changes will be updated on /diskless/ on littlefe0 and thus on every other client node. For example, running "apt-get install" on littlefe1 will add a package to every littlefe client node. To modify scripts or configuration, in /etc/ for example, it is also possible to modify the /diskless/ directory on littlefe0 directly from the root node.
Making changes to the root node, littlefe0 is done in the normal way. In order to modify all the nodes, root and clients, the commands must be run on both littlefe0 and one client node.
To add rc scripts, for example kdm, to particular runlevels in debian use the following
update-rc.d kdm defaults
To remove rc scripts, for example, from every runlevel while leaving the /etc/init.d/ script intact use the following
update-rc.d -f kdm remove
Since the littlefe0's hard drive has every node's filesystem it is important to backup regularly. There is a backup script in root's home directory on the diskless nodes, backupfe0.sh. It requires that there is a hard drive connected to the diskless node's ide0 channel. This script mounts littlefe0's root directory to /mnt/fe0, the local hard drive to /mnt/part1 . It will delete everything on the hard drive connected to the diskless node. Then, it rsyncs the /mnt/part1 to a copy of /mnt/fe0.