There have been some changes in how PXE booting works with the release of FreeBSD 9.0. So I wanted to share some of what needs to be done to boot FreeBSD 9.0 via PXE.
The quick notes for people that have done PXE booting on prior versions of FreeBSD is:
- mfsroot is gone, so no config needed in /boot/loader.conf (i.e. it should be empty).
- Copy over the new pxeboot binary to your TFTP space, the old one will not work.
PXE Booting Guide
Prep the PXE Boot Server host
This is where the DHCP server, NFS Server and PXE Boot server will live. They could all easily live on different machines.- Download the FreeBSD 9 disc1 ISO from here: http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.0/
- Create a directory to store the files in:
# mkdir /usr/public/freebsd90-amd64
- Attach the iso as a device:
# mdconfig -a -t vnode -f FreeBSD-9.0-RELEASE-amd64-disc1.iso
- Mount the device:
# mount_cd9660 /dev/md0 /mnt
- Copy the files over:
# cp -R /mnt/* /usr/public/freebsd90-amd64
- Unmount the device:
# umount /mnt
- Detach the device:
# mdconfig -d -u 0
- Comment out the etc/fstab entry to mount from the cdrom media:
# vi /usr/public/freebsd90-amd64/etc/fstab
- Export the Directory via NFS in /etc/exports:
/usr/public/freebsd90-amd64 -ro
- Wiew my article
Setup a NFS server on FreeBSD
about how setup/run NFS Server. - Restart the mount daemon:
# pkill -HUP mountd
- Create a Directory for tftp files:
# mkdir /usr/public/tftp
- Enable tftp in /etc/inetd.conf:
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /usr/public/tftp
- Enable inetd in /etc/rc.conf:
inetd_enable="YES"
- Start inetd:
# /etc/rc.d/inetd start
- Copy over the pxeboot file to the tftp area:
# cp /usr/public/freebsd90-amd64/boot/pxeboot /usr/public/tftp
- Configure DHCPd:
host fbsd9pxe { hardware ethernet xx:xx:xx:xx:xx:xx; fixed-address 192.168.1.45; next-server 192.168.1.10; filename "pxeboot"; option root-path "/usr/public/freebsd90-amd64/"; }
- Enable DHCPd in /etc/rc.conf:
dhcpd_enable="YES"
- Start DHCPd:
/usr/local/etc/rc.d/isc-dhcpd start
Boot your system
If everything went well you should be presented with the Installer ready to go.source
Niciun comentariu:
Trimiteți un comentariu