Swap Partition First?

Martin McCormick martin at dc.cis.okstate.edu
Tue Feb 2 17:28:28 UTC 2010

	I figured out a way to install swap as the only
fixed-sized partition such that whatever is left is marked as
BSD (165) but I am not sure if this is a workable solution so I
am asking for suggestions.

	If I set up the disk label reference file as follows:

# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a: *  2097152    4.2BSD     2048 16384 28552 
  b:  2097152        0      swap                    

bsdlabel gets very confused and one ends up with possibly swap
and about 4 gigabytes of FreeBSD which is not right.

	So, I inverted things since what we want is for
everything but swap to be FreeBSD and we want this to work on
some disk for which we may not know the size.

# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  2097152        0      swap                    
  b: *  2097152    4.2BSD     2048 16384 28552 

	This means one mounts ad0s1b instead of ad0s1a which is
what you normally see. Will this create some sort of monster
later down the line?

	The hope is to create a largely automated process that
coworkers can use if we ever need to recreate X or Y server from
a new piece of hardware during an upgrade or after a lightening
storm when every minute counts. Many thanks.

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

More information about the freebsd-questions mailing list