Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2012 07:22:21 -0400
From:      Rick Miller <vmiller@hostileadmin.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: pxegrub + FreeBSD install
Message-ID:  <CAHzLAVGPjWgFjQZVpZr1sFZ6CyUeEMz=KwY8B9B8gKYHtDLMBg@mail.gmail.com>
In-Reply-To: <CAHzLAVE%2BiHkX1Pqb7=%2BG=G_dtuijL1FJDE%2B_ppR%2BHC9xYtH63A@mail.gmail.com>
References:  <CAHzLAVE%2BiHkX1Pqb7=%2BG=G_dtuijL1FJDE%2B_ppR%2BHC9xYtH63A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

I was able to figure out how to pass the variables to the FreeBSD
mfsroot.  I did so by modifying the grub.cfg file like the below:

menuentry "freebsd82-x86_64" {
   kfreebsd /boot/kernel/kernel
   kfreebsd_loadenv /boot/device.hints
   kfreebsd_module /boot/mfsroot.gz type=mfs_root
   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/md0c
   set kFreeBSD.boot.nfsroot.server=$pxe_default_server
   set kFreeBSD.boot.netif.hwaddr=$net_pxe_mac
   set kFreeBSD.boot.netif.ip=$net_pxe_ip
   set kFreeBSD.dhcp.host-name=$net_pxe_hostname
}


On Tue, Apr 24, 2012 at 2:10 PM, Rick Miller <vmiller@hostileadmin.com> wrote:
> Hi All,
>
> I am attempting to build FreeBSD 8.x-RELEASE over the network via PXE.
>  I chain pxegrub to pxelinux and load the FreeBSD kernel and mfsroot
> through pxegrub with the following:
>
> menuentry "freebsd-x86_64" {
>   kfreebsd /boot/kernel/kernel
>   kfreebsd_loadenv /boot/device.hints
>   kfreebsd_module /boot/mfsroot.gz type=mfs_root
>   set kFreeBSD.vfs.root.mountfrom=ufs:/dev/md0c
> }
>
> The mfsroot.gz is from the installation DVD with a couple of scripts
> and an install.cfg which result in a non-interactive install.  I set
> variables necessary to allow sysinstall to retrieve the expected
> files.  The variables (previously) are populated as follows:
>
> server=`kenv -q boot.nfsroot.server`
> mac=`kenv -q boot.netif.hwaddr`
> ip=`kenv -q boot.netif.ip`
> nm=`kenv -q boot.netif.netmask`
> gw=`kenv -q boot.netif.gateway`
> name=`kenv -q dhcp.host-name`
> route=`kenv -q dhcp.routers`
>
>
> The mfsroot.gz does not see these as set when the environment loads
> through pxegrub.  If I load the environment through pxeboot.bs, the
> variables populate ok.  Unfortunately, with pxeboot.bs I experience
> extremely high tftp failure rates when compared to pxegrub.
>
> My question is how should I populate these variables in the mfsroot.gz
> when loading via pxegrub?
>
>
> --
> Take care
> Rick Miller



-- 
Take care
Rick Miller



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHzLAVGPjWgFjQZVpZr1sFZ6CyUeEMz=KwY8B9B8gKYHtDLMBg>