Subject: Re: Dicing with disks
To: Andy Ball <ball@cyberspace.org>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 07/31/2001 14:10:13
On Tue, 31 Jul 2001, Andy Ball wrote:
> > one fdisk pseudopartition (for MBR bootloader to
> > work) is created like this...
"fdisk" is optional if the disk isn't to be booted from.
> That prompts my next question - how do I make a
> filesystem? I tried 'man mkfs' without success.
The command is "newfs", but first you have to make the partition type
into "4.4BSD", and set the fsize, bsize, and cpg parameters. For example:
4 partitions:
# size offset fstype [fsize bsize cpg]
a: 4198257 63 4.2BSD 4096 32768 96 # (Cyl. 0*- 4164)
b: 8396640 4198320 4.2BSD 1024 4096 32 # (Cyl. 4165 - 12494)
c: 12594897 63 unused 0 0 # (Cyl. 0*- 12494)
d: 12594960 0 unused 0 0 # (Cyl. 0 - 12494)
You can do that with...
disklabel -W wd0
env EDITOR=vi disklabel -e wd0
disklabel -N wd0
["wd0a" is my "/usr", and wd0b has the NetBSD cvs'd sources.]
Now, "newfs" only picks up the fragment size and block size from the
disklabel -- it seems to ignore the cylinders per group -- so to
actually make a file system with custom parameters you'd have to
specify "-c", as, for example, "newfs -c 96 /dev/rwd0a". [If you want
to stick with the defaults, they're "1024 8192 16".]
Frederick