Jan
15
2010
FreeBSD 8 PXEBoot with Grub2
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.
menuentry "FreeBSD 8.0 x86" {
echo "Fetching the kernel and UFS root."
echo "This could take a few minutes, so hang tight... "
kfreebsd /freebsd/x86_8.0/kernel/kernel.gz Dh
kfreebsd_loadenv /freebsd/x86_8.0/device.hints
kfreebsd_module /freebsd/x86_8.0/mfsroot.gz type=mfs_root
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/md0c
echo "Aaaiiight!"
sleep 2
}
So far, so good.