# Dualboot Freebsd and Ubuntu 9.10 with Grub2



## skido (Apr 15, 2010)

Hello,

I want to have a dualboot on my computer.:e For this purpose I have installed BSD on a primary partition and on another one I have installed Ubuntu. When I was installing FreeBSD, I have chosen the bootloader to be installed, too. After this I have insalled Linux and its loader grub2 in hd0.

This is what fdisk -l says:

```
matew@sodis:~$ sudo fdisk -l

Platte /dev/sda: 300.1 GByte, 300069052416 Byte
255 KÃ¶pfe, 63 Sektoren/Spuren, 36481 Zylinder
Einheiten = Zylinder von 16065 Ã— 512 = 8225280 Bytes
Disk identifier: 0xa8a8a8a8

   GerÃ¤t  boot.     Anfang        Ende     BlÃ¶cke   Id  System
/dev/sda1   *           1        6375    51199816+  a5  FreeBSD
Partition 1 endet nicht an einer Zylindergrenze.
/dev/sda2            6376        6678     2433847+  82  Linux Swap / Solaris
/dev/sda3            6679        7711     8297572+  83  Linux
/dev/sda4            7712       36481   231095025   83  Linux
```

I had made a mod to my grub.cfg and hoped it will boot my BSD, but it faild. Look in the attachement. 

Can someone please help me to get through this? 

Greetz 

Martin


----------



## skido (Apr 15, 2010)

Ok,

I ve found the mistake. There was a "=" missing in my BSD entry. Now I can start BSD booting, but it is stuck at the beginning. So what is wrong with it?

It says smth. like a few massages and "/boot/kernel/kernel text= 0x8924d8" than it stops booting. So is the loader missing? What is wrong?

I am using grub2 allready. how can I solve the problem?


----------



## skido (Apr 15, 2010)

http://media.ubuntuusers.de/forum/attachments/2441976/DSC00463.JPG

here u can see my screen while itÂ´s stuck


----------



## presario (Apr 21, 2010)

Show your grub config. The attached file in your first post does not have an entry for FreeBSD.


----------



## skido (Apr 22, 2010)

```
martin@sodis:~$ cat /etc/gr
gre.d/  groff/  group   group-  grub.d/ 
martin@sodis:~$ cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set c8144323-a432-4013-a8a5-c6d25e9620b3
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-20-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set c8144323-a432-4013-a8a5-c6d25e9620b3
	linux	/boot/vmlinuz-2.6.31-20-generic root=UUID=c8144323-a432-4013-a8a5-c6d25e9620b3 ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-20-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set c8144323-a432-4013-a8a5-c6d25e9620b3
	linux	/boot/vmlinuz-2.6.31-20-generic root=UUID=c8144323-a432-4013-a8a5-c6d25e9620b3 ro single 
	initrd	/boot/initrd.img-2.6.31-20-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set c8144323-a432-4013-a8a5-c6d25e9620b3
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=c8144323-a432-4013-a8a5-c6d25e9620b3 ro   quiet splash
	initrd	/boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set c8144323-a432-4013-a8a5-c6d25e9620b3
	linux	/boot/vmlinuz-2.6.31-14-generic root=UUID=c8144323-a432-4013-a8a5-c6d25e9620b3 ro single 
	initrd	/boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "FreeBSD 8.0 64 bit" {
      	  set root=(hd0,1,a)
      	  chainloader +1
	}
```

looks like this but it still doesnÂ´t boot freebsd.


----------

