I'd like to modify the bsdinstall scripts used during the install process in order to automate and customize future FreeBSD 9 installations. Mainly, I want to setup root on ZFS without having to enter the Shell environment at the Partitioning step and enter a series of commands. I don't even want to enter the Shell environment to download and run a script for this (as seen here). I've created a modified copy of the auto bsdinstall script and several other scripts that will be run by auto.
My first attempt was to mount the installation ISO, copy its contents to a writable file system, modify the contents of the copy (as described above), and create an ISO of the copy. I ran [cmd=]mkisofs -R -no-emul-boot -b boot/cdboot -o <ISO-target-path> <modified-copy>[/cmd] to create an ISO of the copy. The ISO would be created, but it could not be used to boot a system.
My next attempt was to use /usr/src/release/generate-release.sh, which I modified to copy my custom scripts to <scratch-dir>/usr/src/usr.sbin/bsdinstall/scripts after the source is checked out from svn.freebsd.org into <scratch-dir>. After the release was built, I mounted the yielded ISO only to see that my scripts were not on the ISO.
Can I modify the FreeBSD 9 installation ISO to fulfill my goal of automating the root-on-ZFS process? If not, what do you suggest as an alternative?
My first attempt was to mount the installation ISO, copy its contents to a writable file system, modify the contents of the copy (as described above), and create an ISO of the copy. I ran [cmd=]mkisofs -R -no-emul-boot -b boot/cdboot -o <ISO-target-path> <modified-copy>[/cmd] to create an ISO of the copy. The ISO would be created, but it could not be used to boot a system.
My next attempt was to use /usr/src/release/generate-release.sh, which I modified to copy my custom scripts to <scratch-dir>/usr/src/usr.sbin/bsdinstall/scripts after the source is checked out from svn.freebsd.org into <scratch-dir>. After the release was built, I mounted the yielded ISO only to see that my scripts were not on the ISO.
Can I modify the FreeBSD 9 installation ISO to fulfill my goal of automating the root-on-ZFS process? If not, what do you suggest as an alternative?