FreeBSD 8 PXEBoot with Grub2Posted Friday, January 15th 2010 @ 6:46PM
I just spent much longer on this than I care to admit. Hopefully this post will save someone else the time, until the dudes working on the grub2 project fill their documentation out. Trying to PXEboot a recent FreeBSD environment using grub2pxe? All the docs out there for PXE+FreeBSD from early 2000 (or worse) and using BSD's 'pxeboot' binary? Can't find anything on the 'kfreebsd' magic of grub2? Here's the magic sauce. Note that I compressed the kernel, so it'll be much faster under tftp.
So far, so good. |
archivesjabber statussubscribeplan updates
recently bookmarked |

Comments
Monday, January 18th 2010 @ 9:10AM
I love the magic 'Dh'! I spent the better part of a week trying to get this to work, and never found that bit. Glad you finally got it working!
Thursday, April 15th 2010 @ 12:24AM
I'm watching you make stool...
Thursday, August 19th 2010 @ 11:59AM
Grub2 link is broken. Time for me to build a PXE server.
Tuesday, May 1st 2012 @ 11:47AM
We have been doing something very similar to this. We chain grub2pxe to pxelinux and load a FreeBSD mfsroot install environment from there. We chose to check out grub2pxe because FreeBSD's pxeboot.bs appears to contain various bugs which we encountered.
Our mfsroot makes use of environment variables to complete the install including making use of various FreeBSD kernel variables including, but not limited to:
boot.nfsroot.server boot.netif.ip boot.netif.gateway dhcp.host-name dhcp.routers
We were able to identify that we could pass these values onto the FreeBSD environment using the grub.cfg file. They were done in the fashion below:
set kFreeBSD.boot.nfsroot.server=$pxe_default_server set kFreeBSD.boot.netif.ip=$net_pxe_ip set kFreeBSD.boot.netif.gateway=$pxe_default_gateway set kFreeBSD.dhcp.host-name=$net_pxe_hostname set kFreeBSD.dhcp.routers=$pxe_default_gateway
The unfortunate thing here is that we have yet been able to get pxe_default_gateway to be accurately populated. Also, there is a lack of a way to identify a netmask.
We were able to identify the grub2pxe variables from the grub2 manual at gnu.org.
I am hoping that in the coming months, I can write a white paper and/or blog post that describes our configuration so that others can use our experiences to help in their own environments. We have found that documentation on similar configurations is seriously lacking. Feel free to contact me at vmiller at hostileadmin dot com if you're interested in more information.
Friday, May 4th 2012 @ 7:45AM
Rick's got a followup blog post, you can find it here!
Leave a comment