# PXE boot FreeBSD install with syslinux/pxelinux.cfg



## gqgunhed (Feb 11, 2013)

Hey guys,
I have a working PXE-installation on my FreeBSD 9.1-RELEASE server.

I mainly used instructions from http://www.wonkity.com/~wblock/docs/html/pxe.html to set things up and everything works fine so far. I've got menus for different tools and disks, all running smoothly.

Some information about the setup:
- ISOs presented via NFS(ro) or as raw files
- File transfer after init via HTTP
- NFS-presented ISOs mounted via mdconfig

The setup is used to repair PCs (AVG live-CD, UltimateBootCD, ...) or to install (LinuxMint).
The only thing I *cannot *get up running is booting FreeBSD-images to install from NFS-sources.

Be aware, I am using pxelinux.cfg/syslinux here as used in the post mentioned above. I am *not* going the way described in the FreeBSD handbook for PXE-booting as this allows only one file to be handed out via DHCP to the clients - and I need multiple options.

So I am "just" looking for the correct entry for my pxelinux.cfg like this:


> label mfsbsd
> menu label mfsBSD
> kernel memdisk
> initrd images/mfsbsd/mfsbsd.iso.gz
> append iso raw



This post here shows some differences in the PXE process, starting with 9.0-RELEASE. But refers to the FreeBSD handbook single-file-boot way, too.

Any suggestions to get a multi-boot PXE environment WITH FreeBSD install disks in this setup?


----------



## wblock@ (Feb 11, 2013)

It kind of works for me.  Note that I have not tested an actual install from this (lately?  can't recall), but it boots.


```
label freebsdinstall
  menu label FreeBSD Install
  pxe HTTPURL/images/freebsd-install/boot/pxeboot
```

The freebsd-install directory is a copy of an install CD.

pxeboot is loaded via HTTP and then boots from NFS.  There is no easy way to have multiple versions of FreeBSD install images available, because pxeboot can only boot from one directory.  A soft link can be used to pick one directory beforehand.

Modifications needed to the files copied from the install CD:

Remove or comment entries in /etc/fstab.

etc/rc.conf

```
sendmail_enable="NONE"
hostid_enable="NO"
update_motd="NO"
varmfs="YES"
tmpmfs="YES"
hostname="jumpstart"
```

For some reason, the Shell mode does not start.  The root password can be set with
`# pw -V etc usermod root -h0`
(note that is etc in the image directory, *not* /etc!)
But root login does not work.  I have not investigated.  It's probably not too hard to fix.


----------



## gqgunhed (Feb 12, 2013)

Thanks.
Will try that. I have done different "educated (more or less  ) guesses" to construct an entry for pxelinux.cfg.
But I did not use just "pxe" and the FreeBSD pxeboot-file. 

My tries all included something like nfsroot= ...

Preferably I don't want to copy the DVDs around, just mount them via mdconfig and export them via NFS - just to save space. So let's see if I can get it running without the modifications.

Will report my progress.


----------



## gqgunhed (Feb 13, 2013)

cross-references for me:
http://forums.freebsd.org/showthread.php?t=29144
-> http://zewaren.net/site/?q=node/82
--> http://phaq.phunsites.net/2007/02/14/convert-freebsd-iso-image-for-pxe-bootstrap/
But I still don't want to build a copied/modified FreeBSD "just" for PXE-install and -booting


----------

