On Jan 15, 2013, at 10:18 AM, Wojciech Puchar wrote:

> does anyone know a PXE image (just like /boot/pxeboot) that can be placed on 
> tftp server and the only thing it will do would be loading first sector from 
> first local disk at 0x07c00 and booting as with normal hard drive.
> 
> what i need is to be able to decide from server side if given computer boots 
> from NFS or hard disk.
> 

Yeah, no prob.

NOTE: Our PXE server is Linux (*blech) but I assure you the only thing that 
changes is the paths (/etc/dhcpd.conf becomes /usr/local/etc/dhcpd.conf for 
example -- the pxelinux.0 image works fine served-up by ISC dhcpd on FreeBSD).

First part of the recipe:

$ awk '/filename/&&!/^[[:space:]]*(#|$)/{print}' /etc/dhcpd.conf
        filename "pxelinux.0";
$ ls -l /tftpboot/pxelinux.0
lrwxrwxrwx  1 root root 15 May 15  2012 /tftpboot/pxelinux.0 -> pxelinux.0-3.84
$ file /tftpboot/pxelinux.0-3.84 
/tftpboot/pxelinux.0-3.84: data

Next part of the recipe… The /etc/pxelinux.cfg/default file:

DISPLAY /boot/include/boot.msg
DEFAULT wpuchar_nfs
PROMPT 1
ONTIMEOUT hdd
TIMEOUT 50
TOTALTIMEOUT 6000
LABEL hdd
        LOCALBOOT 0x80
LABEL wpuchar_nfs
        … your nfs boot config …

Last but not least, …

$ cat /tftpboot/boot/include/boot.msg
Press ENTER to boot from WPuchar's NFS server (defaulting to HDD boot in 5 
seconds)...

-- 
Devin

_____________
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to