Remote Boot and Root for Plan9
Started to play with Plan9 again. First major experiment: Run a bare-metal cpu server without local disks. All configuration can be done from an OpenBSD server supplying the loader, kernel, bootup-config, and filesystem. The Plan9 server runs on an old 1U Pentium 4 server.
Results so far: PXE finds Plan9 loader, that again loads a
plan9.iniby TFTP which specifies a kernel, which then mounts its rootfs from au9fson OpenBSD. Said rootfs containscpurcwhich determines the server's behaviour.Details
dhcpd.confon DHCP/TFTP server:host cpu { hardware ethernet 00:11:22:33:44:55; fixed-address 192.168.66.99; filename "9pxeload"; }Once the PXE Plan9 bootloader
9pxeloadis running it pulls the file/cfg/pxe/001122334455from the DHCP/TFTP server. This file is used as theplan9.ini.Example
plan9.ini:bootfile=ether0!9pccpu bootargs=tcp!192.168.66.11!564 nobootprompt=tcp!192.168.66.11!564 fs=192.168.66.11 console=0 b19200 pn
9pxeloadwill load9pccpufrom the TFTP server it found onether0and supply that kernel with the infomation that its rootfs will be remotely supplied from192.168.66.11. Console is on first serial interface with 19200bps and no parity.On
192.168.66.11the following entry ininetd.confstarts 9legacy's modifiedu9fsprocess on demand:9fs stream tcp nowait root /mnt/9atom/unix/u9fs u9fs -a none /mnt/9atom(This implies that the service
9fsis already defined as567in/etc/services.)
Theu9fsexports The originalu9fsfound in /sys/src/cmd/unix/u9fs.c exported the whole fs of the server. This led to the custom ofchrooting the process, with all the pitfalls included. The 9legacy patch allows to export arbitrary subtrees. the filetree under/mnt/9atomwithout authorization. This is excusable only in a private network and necessary only because my rootless cpu server does not know the password for the remote fs. A way around that would be to put the password into the kernel itself (which again is totally insecure in an open network where everybody can fake the MAC and pull the kernel...)The Plan9 server can now be controlled completely from the OpenBSD machine which is nice for testing configurations.
Thu, 11 Apr 2013
[/plan9]
permanent link