Installing FreeBSD with netboot
Contents |
FreeBSD bootonly
The first step to installing FreeBSD via netboot is to acquire FreeBSD. We'll be using the bootonly-iso, this can be fetched at your nearest ftp.
Download the bootonly:
fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/6.2/6.2-RELEASE-i386-bootonly.iso
Mount the iso-image and copy the contents to some location:
mdconfig -a -t vnode -f 6.2-RELEASE-i386-bootonly.iso mount_cd9660 /dev/md0 /mnt/cdrom mkdir /usr/local/pxeboot cp -r /mnt/cdrom /usr/local/pxeboot umount /mnt/cdrom
The main reason for copying the cd is to edit the file /boot/loader.conf adding the following line:
echo 'vfs.root.mountfrom="ufs:/dev/md0c"' >> /usr/local/pxeboot/boot/loader.conf
This line will make the pxeboot-loader mount the rootfs from a memorydisk instead of the default of mounting a NFS-filesystem.
NIC with PXE boot
For the pxeboot to work you might have to update your NIC with new firmware. See your manufacturer homepage for more information.
TFTP
Next up is starting a tftp-server from which the firmware can load the network bootstrap program from. This is easiest done by using inetd, remove the leading # from the following line in the file /etc/inetd.conf.
#tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
Then start inetd by adding it to rc.conf and starting it.
echo 'inetd_enable="YES"' >> /etc/rc.conf /etc/rc.d/inetd start