Date: Fri, 14 Nov 2008 20:45:34 +0100 From: Luigi Rizzo <rizzo@iet.unipi.it> To: stable@freebsd.org Subject: diskless+pxe notes Message-ID: <20081114194534.GA64986@onelab2.iet.unipi.it>
next in thread | raw e-mail | index | archive | help
Hi, i finally decided to try and use pxeboot to replace the etherboot method I was using so far for diskless setups. The goal is to fully share the server's root and /usr directories, as documented in diskless(8). I'd like to share the following notes, hopefully to go in the manpage. cheers luigi -------------- root path configuration ----------------- There seems to be a well known problem in pxeloader, see kern/106493 , where pxeloader defaults to using a root path of /pxeroot when offered "/" . The patch suggested in http://www.freebsd.org/cgi/query-pr.cgi?pr=106493 is trivial and judging from it I believe this is addressing a true bug and not a feature. Fortunately there is a workaround (suggested in the PR) which is using "//" as a root path. ------------- sharing /boot with the server --------------- I believe it is quite useful to share the whole root partition between the server and the diskless client. This would require at a minimum some conditional code in loader.conf (or loader.rc, etc) so that at least you point to different kernels. A minimalistic approach can be adding this line to /boot/loader.conf bootfile="kernel\\${loaddev};kernel" The variable $loaddev contains the name of the load device, which is "pxe0" in the case of pxeboot, and disk* in other cases when loading from the local disk. If you make sure that there is no 'kernel.disk*' on the directory, and instead there is a kernel.pxe0 in the same directory, then the diskless machines and the server will boot from the proper file. Unfortunately i don't know how to implement a conditional in /boot/loader.conf -- otherwise one could do much nicer things such as differentiate which modules to load and so on. --------------- pxeloader bug in 7.x --------------------------- Also worth mentioning is an annoying bug in pxeloader as compiled on 7.x, see http://www.freebsd.org/cgi/query-pr.cgi?pr=118222 i.e. the pxeloader in 7.x fails to proceed and prints a message "can't figure out which disk we are booting from". The workaround is using a pxeloader from FreeBSD6 works. I guess this is a compiler-related problem (given that 6.x uses gcc 3.4 as a compiler, while 7.x uses gcc 4.2). -----------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081114194534.GA64986>