Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
1  
Instead of putting your answer in the question, please instead post it as an answer... –  derobert Sep 27 '12 at 18:49

2 Answers 2

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.

Reference:

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

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

 
discard

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.