# Issues automating FreeBSD 9.2 install with pc-sysinstall



## nxe (Oct 7, 2013)

I've been trying to automate the FreeBSD 9.2 install on a CD for rapid deployment using pc-sysinstall. I've been using following the guide here http://permalink.gmane.org/gmane.os.freebsd.devel.hackers/49161 with a few changes.

First, I modify etc/rc.local on the disk to just do the following:


```
#!/bin/sh
# $FreeBSD: release/9.2.0/release/rc.local 248241 2013-03-13 14:01:58Z nwhitehorn $
export TERM=vt220

echo "o PC-SYSINSTALL "

exec /usr/sbin/pc-sysinstall -c /conf/install.cfg
```


And I use a simple config file as just to test it. 


```
# Sample configuration file for an installation using pc-sysinstall
installMode=fresh
installInteractive=no
installMedium=dvd
netDev=AUTO-DHCP
hostname=autotest

# Set the disk parameters - 1st disk
disk0=ada0
partition=all
bootManager=bsd
commitDiskPart
# Setup the disk label - 1st disk
# All sizes are expressed in MB
# Avail FS Types, UFS, UFS+S, UFS+J, ZFS, SWAP
#disk0-part=UFS+S 0 /
disk0-part=UFS 1000 /
disk0-part=SWAP 2000 none
disk0-part=UFS 0 /usr

# Size 0 means use the rest of the slice size
# Do it now!
commitDiskLabel

# Set if we are installing via optical, USB, or FTP
installType=FreeBSD
packageType=tar

# List our components to install
#installComponents=ports,src

# Set the root pass
rootPass=root

# Setup our users
userName=demo
userComment=Demo User
userPass=demo
userShell=/bin/sh
userHome=/home/demo
commitUser
```


After making my bootable iso, I launch it in VirtualBox, the disk partitions and then I get the following error


```
[Snip]
Running: sync
Running: glabel label usr0 /dev/ada0s1d
Running: sync
mount -o rw /dev/ada0s1a -> /mnt/
Running: mount -o rw /dev/ada0s1a /mnt/
swapon /dev/ada0s1b
Running: swapon /devada0s1b
mount -o rw /dev/ada0s1d -> /mnt/usr
EXITERROR: ERROR: Unable to locate installation DVD/USB
```

We are trying to stick with pc-sysinstall instead of bsdinstall for our support staff(they know linux kickstart). Any form of insight on what I might be doing wrong or any suggestions on how to reach the same objective (Automating FreeBSD 9.2 for rapid deployment on a CD) would be greatly appreciated.


----------



## J65nko (Oct 8, 2013)

It could be a VirtualBox/sysinstall issue. You could retry on real hardware.

I like to use a Makefile to automate installs with minimal human intervention. See Makefile for Vermaden's FreeBSD ZFS root install adapted for 4K sector disks for an example. Using this from an installation USB stick, I can create a basic ZFS install within 5 minutes.


----------



## Ikinoki (Oct 8, 2013)

nxe,

I think it would be easier and cheaper just to write an rc script to cd/dvd/flash which replaces the bsdinstall to run and install everything according to your choices.

There are plenty of manual setup instructions on the net.


----------

