Solved the problem by following instructions from here:
http://www.isysop.com/installing-gru...pt-partitions/
My layout: Ubuntu 11.04 installed on disc 1, PC BSD is installed on disc 2, both with GPT partitioning.
The following commands are run from Ubuntu to create a grub2 entry for PC BSD:
Check PC BSD disk layout:
sudo gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.7.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 586072368 sectors, 279.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C9ADF6CB-782F-11E0-B3F4-1C6F65D77750
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 586072334
Partitions will be aligned on 8-sector boundaries
Total free space is 10349 sectors (5.1 MiB)
Number Start (sector) End (sector) Size Code Name
1 34 161 64.0 KiB A501
2 2016 4196319 2.0 GiB A503
3 4196320 24086495 9.5 GiB A502
4 24086496 28280799 2.0 GiB A503
5 28280800 586063839 266.0 GiB A503
We need to use partition 2, find out its UUID:
sudo grub-probe -d --target=fs_uuid /dev/sdb2
4dc47576d57a6b8c
Create the following entry in the /boot/grub/grub.cfg:
menuentry "PC BSD 9 current" {
insmod ufs2
set root='(hd1,2)'
search --no-floppy --fs-uuid --set 4dc47576d57a6b8c
kfreebsd /boot/loader
}
It boots PC BSD just fine, though there is a complaint about missing arguments.