Subject: Re: Dicing with disks
To: None <port-i386@netbsd.org>
From: Andy Ball <ball@cyberspace.org>
List: port-i386
Date: 07/31/2001 13:43:25
Hello Wojciech!

  WP> i always install/prepare disk manually (no sysinst)
    > and when it is netbsd-only disk i use only disklabel
    > after doing disklabel -I -i wd0 and installboot ....
    > one fdisk pseudopartition (for MBR bootloader to
    > work) is created like this...

Thanks. I remembered late last night that disklabel (on i386
at least) created BIOS level partitions, and that fdisk
subdivided these further for use with BSD. I used 'disklabel
-I -i wd0' as per your suggestion, and then wrote the label
to disk with the W command.

I then ran fdisk, not sure whether that was a good idea or
not (can I make a filesystem on a disk that has just been
labelled?).  That prompts my next question - how do I make a
filesystem?  I tried 'man mkfs' without success.

I won't be installing NetBSD onto this disk. I'm just trying
to make a data disk that I can mount onto the disk that
already has (some of) NetBSD installed.

Regards,
  - Andy.

--------------------------------<disklabel wd0>---------------------------------
# /dev/rwd0d:
type: ESDI
disk: Conner Periphera
label: fictitious
flags:
bytes/sector: 512
sectors/track: 46
tracks/cylinder: 8
sectors/cylinder: 368
cylinders: 903
total sectors: 332304
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  c:   266386       46     unused        0     0         # (Cyl.    0*- 723)
  d:   332304        0     unused        0     0         # (Cyl.    0 - 902)
  e:   266386       46     unused        0     0         # (Cyl.    0*- 723) 

----------------------------------<fdisk wd0>-----------------------------------
NetBSD disklabel disk geometry:
cylinders: 903 heads: 8 sectors/track: 46 (368 sectors/cylinder)

BIOS disk geometry:
cylinders: 902 heads: 8 sectors/track: 46 (368 sectors/cylinder)

Partition table:
0: sysid 169 (NetBSD)
    start 46, size 266386 (130 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  901, head   7, sector 46
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>

--------------------------------------------------------------------------------.