Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2014 10:10:10 -0800
From:      <dteske@FreeBSD.org>
To:        "'amine tay'" <amine.tay91@gmail.com>, <freebsd-hackers@freebsd.org>
Subject:   RE: FreeBSD 9.X network installation using PXE+TFTP (not NFS) !
Message-ID:  <1a6901cf3a30$7b7b8ed0$7272ac70$@FreeBSD.org>
In-Reply-To: <CAMMGsZ%2BBOpLowveVLOoGZqTNva1o%2BiHXwu28dW1X-Uf%2BnG476w@mail.gmail.com>
References:  <CAMMGsZ%2BBOpLowveVLOoGZqTNva1o%2BiHXwu28dW1X-Uf%2BnG476w@mail.gmail.com>

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


> -----Original Message-----
> From: amine tay [mailto:amine.tay91@gmail.com]
> Sent: Friday, March 7, 2014 2:36 AM
> To: freebsd-hackers@freebsd.org
> Subject: FreeBSD 9.X network installation using PXE+TFTP (not NFS) !
> 
> Hi everyone,

Hello.

> I'm trying to perform a FreeBSD 9.X network installation using PXE+TFTP
(not
> NFS) !
> The problem using NFS is the need to specify the root-path in the dhcp
conf,
> therefore we can't deploy multiple releases or different images of
freebsd.
> 

You're correct that utilizing the root-path identifier of dhcpd.conf limits
your
abilities. However, that does not mean that you can't use NFS.

Before you say anything else, look at these images that I created for my
setup:
http://druidbsd.sf.net/download/pxe-config.png
http://druidbsd.sf.net/download/FreeBSD_PXE_Install_Workflow_alt.gif

The later "workflow" image shows a comparison against iPXE based cobbler
and my latest setup that I created last week:
http://druidbsd.cvs.sf.net/druidbsd/pxe-config/
http://druidbsd.sf.net/download/tftpboot.txz


> So to enable the tftp instead of NFS we have to edit make.conf with these
lines
> LOADER_TFTP_SUPPORT=YES LOADER_NFS_SUPPORT=NO and rebuild the
> pxeboot file
> 

Make sure you choose your TFTP server software carefully if you're going to
go
the route of loading any files >32MB over TFTP.

To support >32MB single file over TFTP make sure you use tftp-hpa
(ftp/tftp-hpa)
which I have enabled on my server with the following rc.conf entries:

	tftpd_enable="YES"
	tftpd_flags="-p4B 1024 -s /tftpboot -a 192.168.1.1"


> 1st question is : Is this modification going to allow the install of
differents
> freebsd images?
> 
> Note that I'm using an automated os deployement solution , and I am using
> mac-adresses to deploy freebsd depending on policies, so for exemple two
> clients with different mac-adresses will have two diffrents freebsd
images.
> 

If you don't add pxelinux to the mix and rely on dhcpd for the solution of
using the MAC address to change the identifiers handed to the PXE boot
client, that may work but may also limit you.

pxelinux ( which comes from the sysutils/syslinux port -- of which I
submitted
an update recently, bringing the latest version to 6.02 *fixing* broken HTTP
based loading of ISO files; http://www.freshports.org/sysutils/syslinux/
)...

... provides 2 functionalities that help you. First, it can actually do the
same
thing as your dhcp MAC binding and choose a specialized config to be loaded
over TFTP based on the MAC address. 

... and second, but more importantly, it can provide an interactive menu
with
a list of options.

However, integrating syslinux's pxelinux, gpxelinux, or lpxelinux modules
into
the FreeBSD workflow can be challenging. That's why I'm providing the above-
mentioned "pxe-config" tool to simplify the process of integrating a menu of
multiple FreeBSD choices.

The requirements of which are (as shown in the Workflow GIF above):

DHCP (net/isc-dhcp43-server)
TFTP (either freebsd-tftp or tftp-hpa will do fine; files >32M loaded over
HTTP)
HTTP (e.g., www/apache22)
SMB *or* NFS (nfs is built-in, for SMB e.g. net/samba36)

I wanted the system to work from a jail, so hence the SMB support.

If you have questions, don't hesitate to ask.
-- 
Cheers,
Devin

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1a6901cf3a30$7b7b8ed0$7272ac70$>