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

January/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.

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