one birdy and a little guy and a bad mousie and a lion

FreeBSD 8 PXEBoot with Grub2

Posted 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.

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.

Comments

Michael Granger
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!

Rowe
Thursday, April 15th 2010 @ 12:24AM

I'm watching you make stool...

Pinback
Thursday, August 19th 2010 @ 11:59AM

Grub2 link is broken. Time for me to build a PXE server.

Leave a comment





archives

jabber status

subscribe

plan updates

  • Testing plit. Ignore me! (5 days ago)
  • Why is 'skin a cat' even a known phrase? Did people do that regularly? Lets replace it immediately with "hump a bear" (26 days ago)
  • Pinched a nerve while wrestling with the dog, can barely move my head. Errr... when did I become this feeble old man? (29 days ago)
  • If you're a banking institution, "Find us on Facebook!" does not fill me with trust. "Trendy" is not a positive banking attribute. (over 1 month ago)
  • Just shaved my 7-year old daughter's head bald because she really wanted to. Trying to decide what parenting style that falls under. (over 1 month ago)

recently bookmarked