Warning: This procedure will make the ``Server'' both insecure and dangerous, it is best to just keep the ``Server'' on its own hub and not in any way accessible by any machines other than the ``Clients''.
Terminology:
Server The machine offering netboot and install options.
Client The machine that will have FreeBSD installed on it.
Requires: Clients supporting the Intel PXE netboot option, an Ethernet connection.
Please let me know if you come across anything you have problems with or suggestions for additional documentation.
If you would like someone to train/implement a specific netinstall system for you, please send email so that we can discuss terms.
I would also like to thank Paul Saab
________________________________________
2 Server Configuration
1. Install DHCP: Install net/isc-dhcp3 you can use this config file dhcpd.conf, stick it in /usr/local/etc/.
2. Enable tftp:
1. Make a directory /usr/tftpboot
2. Add this line to your /etc/inetd.conf:
3. tftp dgram udp wait nobody /usr/libexec/tftpd tftpd /usr/tftpboot
3. Enable NFS:
1. Add this to /etc/rc.conf:
2. nfs_server_enable="YES"
3. Add this to /etc/exports:
4. /usr -alldirs -ro
4. Reboot to enable the new services or start them manually.
________________________________________
3 Bootstrap Setup
1. Download bootfiles: Download the kern.flp and mfsroot.flp floppy images.
2. Set up tftp/pxe-boot directory:
1. Put pxeboot in the boot directory:
2. # rm -rf /usr/obj/*
3. # cd /usr/src/sys/boot
4. # make
5. # cp /usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot
6. Using the vndevice mount the kern.flp file and copy its contents to /usr/tftpboot:
7. # vnconfig vn0 kern.flp # associate a vndevice with the file
8. # mount /dev/vn0 /mnt # mount it
9. # cp -R /mnt /usr/tftpboot # copy the contents to /usr/tftpboot
10. # umount /mnt # unmount it
11. # vnconfig -u vn0 # disassociate the vndevice from the file
3. Compile a custom kernel for the clients (particularly to avoid the device config screen at boot) and stick it in /usr/tftpboot.
4. Make a special loader.rc to and install it in /usr/tftpboot/boot/loader.rc so that it does not prompt for the second disk, here is mine.
5. Extract the installer and helper utilities from the mfsroot disk and uncompress them, put them in /usr/tftpboot as well:
6. # vnconfig vn0 mfsroot.flp # associate a vndevice with the file
7. # mount /dev/vn0 /mnt # mount it
8. # cp /mnt/mfsroot.gz /usr/tftpboot # copy the contents to /usr/tftpboot
9. # umount /mnt # unmount it
10. # vnconfig -u vn0 # disassociate the vndevice from the file
11. # cd /usr/tftpboot # get into the pxeboot directory
12. # gunzip mfsroot.gz # uncompress the mfsroot
13. Make your sysinstall script install.cfg, you can use mine as a template, but you must edit it.
14. Copy the sysinstall script into the extracted and uncompressed mfsroot image:
15. # cd /usr/tftpboot
16. # vnconfig vn0 mfsroot
17. # mount /dev/vn0 /mnt
18. # cp install.cfg /mnt
19. # umount /mnt
20. # vnconfig -u vn0
________________________________________
4 Install Setup
1. Put the install files in an NFS accessible location on the Server. Make a directory corresponding the 'nfs' directive in the install.cfg file and mirror the FreeBSD install files there, you will want it to look somewhat like this:
2. ABOUT.TXT TROUBLE.TXT compat20 floppies ports
3. ERRATA.TXT UPGRADE.TXT compat21 games proflibs
4. HARDWARE.TXT XF86336 compat22 info src
5. INSTALL.TXT bin compat3x kern.flp
6. LAYOUT.TXT catpages crypto manpages
7. README.TXT cdrom.inf dict mfsroot.flp
8. RELNOTES.TXT compat1x doc packages
9. Copy the compressed packages into the packages/All directory under nfs.
10. Make sure you have an INDEX file prepared in the packages directory. You can make your own INDEX entries like so:
11. alfred-1.0||/|Alfred install bootstrap||alfred@FreeBSD.org||||
Then you can install custom packages, particularly your own custom post-install package.
________________________________________
5 Custom Post-Install Package
You can use the script pkgmaker.sh to create a custom package for post install, the idea is to have it install and configure any special things you may need done. pkgmaker is run in the directory above the package you wish to create with the single argument of the package (ie mypkg) which will then create a mypkg.tgz for you to include in your sysinstall package.
Inside your custom package dir you will want a file called PLIST which contains all the files that you wish to install and be incorporated into your package.
You will also want files called pre and post in the directory, these are shell scripts that you want to execute before and after your package is installed.
Since this package is in your install.cfg file it should be run and do the final configuration for you.