Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to install FreeBSD alongside my Debian installation in a single partition. All examples readily present on the Internet had shortcomings:

  1. Some required chainloading the FreeBSD chainloader in ways GRUB2 refused to accept with "invalid signature".
  2. Some assume you've installed FreeBSD inside a BSD disklabel.
  3. None of the solutions (including loading /boot/loader) boot after changing the order of the devices or moving them from server to server.
  4. None of the solutions work on Debian: The naming of the GRUB2 options on Debian seems to be different from e.g. Ubuntu.

So how do I dual boot Debian and FreeBSD in the most reliable way?

share|improve this question
Instead of putting your answer in the question, please instead post it as an answer... – derobert Sep 27 '12 at 18:49

Append the following to your /etc/grub.d/40_custom replacing UUID with the UUID of the disk discovered with grub-probe -d /dev/sda2 -t fs_uuid

menuentry 'FreeBSD' {
   insmod ufs2
   insmod bsd

   search --fs-uuid --no-floppy --set=root UUID

   kfreebsd /boot/kernel/kernel
   kfreebsd_loadenv /boot/device.hints

   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/ufsid/UUID
   set kFreeBSD.vfs.root.mountfrom.options=rw

Note that for other distros and/or GRUB versions, kfreebsd might have to be changed to just freebsd.


share|improve this answer
I tried this. The first time the boot process stopped at a screen of many multi-colored squares blinking. Some with letters, some with extended ascii symbols. I went back and replaced --set=root UUID w/ --set root=UUID. This time I got three error msgs no argument specified, file not found, and you need to load the kernel first – user32578 Feb 18 '13 at 2:49
worked perfectly for me! thanks – Hassan Samii Nov 25 '15 at 16:59

I have used grub2 before while trying to dual boot with kubuntu and ubuntu . I used this tutorial: http://www.dedoimedo.com/computers/grub-2.html#mozTocId16468. It was extremely helpful and very reliable .

"Dual boot: two operating systems with GRUB 2

This is probably the simplest dual-boot configuration. Both operating systems use GRUB 2, so they can easily interact with one another. The two systems are Ubuntu 9.10 and Kubuntu 9.10, both formatted with Ext4."

Hope this is helpful for people who are trying to use this one .

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.