Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2005 18:46:52 -0500 (EST)
From:      Mike Peterson <mikep@noc.utoronto.ca>
To:        freebsd-questions@freebsd.org
Subject:   Re: Dual boot + scripted install?
Message-ID:  <200503242346.j2ONkq5o005389@kraken.noc.utoronto.ca>

next in thread | raw e-mail | index | archive | help
All of this is FreeBSD 5.2.1, if it matters.

I'm trying to do a scripted install / Jumpstart using PXE booting
and 'install.cfg'; all works fine when assigning the entire disk
to FreeBSD.

When I change to have 'install.cfg' select the "free" disk space left
after WinXP is installed in slice 1, it fails in various ways ("Copy
returned error status of 1" when attempting to label the disk and/or
install boot manager, or can't create '/dev/da0s2b').

If I go through the procedure manually, using either standard install
or Expert install, create the partition/slice manually, install
'BootMgr', and create the Disklabel partitions by hand (on 'da0s2'),

all is fine, except it doesn't install my selected packages.

Here is the hopefully relevant part of 'install.cfg':

 ---------------------- install.cfg -------------------------------
# Turn on extra debugging.
debug=YES

# Ok, this ought to turn off ALL prompting.
nonInteractive=YES
noWarn=YES
tryDHCP=YES

#
# FreeBSD installation configuration.
#
# Host configuration (DHCP will actually set most of this).
#
netDev=bge1
hostname=XXX.utoronto.ca

#
# Server configuration for FreeBSD installation.
#
_ftpPath=ftp://10.1.2.3/IDS
mediaSetFTP

#
# Distribution configuration.
#
dists=base crypto bin doc manpages info compat21 des src sbase ssys setc ports
distSetCustom

#
# Disk partition ("slice") / Master Boot Record configuration.
#
# Slice 1: Windows (should be pre-installed)
# Slice 2: FreeBSD (will use remaining free space on the disk)
#
disk=da0
partition=free
# Use 'all', and change 'da0s2' to 'da0s1' below to use the entire disk.
#partition=all
bootManager=booteasy
diskPartitionEditor
# Doing this here causes problems - can't create '/dev/da0s2b'.
#diskPartitionWrite

#
# Disk label configuration.
#
# #	Partition	Size (MB)	Size (blocks)
# -	---------	---------	-------------
# 1	/		      500	      1024000
# 2	swap		     4096	      8388608
# 3	/var		      100	       204800
# 4	/usr		    10000	     20480000
# 5	/data		remainder	    remainder
#
# Note: sizes below are in blocks (512 bytes).
#
da0s2-1=ufs   1024000 /
da0s2-2=swap  8388608 none
da0s2-3=ufs    204800 /var  1
da0s2-4=ufs  20480000 /usr  1
da0s2-5=ufs         0 /data 1
#
diskLabelEditor
diskLabelCommit

#
# Install FreeBSD.
#
installCommit

#
# Install extra packages.
#
_ftpPath=ftp://10.1.2.3/IDS
mediaSetFTP

package=cvsup-without-gui
packageAdd

...

package=IDSINSTALL
packageAdd

#
# End 'sysinstall'.
#
shutdown
 ------------------------------------------------------------------

The problems with this I know of are that the slice is created with the
wrong subtype (not 165); I have not been able to delete/recreate the
slice / label it / commit successfully once the install dies and puts
you back into interactive mode.

I tried commenting off 'nonInteractive=YES', and/or adding
'diskInteractive=YES'; both work fine, but the rest of 'install.cfg' is
not run (and none of the partition settings are picked up automatically).

I'd be happy to do some of the FDISK / Disklabel stuff by hand if
necessary, but how to make the install process pick up where it left
off?

I've got several pointers to web sites that deal with this issue, sort
of, but they are all interactive installs. The 'sysinstall' man page
and 'help' files are not as illuminating as I hoped :-(.

Thanks in advance,
Mike.
--
Perform plastic surgery: cut up your credit cards.          Mike Peterson
                                                            U/T Network Security
E-mail: mikep@noc.utoronto.ca                               Tel: 416-978-5230
WWW:    http://www.noc.utoronto.ca/~mikep/                  Fax: 416-971-1362



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503242346.j2ONkq5o005389>