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

  • Surprisingly enjoyable, quiet evening of martini imbibing and Lua hacking. (24 days ago)
  • PC Game manufacturers need to stop listing "mouse and keyboard" among the requirements. I think we all are pretty well aware. (over 1 month ago)
  • P.S. You suck, and if I catch you trying again I'm going to hobble you with my aluminum baseball bat. Instant karma redemption. (over 2 months ago)
  • Dear asshat that failed to break into my car: did you have to break BOTH of my locks? Are you even familiar with the concept of a tumbler? (over 2 months ago)
  • "Your Amazon.com order of 'BLACK FUN FOAM 9 X 12 ...' has shipped!" ... don't ask. (over 2 months ago)

recently bookmarked