Subject: SEVERE sysinst bug trashes my disk
To: None <port-i386@NetBSD.ORG>
From: Thor Lancelot Simon <tls@panix.com>
List: port-i386
Date: 12/06/1997 02:19:15
After several successful sysinst installs I wasn't expecting this:

Use Win95 FDISK to partition a disk, using the first 400MB for Win95,
and leaving the remaining 606MB for NetBSD (I marked it as  a "DOS
extended" partition with FDISK, figuring I'd change it.)

Format the DOS partition, install Win95, it all works.

Boot the 1.3_BETA boot floppy, run sysinst.  Sysinst sees the partitioning
correctly, and I change the partition type of partition 2 to NetBSD.  Get
through the NetBSD partitioing screen, etc, then things start to go wrong.

Sysinst appears to exec disklabel.  Disklabel gives me the dread "Valid
DOS partition table with no NetBSD partition, erase contents of disk?"
message.  I control-C it and go futz around with the NetBSD fdisk program.

Things get stranger and stranger.  If I just run "fdisk" from a shell
prompt, it gets everything right.  I presume it's reading the MBR
and partition table from memory.  But if I run "fdisk -i" or "fdisk -u"
it gives me a fictitious partition table where the only partition is
number 3, a NetBSD partition the size of the disk.  "Gee, that looks
awfully familiar!".

After beating my head against the wall here for a while, I shrug, rerun
sysinst (which, itself, still sees the partitioning correctly) and
answer "y" to the question from disklabel when it execs it.

It proceeds to blow away my MBR.

What the heck happened here?

The disk is a Western Digital 11000 (1.1GB) with a reported geometry of
16x63x2046, which sysinst claims it'll truncate to 1024 cylinders for the
BIOS calculations.

I don't understand why sysinst could see the DOS partition table
correctly, and fdisk appears to, *sometimes*, but when trying to write it
can't read it properly and blows away the MBR.

These disks are quite common -- they're in about 50% of the systems
Gateway shipped in the past two years, it seems.  It's Not Good that we
lose on them.

Anyone have any ideas?

Thor