Subject: Re: disklabel wince problem
To: None <port-hpcsh@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-hpcsh
Date: 07/08/2002 01:22:39
On Fri, Jul 05, 2002 at 12:25:50 +0300, Vesa A Norrman wrote:

> On Fri, 5 Jul 2002, Valeriy E. Ushakov wrote:
> 
> > Do you have a FAT partition on the CF or is the NetBSD partition the
> > only one and uses the whole card?  I have a small FAT partition (with
> > hpcboot, the kernel and wince backup) and wince never complains.
> 
> I made partitions like this (typed from screen):
> 
> Disk: /dev/rwd0c
> NetBSD disklabel disk geometry:
> cylinders: 980 heads: 8 sectors/track: 32 (256 sectors/cylinder)
> 
> BIOS disk geometry:
> cylinders: 980 heads: 8 sectors/track: 32 (256 sectors/cylinder)
> 
> Partition table:
> 0: sysid 4 (Primary DOS with 16 bit FAT <32MB)
>     start 32, size 44000 (21 MB), flag 0x0
>         beg: cylinder    0, head   1, sector  1
>         end: cylinder  171, head   7, sector 32
> 1: sysid 169 (NetBSD)
>     start 44032, size 206848 (101 MB), flag 0x0
>         beg: cylinder  172, head   0, sector  1
>         end: cylinder  979, head   7, sector 32
> 2: <UNUSED>
> 3: <UNUSED>
> 
> After fdisk wince was going with a 21MB partition ok, but after disklabel
> wince formats everything. Also, when I made the partitions
> wince didn't understand unless I used the command
> dd if=/dev/zero of=/dev/rwd0c count=100
> before fdisk. How strange... Vesa

Mine is as follows.  It was originally partitioned/formatted on my
laptop, the output below is also from the laptop.  One diff I can see
immediately is partition 'c' ws 'd' for the "whole disk".  Your
mentioning the dd(1) trick you had to do reinforces my suspicions.

<root@glip:~> (1030) fdisk wd1
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 978 heads: 8 sectors/track: 32 (256 sectors/cylinder)

BIOS disk geometry:
cylinders: 978 heads: 8 sectors/track: 32 (256 sectors/cylinder)

Partition table:
0: sysid 1 (Primary DOS with 12 bit FAT)
    start 32, size 32736 (15 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  127, head   7, sector 32
1: sysid 169 (NetBSD)
    start 32768, size 217600 (106 MB), flag 0x0
        beg: cylinder  128, head   0, sector  1
        end: cylinder  977, head   7, sector 32
2: <UNUSED>
3: <UNUSED>
<root@glip:~> (1031) disklabel wd1
# /dev/rwd1d:
type: ESDI
disk: Hitachi ATA  6.0
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 8
sectors/cylinder: 256
cylinders: 978
total sectors: 250368
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/sgs]
 a:    217600     32768     4.2BSD   1024  8192   286   # (Cyl.  128 - 977)
 c:    217600     32768     unused      0     0         # (Cyl.  128 - 977)
 d:    250368         0     unused      0     0         # (Cyl.    0 - 977)
 e:     32736        32      MSDOS                      # (Cyl.    0*- 127)
 f:    217600     32768     unused      0     0         # (Cyl.  128 - 977)

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen