Init Based Auto Install Tutorial

As the subject line says this is an init based auto installation. Basically, it is a modified boot-only.iso & mfsroot.gz that does its best to guess hardware that you are using and install the base system with a GENERIC kernel. When you boot the supplied hard disk image it will kick mfsroot as usual but this mfsroot has extra utilities like cut, ping, mount, and the likes. It also houses the /etc/rc.jumpstart which is what is kicked off at init before parsing /etc/rc.

I have modified and documented how to modify the mfsroot.gz to execute an /etc/rc.jumpstart file which will automatically install the system. It takes it best guess on hardware like dynamic network configuration (I had a hard time getting dhclient to work properly in the modified environment). I am probably going to extend this to loop through all network devices found in ifconfig and keep trying until it gets a successful link. In terms of indentifying a disk it will execute sysctl and grab the output of kern.disks and install to the first disk it finds. I tested this again and found a bug where if there is more than one disk it will actually install on the last disk because I dont sort the output-- I will be modifying it as such come next week.

I cover the following in the document

Prerequisites & Assumptions
A downloadable copy of my PXE-Bootable FreeBSD Auto-Install
Configuration details of my PXE-Bootable FreeBSD Auto-Install
Configuring PXE Linux to boot PXE-Bootable FreeBSD Auto-Install
Instructions on how to modify my install to suit your environment


And the flow of the auto-install goes as such

Auto detecting network the best it can– this facility is rudimentary at best by parsing ifconfig and getting the first device it sees. This can probably be expanded to try each device until it gets an active link
Pings the host as defined in the FTP_HOST variable
Auto detecting the disk to write to the best it can– again, this facility is rudimentary. It executes sysctl -a and gets the kern.disks output and grabs the first disk it sees then uses that for slicing and labeling
Automatically formats and slices the disk (using fdisk)
Automatically creates the label and makes the drives bootable
Downloads the core & kernel files from an FTP– this will probably be where you have to change the script
Mounts the devices and installs the base & kernel packages
Cleans up


http://ckozler.net/?p=292
 
Back
Top