FreeBSD Jumpstart and config questions

Hello all,

This is going to be long, but hopefully I can keep your interest long enough to be able to glean some additional information from you.

Using the FreeBSD PXEBoot Guide, I built a server running 8.0-RELEASE. I configured DHCP, TFTP , and FTP. I compiled a pxeboot file to support TFTP and place it in ${TFTPROOT}/boot/. I also modified the mfsroot file to contain various directories and the install.cfg file.

loader.rc looks like:

Code:
include /boot/loader.4th
start
check-password

loader.conf looks like:

Code:
verbose_loading="YES"
mfsroot_load="YES"
mfsroot_type="mfs_root"
mfsroot_name="/boot/mfsroot"
autoboot_delay=-1

install.cfg (inside the mfsroot) looks like:

Code:
debug=yes

################################
# My host specific data
netDev=bce0
tryDHCP=YES
hostname=jsclient
defaultrouter=192.168.100.5
netmask=255.255.255.0
ipaddr=192.168.100.195


################################
# Which installation device to use
_ftpPath=ftp://192.168.100.5/
ftpUser=ftp
mediaSetFTP


################################
# Select which distributions we want.
dists=base doc manpages info kernels GENERIC
distSetCustom
################################

################################
# Now set the parameters for the partition editor on mfid0.
disk=mfid0
partition=all
bootManager=none
diskPartitionEditor

# Disk partitioning.
# All sizes are expressed in 512 byte blocks!
mfid0s1-1=ufs 16777216 /        # 8GB
mfid0s1-2=swap 4194304 none     # 2GB
mfid0s1-4=ufs 4194304 /var      # 2GB
mfid0s1-5=ufs 2097152 /tmp      # 1GB
mfid0s1-6=ufs 0 /home 1         # free
diskLabelEditor

# OK, everything is set.  Do it!
installCommit

# Install some packages at the end
package=perl-5.8.9_3
packageAdd
package=bash-4.0.33
packageAdd
package=python26-2.6.2_3
packageAdd
package=sudo-1.6.9.20
packageAdd
#package=linux_base-f10-10_2
#packageAdd
package=cdrtools-2.01_7
packageAdd
package=dvd+rw-tools-7.1
packageAdd

# Shut the system down after install
shutdown

I was able to get a machine to boot and build from start to finish non-interactively, which was my main goal.

I have several questions though, whose answers seem to be alluding me.

1) There are variables in install.cfg whose values depend on various scenarios. For example, netDev, ipaddr, and disk. netDev and disk could differ based on different chipsets in the bare metal. ipaddr, even though I specify tryDHCP=YES, had to be hard-coded in when I use mediaSetFTP.

How can I accommodate the possible variations available to variables like this in the install.cfg?

2) I need to build 2+ hosts simultaneously. What additional considerations do I need to address in a Jumpstart scenario? It appears to me that the issue described above would impact building 2 or more machines at the same time.

3) Can I use the same pxeboot and boot kernel to install multiple versions of the OS? For example, I have 8.0-RELEASE and 8.1-RC2 available on the build server. When booting into this environment, how can I have the client tell the server which version to install?

Thanks for any and all feedback.

--
Rick
 
Hey i am doing the same these days...

My goal to make multiple Installations is to use $_SERVER['remote_ADDR'] on the server that delivers my final install.cfg

Just have look in the mailing list..

My can stick together and maybe find the solution...

icq 115985
 
1) There are variables in install.cfg whose values depend on various scenarios. For example, netDev, ipaddr, and disk. netDev and disk could differ based on different chipsets in the bare metal. ipaddr, even though I specify tryDHCP=YES, had to be hard-coded in when I use mediaSetFTP.

How can I accommodate the possible variations available to variables like this in the install.cfg?

I believe I have a way of accomplishing this. I've got a script that I run from install.cfg that determines the network interface, hostname, gateway, etc. To get it working, I needed to generate a new boot_crunch that included a couple new binaries.

I do have one problem with this, though. The script I am running inside the mfsroot sends output to a file which is later loaded from install.cfg. However, when the sysinstall attempts to write the file, it errors out citing read-only filesystem. I thought /tmp would have been mounted rw, but I guess in the case of a ramdisk, such as mfsroot, it is not.

I created an fstab with the following line, but it produced the same result. Is there an alternative option for setting these variables? Can I somehow write a file in a ramdisk?

Code:
md /tmp mfs rw,noatime,-s512M 0 0

This produced the same result
 
I do have one problem with this, though. The script I am running inside the mfsroot sends output to a file which is later loaded from install.cfg. However, when the sysinstall attempts to write the file, it errors out citing read-only filesystem. I thought /tmp would have been mounted rw, but I guess in the case of a ramdisk, such as mfsroot, it is not.

I resolved this by creating a memdisk in the script before writing the file to it.
 
Back
Top