Automating pfsense installation



  • hi guys,
    Does the install.cfg file which is used for automated freeBSd installtion also apply to pfsense?
    If so, where should i put it? What modification should I make?

    Thanx in advance


  • Rebel Alliance Developer Netgate

    No, that doesn't work with pfSense.

    It isn't documented much, if at all, but there is a pfi.conf which is part of the "pre-flight install" which can set certain parameters, but I'm not sure if it can automate the install fully.



  • hi jimp,
    sorry for the delay. I was searching to get any sample pfi.conf file. I also seached if I can get any info about pre-flight installation.But i can't get any. Please give me some hints if you have any.

    Thanx a lot


  • Rebel Alliance Developer Netgate

    Bear in mind that I have not tried or tested this, but here is a sample pfi.conf file from the server. It just shows available options and such:

    #######################################################################
    # $Id: pfi.conf,v 1.10 2005/07/09 00:07:07 cpressey Exp $
    # Defaults for pfi.conf.
    
    # A space-separated list of what services to restart when we are done
    # changing options.  The services are the base names of RCNG scripts
    # (i.e. without the "/etc/rc.d/" prefix.)  Note that these must be
    # given explicitly in the same order they would normally be started
    # by rcorder during RCNG (e.g. "netif dhclient sshd"); they are not
    # automatically ordered by their dependencies here.
    
    pfi_rc_actions=""
    
    # Determines which installer frontend to use.  Defaults to "curses";
    # other legal options are "cgi" and "none".
    
    pfi_frontend="curses"
    
    # Determines which installer backend to use.  The standard backend
    # is now the Lua backend, but this can be changed, to start an
    # alternate backend.  (See example #4, below.)
    
    pfi_backend="/usr/local/bin/lua50c51 /usr/local/share/dfuibe_lua/main.lua"
    pfi_backend="$pfi_backend option.booted_from_install_media=true"
    
    # When using the curses frontend:
    # Set the amount of time, in milliseconds, which must pass after
    # the 'ESC' key is pressed, in order for it to be recognized
    # as a plain 'ESC' keystroke, and not part of an escape code.
    
    pfi_curses_escdelay="150"
    
    # A password to set as the root password on the LiveCD, if any.
    
    pfi_set_root_password=""
    
    # Control corresponding sshd options.  To make sure sshd restarts with
    # these options, add "sshd" to pfi_rc_actions.
    
    pfi_sshd_permit_root_login="NO"
    pfi_sshd_permit_empty_passwords="NO"
    
    # An script to run before the installer.  It is assumed this script is
    # located on the pfi media.  While it is run, the media's root directory
    # is mounted on /mnt.
    
    pfi_script=""
    
    # A program to run before the installer.  It is assumed to reside on
    # the LiveCD; /mnt is not mounted.
    
    pfi_run=""
    
    # What transport layer the DFUI in the installer should use.  Valid
    # values are currently "caps", "npipe", and "tcp".
    
    pfi_dfui_transport="tcp"
    
    # User to automatically log in as, or "NONE".
    
    pfi_autologin="NONE"
    
    # Command to use to reboot.  "shutdown -h now" is typically used
    # interactively, to give the user a chance to eject the disk, but
    # "shutdown -r now" can be used for headless operation.
    
    pfi_shutdown_command="shutdown -h now"
    
    #######################################################################
    # EXAMPLES
    # To use one of these examples, extract it to a text file and remove the
    # leading pound-signs.  Copy this text file to the file "/pfi.conf"
    # on a floppy disk or USB pen drive (hereinafter referred to as "the pfi
    # media") and have that media inserted or attached to the computer while
    # you boot from the installer CD-ROM.  The installer will attempt to
    # locate this file and, if found, will use the variables present within it
    # to configure the installer boot process.
    
    # This file has the same syntax as /etc/rc.conf, and it can contain any
    # setting which is meaningful in /etc/rc.conf as well.  Any rc.conf
    # setting which is given will only be obeyed, however, if the RCNG script
    # to which that setting applies is named in pfi_rc_actions.
    
    # EXAMPLE 1:
    # Boot the installer headless, configure the network interface dc0,
    # and start the CGI frontend.
    #
    # ifconfig_dc0="DHCP"
    # pfi_rc_actions="netif dhclient"
    # pfi_frontend="cgi"
    # pfi_autologin="installer"
    # pfi_shutdown_command="shutdown -r now"
    
    # EXAMPLE 2:
    # Boot the installer headless, configure the network interface rl0,
    # and allow ssh'ing into the box as root with the password "sekrit".
    #
    # ifconfig_rl0="DHCP"
    # pfi_sshd_permit_root_login="YES"
    # pfi_set_root_password="sekrit"
    # pfi_rc_actions="netif dhclient sshd"
    # pfi_frontend="none"
    # pfi_autologin="installer"
    # pfi_shutdown_command="shutdown -r now"
    
    # EXAMPLE 3:
    # Boot the cd and setup a PXE/TFTP/DCHPD server environment
    # so that clients can boot from the network and enter the installer
    #
    # Enable tftp and NFS services with pxeboot and a kernel available via
    # tftp and the CD's root mount available via NFS.
    #
    # pfi_boot_tftp_server="YES"
    # pfi_boot_nfs_server="YES"
    # pfi_boot_pxeserver="YES"
    # pfi_boot_ipserver="YES"
    # pfi_option_subnet-mask="255.255.255.0"
    # pfi_option_routers="10.0.250.1"
    # pfi_filename="pxeboot"
    # pfi_ddns-update-style="none"
    # pfi_option_domain-name="domain.com"
    # pfi_option_broadcast-address="10.0.250.255"
    # pfi_option_domain-name-servers="192.168.64.3"
    # pfi_server-name="DHCPServer"
    # pfi_server-identifier="10.0.250.50"
    # pfi_default-lease-time="7200"
    # pfi_max-lease-time="7200"
    # pfi_subnet="10.0.250.0 netmask 255.255.255.0"
    # pfi_next-server="10.0.250.50"
    # pfi_range="10.0.250.29 10.0.250.250"
    
    # EXAMPLE 4:
    # Revert to the traditional, C language backend.
    #
    # pfi_backend="/usr/local/sbin/dfuibe_installer"
    

Log in to reply