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=3Dmfs_root set kFreeBSD.vfs.root.mountfrom=3Dufs:/dev/md0c set kFreeBSD.boot.nfsroot.server=3D$pxe_default_server set kFreeBSD.boot.netif.hwaddr=3D$net_pxe_mac set kFreeBSD.boot.netif.ip=3D$net_pxe_ip set kFreeBSD.dhcp.host-name=3D$net_pxe_hostname } On Tue, Apr 24, 2012 at 2:10 PM, Rick Miller <vmiller@hostileadmin.com> wro= te: > Hi All, > > I am attempting to build FreeBSD 8.x-RELEASE over the network via PXE. > =A0I chain pxegrub to pxelinux and load the FreeBSD kernel and mfsroot > through pxegrub with the following: > > menuentry "freebsd-x86_64" { > =A0 kfreebsd /boot/kernel/kernel > =A0 kfreebsd_loadenv /boot/device.hints > =A0 kfreebsd_module /boot/mfsroot.gz type=3Dmfs_root > =A0 set kFreeBSD.vfs.root.mountfrom=3Dufs:/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. =A0I set > variables necessary to allow sysinstall to retrieve the expected > files. =A0The variables (previously) are populated as follows: > > server=3D`kenv -q boot.nfsroot.server` > mac=3D`kenv -q boot.netif.hwaddr` > ip=3D`kenv -q boot.netif.ip` > nm=3D`kenv -q boot.netif.netmask` > gw=3D`kenv -q boot.netif.gateway` > name=3D`kenv -q dhcp.host-name` > route=3D`kenv -q dhcp.routers` > > > The mfsroot.gz does not see these as set when the environment loads > through pxegrub. =A0If I load the environment through pxeboot.bs, the > variables populate ok. =A0Unfortunately, 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 --=20 Take care Rick Miller
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHzLAVGPjWgFjQZVpZr1sFZ6CyUeEMz=KwY8B9B8gKYHtDLMBg>