Sorry for the inconvenience.  Known Navigation header breakage.
There may be other unforeseen breakage primarily in the handbook portion of the wiki.
The Table Of Contents section of each "PC-BSD® Users Handbook" page may be the best workaround.

Difference between revisions of "Adding PC-BSD to Grub Version 2"

From PC-BSD Wiki
Jump to: navigation, search
(Blanked the page)
Line 1: Line 1:
[[Image:home.png|link=|center|Return to Table of Contents]] [[Image:previous1.png|left|link=|Previous: Adding PC-BSD to Grub Version 1]] [[Image:next1.png|right|link=|Next: Dual Boot with Windows Using EasyBCD]]
If your Linux distro is using grub version 2, the entry would now look like this:
title  PCBSD 8.1
root  (hd0,1,a)
kernel /boot/loader
Here are some examples of more complex grub version 2 entries:
'''To set some sysctl values when loading the kernel:'''
menuentry "PCBSD (FreeBSD) 8.1" {
  insmod ufs2
  set root=(hd0,3)
  kfreebsd /boot/kernel/kernel
  set KFreeBSD.vfs.root.mountfrom=ufs:dev/label/rootfs0
  set KFreeBSD.vfs.root.mountfrom.options=rw
'''To use the specified drive UUID:'''
First, at a command prompt in the PC-BSD system, determine the UUID with this command:
# '''/usr/local/sbin/grub-probe -d /dev/ad4s1 -t fs_uuid'''
Then, use that UUID in the grub menu entry:
menuentry "FreeBSD ad4, direct" {
  insmod ufs2
  set root=(hd0,1,a)
  search --no-floppy --fs-uuid --set 4b22f9090565ab77
  kfreebsd /boot/kernel/kernel
  kfreebsd_loadenv /boot/device.hints
  set KFreeBSD.vfs.root.mountfrom=ufs:/dev/ad4s1a
  set KFreeBSD.vfs.root.mountfrom.options=rw
'''To use ZFS on GPT Partition:'''
zfs set mountpoint=legacy on all datasets on ${ZPOOL} and manage mountpoints in ${ZFSDATASET-INSTALLATION}/etc/fstab
menuentry "FreeBSD install in ${ZFSDATASET-INSTALLATION} (i.e. 8.1-RELEASE-amd64) on ${ZPOOL} (i.e. zroot)" {
          insmod zfs
          # search for ${ZPOOL}
          search -s -l zroot
# Load kernel of FreeBSD, kfreebsd /${ZFSROOTDATASET}/${ZFSDATASET-INSTALLATION}@/boot/kernel/kernel [ (-aCcDdghmnPpqrsv)]
          kfreebsd /8.1-RELEASE-amd64@/boot/kernel/kernel
          kfreebsd_module_elf /8.1-RELEASE-amd64@/boot/kernel/opensolaris.ko
          kfreebsd_module_elf /8.1-RELEASE-amd64@/boot/kernel/zfs.ko
# Loading kernel modules (${VAR}_load="YES") here, /boot/loader.conf isn't processed
#        kfreebsd_module_elf /${ZFSDATASET-INSTALLATION}@/boot/kernel/${VAR}.ko
          kfreebsd_module /8.1-RELEASE-amd64@/boot/zfs/zpool.cache type=/boot/zfs/zpool.cache
          set kFreeBSD.vfs.root.mountfrom=zfs:zroot/8.1-RELEASE-amd64
# Loader Tunables (${TUNABLE}="variable" -> set kFreeBSD.${TUNABLE}=variable)
After a Grub2 configuration change you need to run '''update-grub''' as the superuser or '''sudo update-grub'''.
For more information please refer to the [ Grub 2 manual]

Revision as of 08:16, 17 December 2010

Personal tools