FreeBSD PXE Install Server (HOWTO)

logo-full-thumb
Howto document that describes how to setup a PXE install environment on FreeBSD.
There are multiple documents around but we didn't find one which had all the information. This is basically a combined document based on all the information that we could find. It has been tested on FreeBSD 7.1, booting multiple servers as well as a Soekris 4801.

# Fetch the bootonly iso from your FreeBSD local mirror.
fetch ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/7.1/7.1-RELEASE-i386-bootonly.iso

# Install the isc-dhcpd.
pkg_add -r isc-dhcp3-server

# Mount the FreeBSD bootonly iso.
mdconfig -a -t vnode -f 7.1-RELEASE-i386-bootonly.iso
mount -t cd9660 /dev/md0 /mnt

# Create a /pxeboot directory and copy the relevant files from the iso.
mkdir -p /pxeboot/boot
cp -rf /mnt/boot/* /pxeboot/boot

# Umount the iso.
umount /mnt
mdconfig -d -u md0

# Insert lines into /etc/rc.conf.
echo 'inetd_enable="YES"' >> /etc/rc.conf
echo 'nfs_server_enable="YES"' >> /etc/rc.conf
echo 'rpcbind_enable="YES"' >> /etc/rc.conf
echo 'dhcpd_enable="YES"' >> /etc/rc.conf

# NFS export for /pxeboot.
echo '/pxeboot -alldirs -maproot=root -ro' >> /etc/exports

# Edit /etc/inetd.conf so that it has a line like:
tftp   dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /pxeboot

# Create /usr/local/etc/dhcpd.conf with the following config.
allow booting;
allow bootp;
default-lease-time 600;
max-lease-time 7200;
authoritative;
ddns-update-style ad-hoc;
log-facility local7;

option domain-name "example.tld";
option domain-name-servers 192.168.1.2;
server-name "192.168.1.2";
server-identifier 192.168.1.2;
next-server 192.168.1.2;
option routers 192.168.1.2;
option root-path "192.168.1.2:/pxeboot";
filename "boot/pxeboot";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.11;
}

# Add the following to /pxeboot/boot/loader.conf.
echo 'vfs.root.mountfrom="ufs:/dev/md0c"' >> /pxeboot/boot/loader.conf

# Optionally you can also add the following lines when you want to do a headless install as well.
echo 'console="comconsole,vidconsole"' >> /pxeboot/boot/loader.conf
echo 'comconsole_speed="19200"' >> /pxeboot/boot/loader.conf

# When the headless install is for Soekris you might want to add the following to /pxeboot/boot/device.hints.
echo 'hw.ata.ata_dma="0"' >> /pxeboot/boot/device.hints

# Just to prevent failures when loading mfsroot.
gunzip -d /pxeboot/boot/mfsroot.gz

# Start / Restart all the daemons.
/etc/rc.d/inetd restart
/etc/rc.d/nfsd restart
/usr/local/etc/rc.d/isc-dhcpd restart

Hacking At Random

har-logo
Hackers at Random 2009, International technology & security conference. Four days of technology, ideological debates and hands-on tinkering. The follow-up of What the Hack (WTH2005), Hackers at Large (HAL2001), Hacking in Progress (HIP97) and Hackers at the end of the univese (HEU93). On August 13-16, 2009 the 20th anniversary edition of the four-yearly Dutch outdoor technology-conference will take place near Vierhouten, NL. You can buy your tickets at https://tickets.har2009.org/.

Foundry Networks YAML MIB

logo-corp-color-orig-half-size
If you are using SNMP with Ruby you might have noticed that it's not using standard MIBS. All MIBS are converted to YAML. Since there wasn't any Foundry Networks MIB available I created my own. You can download it here.

Minimalist Admin 0.5

This release includes 2 security fixes. If you are running an older version please upgrade!!
Minimalist Admin is a very simple web interface for Minimalist.
Download Minimalist Admin 0.5.
You can also find it on Freshmeat.