Different sysinstall labelling behaviour when run post-install vs. during install?

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Jul 30 02:51:41 PDT 2004


On Thu, Jul 29, 2004 at 06:01:50PM -0700, Darren Pilgrim wrote:
> Yesterday I was upgrading the disk in one of my workstations.  Since I was
> planning on growing the filesystems for my FreeBSD install at the same time,
> I needed to manually create a new disklabel.  I used sysinstall for this,
> but ran into a problem: sysinstall doesn't allocate the partition letters,
> with 'a' first, if you aren't doing an initial install.  I ended up using
> the "auto defaults" option to create the 'a' partition, then remove
> everything and create them as I wanted.  I'm glad to say that it worked out
> just fine, but this problem raises a couple of questions:
> 
> Why does sysinstall behave differently when run post-install?

Interesting.  I didn't know it did that.  At a guess what may be
happening is that sysinstall(8) is treating your disk as if it was the
second or subsequent disk on the system.  In which case, it probably
wouldn't allocate an 'a' partition, which by convention contains a
bootable image.
 
> How do I manually specify or change the partition letter to use?

Don't use sysinstall(8). sysinstall is like the training wheels
children use when learning to ride a bike: essential in the beginning,
but once they've achieved some proficiency, the training wheels just
get in the way.

Use disklabel(8), or if you're running 5.x, bsdlabel(8).  It's the
same program either way, it just got renamed for 5.x.  disklabel will
let you examine and make arbitrary edits to the disk label.  You can
also use it to generate a disklabel automatically.

To make the sort of changes you require, use 'disklabel -e' which will
put you into an editor session showing the current disk label.  Then
just edit the 'partitions' section as required.  When creating a new
partition, you must fill in the 'size', 'offset' and 'fstype' fields.
for ordinary 4.2BSD (ie UFS) partitions, the next three fields are
hints to newfs(8) -- the default settings (fsize=1024, bsize=8192,
bps/cpg=16) are a good first choice, but you can modify those at will
from the newfs(8) commandline.  The cylinder number stuff after the
'#' is generated automatically: you don't need to fill anything in
there yourself.

Once you've revamped the partitioning, you'll need to create
filesystems to go inside those partitions.  newfs(8) will create you a
pristine new filesystem, or if you're feeling brave, you can use
growfs(8) to extend a filesystem, but a) only where the old partition
starts at exactly the same offset as the new one and b) only when the
new partition is *larger* than the old one.  growfs(8) is more often
used with such things as vinum(8) -- for plain UFS partitions dumping
the filesystem, modifying the drive layout, creating new filesystems
and recovering the data from backup is generally the best way to do
such things, and least likely to result in foot-shooting.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040730/7713cbc8/attachment.bin


More information about the freebsd-questions mailing list