Swap Partition First?

Martin McCormick martin at dc.cis.okstate.edu
Wed Jan 27 21:15:54 UTC 2010


Our FreeBSD systems mostly have a very simple disk layout. There
is a 1 or 2-gigabyte swap partition and all the rest is FreeBSD.
When manually configuring these partitions in sysinstall, I
usually set up swap first with a 1GB size and then use the
remaining  space by selecting the values as defaults.

	An attempt to script this in an install.cfg file is not
going well. The disk formatting part of the file is as follows:

disk=ad0
partition=all
bootManager=none
diskPartitionEditor
#Entire disk is FreeBSD.
diskPartitionWrite
################################

################################
# All sizes are expressed in 512 byte blocks!
#
#1G swap followed by / on rest of disk.
#
ad0s1-2=swap 2097152 
#All the rest is FreeBSD with soft updates.
ad0s1-1=ufs 0 / 1
# Let's do it!
diskLabelEditor
diskLabelCommit

# OK, everything is set.  Do it!
installCommit

	This doesn't work. sysinstall reports that it can't
write the swap space.

	fdisk reports a FreeBSD partition and all the others are
shown as free.

	Any ideas? Thank you.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group


More information about the freebsd-questions mailing list