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

  • Doing taxes like a bawse (9 days ago)
  • My hands and willpower gave out before I won anything on Sparkfun's captcha-until-you-puke ride, today. http://is.gd/EUtzWd (23 days ago)
  • I'm eating trail mix for dinner (over 1 month ago)
  • Really wish Glympse and Waze would team up and be one program on my phone. Oh, and then be bought by google and added to Navigator. (over 1 month ago)

recently bookmarked