Subject: Re: NetBSD installation
To: None <port-i386@netbsd.org>
From: Georges Heinesch <geohei-ml@geohei.lu>
List: port-i386
Date: 09/23/2001 18:45:12
Quoting Bruce Anderson (23-Sep-01 13:23:52):

> On Sun, Sep 23, 2001 3:22 AM, Georges Heinesch
> <mailto:geohei-ml@geohei.lu> wrote:
>>>>   3: <UNUSED>
>>>>   ----- cut here -----
>>
>>*** Why is the last partition (3:) always <UNUSED>?

> Because you alwase left it UNUSED.
> eg . If you only wish to divide a pie in two-
> why would you make two or more cuts instead of one?

> Four partition table entries are allowed.
> How many do you need?

Ok. Now I got the poit. fdisk always spits out 4 partition for every
disk, independantly how many are really occupied. Thanks!

> Some math.
> Part    start      size       end
> 0       16065  81931500  81947565
> 1 81947565   8122275  90069840
> 2
> 3         
> Total for partitions 0 and 1 = 81931500 + 8122275 = 90053775
> We see from dmesg that wd1 is 90069840 sectors in size.
> 90069840 - 90053775 + 16065 = 0
                      ^
                      should be "-" ?!

So that's all right, isn't is?

>>*** Why does 0: start at 16065? To me, it looks like some unused
>>partition would be ahead (possibly 2: or 3:)?

> Because the start of partition 0 was offset by one cylinder
> instead of one track.
> Cylinder is 16065 sectors. Track is 63 sectors.

Ok.

>>Partition table:
>>0: sysid 15 (Ext. partition - LBA)
>>    start 16065, size 81931500 (40005 MB), flag 0x0
>>    beg: cylinder    1, head   0, sector  1
>>    end: cylinder 1022, head 254, sector 63

> Should be:

>>0: sysid 15 (Ext. partition - LBA)
>>    start 63, size 81931500+16002 (40005 MB), flag 0x0
>>    beg: cylinder    0, head   1, sector  1
>>    end: cylinder 1022, head 254, sector 63

This is a matter of moving the 40005 MB partition towards the
beginning of the drive. This is a piece of cake for PartitionMagic.
But since the EndCyl is too high, I can't use PartitionMagic (it
declares this drive as bad and refuses all opertions due to this
EndCyl problem).

Another question is that fdisk EndCyl output is always 1022. This is
definitely not correct. For other drive I have installed, it is always
1023. How come? Shall/Must/Can I correct this?

>>> Post   dmesg |grep ^wd  along with your fdisk output.

>>NetBSD is on wd1.

>>wd0: drive supports 16-sector pio transfers, lba addressing
>>wd0: 16479 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 33750864
>> sectors

>>wd1: drive supports 16-sector pio transfers, lba addressing
>>wd1: 43979 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 90069840
>> sectors

>>wd0: no disk label

>>0  1  80  1022  254  63  A9  1022  254  63  81,947,565  8,122,275
>>Info: Begin C,H,S values were large drive placeholders.
>>Info: End C,H,S values were large drive placeholders.
>>Actual values are:
>>0  1  80  5101    0   1  A9  5606  149  63  8,194,7565  8,122,275
>>Error #109: Partition ends after end of disk.
>>  ucEndCylinder (5606) must be less than 5606.
>>Info: Partition didn't end on cylinder boundary.
>>  ucEndHead expected to be 254, not 149.
>>----- cut here -----
>>
>>1. The EndCyl is 1 Cyl too high.
>>2. The haed is wrong (149 instead of 254).
>>
>>However I don't know if there values are now the BIOS reported
>>values or the MBR values?!
>>
>>I'm sure there is a way to fix that without backup, recreating and
>>restore.

> What is happening here is that partition 1 does not end on a
> cylinder boundry.
> eg.

>      start      size       end sectors/cylinder cylinders/Partition
> 0    16065  81931500  81947565            16065                5100
> 1 81947565   8122275  90069840            16065            ~505.588

I guess this should be:

     start      size       end sectors/cylinder cylinders/Partition
0    16065  81931500  81947565            16065                5100
1 81947565   8112825  90060390            16065                 505

Is that correct?

> 5100 + 505.58823529411765 = 5605.5882352941176 cylinders.

> That half cylinder at the end of the NetBSD partition
> is what the partitioning software is wining about.

I wonder how that was possible.

> Time to backup the data on the drive and start over.

Since partition 0 is ok (abart from the fact that it could be moved 1
cyl towards the beginning of the drive), partition 1 (NetBSD) is the
only one which is creating problems.

Isn't it possible to use fdisk -u to modify the partition table
safely?

TIA

-- 
Cu  Georges Heinesch, Luxembourg
    geohei@geohei.lu
    http://www.geohei.lu
    PGP RSA & DH/DSS public key on request and on public servers

... better do a good thing today, than a perfect thing tomorrow ...