next-server 192.168.1.142; #指定nfs server,用于加载freebsd 的 loader和 kernel
root@:/mnt # cat install.cfg
# This is a sample installation configuration file for my test machine,
# crate.cdrom.com.
# It is included here merely as a sort-of-documented example.
#
# $FreeBSD: release/8.4.0/usr.sbin/sysinstall/install.cfg 247697 2013-03-03 09:09:59Z dteske $
# Turn on extra debugging.
debug=yes
################################
# My host specific data ##
安装系统时 就配置好主机名、 ip 等信息, 该部分配置可选,尤其是批量安装时,不能配置该部分
hostname=crate.cdrom.com
domainname=cdrom.com
nameserver=204.216.27.3
defaultrouter=192.168.1.1
ipaddr=192.168.1.240
netmask=255.255.255.0
################################
################################
# Which installation device to use - ftp is pointed directly at my local
# machine and the installation device is my WD8013 ethernet interface.
# netDev can be set to ANY or a comma-delimited list of interfaces.
# ftp 方式 ,指定安装介质的位置,也可以使用nfs
_ftpPath=ftp://192.168.1.122/iso
netDev=em0
mediaSetFTP
#nfs方式
#nfs=192.168.1.122:/var/ftp/iso
#netDev=em0
#mediaSetNFS
################################
################################
# Select which distributions we want.
dists=base doc manpages info src sbase ssys kernels GENERIC
distSetCustom
################################
################################
# Now set the parameters for the partition editor on ad0. Set to use the
# disk exclusively (could also be "all" to use the whole disk but
# respecting the MBR or "free" to use only unallocated space for FreeBSD).
#partition=exclusive
#diskPartitionEditor
# Uncomment this instead to use only the free space and install boot manager.
# 这里是 scsi 接口的硬盘,硬盘设备名称为 da0,这里容易出错,如果是sata,则为 ad0
disk=da0
partition=all
bootManager=booteasy
diskPartitionEditor
################################
################################
# Disk partitioning.
# All sizes are expressed in 512 byte blocks!
# A 512MB root partition
da0s1-1=ufs 10048576 /
# And a 512MB swap partition
da0s1-2=swap 1048576 none
# Followed by a /usr partition using all remaining space (size 0 = free space)
# and with softupdates enabled (non-zero arg following mountpoint).
#ad0s1-3=ufs 0 /usr 1
# Let's do it!
diskLabelEditor
################################
################################
# Now partition the 2nd disk with a 1GB /var and /usr/src using the
# remainder of the disk.
################################
################################
# And the 3rd, adding a second 512MB of swap and the rest of the disk
# for /tmp.
################################
# OK, everything is set. Do it!
installCommit
shutdown # 这个命令的实际效果为 重启,只在某个硬件平台上具有关机的效果