kernel algorithm for extended parititions is wrong

Marty Leisner (leisner@sdsp.mc.xerox.com)
Wed, 30 Aug 1995 09:08:07 PDT


Well, I installed Windows95 last night...

What a trip! (what tecnical stuff should I read?
I was a guess trip to get networking going).

Anyway, I reconstructed my partitions so I had this table:
isk /dev/hda: 15 heads, 56 sectors, 989 cylinders
Units = cylinders of 840 * 512 bytes

Device Boot Begin Start End Blocks Id System
/dev/hda1 * 1 1 247 103712 6 DOS 16-bit >=32M
/dev/hda2 248 248 540 123060 5 Extended
/dev/hda3 541 541 784 102480 83 Linux native
/dev/hda4 785 785 989 86100 a5 BSD/386
type offset size
BSD FFS 658560 40960
swap 699520 40960
MSDOS 56 207424
BSD FFS 740480 90112
/dev/hda6 307 307 394 36932 6 DOS 16-bit >=32M
/dev/hda7 395 395 540 61292 6 DOS 16-bit >=32M

But I can't read /dev/hda6 and /dev/hda7...seems it works when it starts
with /dev/hda5, but its getting confused (?) with /dev/hda6 on...
I blew away a /dev/hda5 in dos to make room for win95...(maybe I didn't
need to, but the dos fdisk doesn't present numerical information on sectors...
just percent).

Anyway, it looks like the way we're reading extended partitions is foobar...
I'm not going to play with the linux fdisk yet)

My old kernels on bootup said:
Jul 27 23:55:22 compaq kernel: Partition check:
Aug 29 08:10:16 compaq kernel: hda: hda1 hda2 < hda5 hda6 hda7 > hda3 hda4

Now I'm getting:
Aug 30 08:38:30 compaq kernel: Partition check:
Aug 30 08:38:30 compaq kernel: hda: hda1 hda2 < > hda3 hda4

This is happening with 1.2.8 and 1.3.20

Any spec onto how to determine extended partitions (Ralf Browns interrupt list?)

I think this may be the problem in extended_paritition() in gethd.c --
it looks like it can't correctly cope with deleted partitions in front
of good extended partitions... (it sees the deleted as the end...)

When I added a dummy 1 Mbyte parititon, it appears to work...

As a further thought, the algorithm in fdisk is probably more correct
than the algorithm in the kernel...

marty leisner@sdsp.mc.xerox.com
Member of the League for Programming Freedom (http://www.lpf.org)
Any sufficiently advanced technology is indistinguishable from magic
Arthur C. Clarke, The Lost Worlds of 2001