Thu 14 Oct 2010 02:39:58 PM UTC, original submission:
I am trying to setup GRUB2 on a PXE-Server to enable me to boot multiple versions of Debian and FreeBSD from my server.
Since FreeBSD ist my main platform I started moving that to the server. After fighting with the (non-existant) documentation for about two weeks I got everything to the point where I can load the kernel.
However the kernel won't mount root from NFS. As an alternative to an NFS-Mount, I decided to go for an MFSROOT first, as described here:
http://www.martini.nu/blog/2010/01/freebsd-pxe-grub.html
I set up an MFSROOT with /etc /bin/ /sbin/ /lib and /libexec, and I can manage to boot that with a lot of hacking to some point.
Anyway, what I realised was that all the modules (except the mfsroot) that grub supposedly loaded (tmpfs, NFS), where actually not* loaded, kldstat (the FreeBSD equivalent to lsmod) shows only the kernel. This could explain the Kernel not being able to boot over NFS and it causes other problems.
Maybe I am also doing something wrong, e.g. I have no clue about the "type=" parameter, since I found no docu.
Thank you very much for your help.
Regards,
Hannes
PS: This is the config:
menuentry "FreeBSD STABLE amd64 over PXE" {
echo "Loading Kernel..."
kfreebsd /freebsd_stable_amd64/kernel/kernel.gz Dh
echo "Loading MFSROOT..."
kfreebsd_module /freebsd_stable_amd64/mfsroot.gz type=mfs_root
set kFreeBSD.vfs.root.mountfrom=ufs:/dev/md0c
echo "Loading Modules..."
kfreebsd_module /freebsd_stable_amd64/kernel/nfscl.ko
kfreebsd_module freebsd_stable_amd64/kernel/nfscommon.ko
kfreebsd_module /freebsd_stable_amd64/kernel/nfsclient.ko
kfreebsd_module /freebsd_stable_amd64/kernel/tmpfs.ko
echo "Setting variables...."
set kFreeBSD.boot.nfsroot.server=192.168.3.200
set kFreeBSD.boot.nfsroot.path="/p00l/data/pxeboot/freebsd_stable_amd64"
# set kFreeBSD.vfs.root.mountfrom="nfs:192.168.3.200:/p00l/data/pxeboot/freebsd_stable_amd64"
set kFreeBSD.vfs.root.mountfrom.options=rw
set kFreeBSD.vfs.nfs.diskless_rootpath="192.168.3.200:/p00l/data/pxeboot/freebsd_stable_amd6$
echo "...done."
}
|