Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Oct 2001 10:55:09 -0700
From:      Glenn Trewitt <glenn@trewitt.org>
To:        "Brett G. Lemoine" <bl@incyte.com>
Cc:        stable@FreeBSD.ORG
Subject:   Re: install.cfg (was Re: Why sshd:PermitRootLogin = no ? )
Message-ID:  <3BBDF3FA.49901CED@trewitt.org>
References:  <200110051720.KAA87668@blah.incyte.com>

next in thread | previous in thread | raw e-mail | index | archive | help
man sysinstall

It allows you to define pre-set answers to sysinstall's questions.  You can do
subsets, only answering some of the questions.  For example, do the disk config by
hand, and then do distribution selection from the config.

You put the file (install.cfg default) on a floppy and after you've booted to the
sysinstall menu you can load the config.  On the main FreeBSD install window, the
next-to-last item is how you access it.

I've attached the one that I use for some of my machines.  (It is, obviously,
derived from the example in the man page.)

Note that some machine variations can't be worked around - you'll have to have
separate XXX.cfg files to accomodate them:
    Variation in network devices (if you're doing network installs).
    Variations in file system layout (e.g., if some systems have a big disk that
you want an extra partition on).
    Variations in the device to install onto (e.g., ad0 vs da0, etc.)

Hope this is useful.
    - Glenn

#  This file should be copied onto a UFS- or DOS-formatted floppy.
#  The conventional name for it is "install.cfg".
#
#  Invoke this file from the main sysinstall menu with the "Load Config"
#  item.  You will be prompted to insert the floppy and select the file.
#
#  This configuration script specifies a simple installation, as follows:
#  * Filesystems:
# / 100 MB
# swap 384 MB
# /var 512 MB
# /usr remainder of the disk
#  * Load via FTP, configuring IP manually or via DHCP,
# depending on settings below.
#  * Distributions:
# "X User" + info + ports
#  * Packages:
# emacs-20.7
#
#  See sysinstall(8) for more details.
#
#  Summary:
#    Each var=value (no quotes) sets a variable.
#    Each directive (e.g., mediaSetXXX, diskPartitionEditor, etc.)
# invokes one small segment of the sysinstall process.  If the
# appropriate variables have been set, then it will execute without
# requesting that information from the user.  Otherwise, it will
# bring up the usual configuration dialogs.

# Turn on extra debugging.
debug=yes

################################
# Which installation device to use - ftp is pointed to a nearby machine.
_ftpPath=ftp://10.0.0.10/pub/FreeBSD/
netDev=fxp0


################################
# Set these variables for DHCP network configuration
#ifconfig_fxp0=DHCP
hostname=temp
tryDHCP=YES
tryRTSOL=NO


################################
# Set these for manual network configuration
#hostname=temp
#tryDHCP=NO
#tryRTSOL=NO
#domainname=xyzzy.com
#defaultrouter=10.0.0.254
#ipaddr=10.0.0.249
#netmask=255.255.255.0
#nameserver=10.0.0.1


################################
#  Now get FTP configured.
#  Note that this may succeed, only to fail later when
#  installCommit tries to open the FTP connection.
mediaSetFTP


################################
# Now set the parameters for the partition editor on ad0.
# This makes a single "compatible" slice, with no fancy boot manager.
disk=ad0
partition=all
bootManager=standard
diskPartitionEditor


################################
#  Unix disk partitions
#
# All sizes are expressed in 512 byte blocks!

# A 100 MB root partition
ad0s1-1=ufs 204800 /

# And a 384 MB swap partition
ad0s1-2=swap 786432 none

# The last "1" arg enables soft updates.
# And a 512 MB /var
ad0s1-3=ufs 1048576 /var 1

# Finally, /usr gets the rest of the space (size 0 = free space)
ad0s1-4=ufs 0 /usr 1

diskLabelEditor


################################
# Now partition the 2nd disk.
#disk=ad1
#partition=exclusive
#diskPartitionEditor

#ad1s1-1=ufs 40960 /var 1
#ad1s1-2=ufs 0 /usr/src 1
#diskLabelEditor



################################
#  Write out the partition and disk label
diskPartitionWrite
diskLabelCommit


################################
# Select which distributions we want.
# USER = bin doc manpages dict crypto
dists=bin doc manpages dict crypto info ports Xbin Xlib Xman Xfnts Xprog
#dists=bin doc manpages dict crypto info ports
distSetCustom


################################
# OK, everything is set.  Do it!
installCommit

# Install some packages at the end.
package=emacs-20.7
packageAdd

################################
#  One could add more steps here.  For example, invoking packageAdd with
#  no package specfied, to let the user browse for more packages.
#  Or, setting up NFS/FTP/, adding users, setting root password...



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BBDF3FA.49901CED>