Subject: Re: no suitable root
To: None <port-atari@NetBSD.ORG>
From: Waldi Ravens <waldi@moacs.indiv.nl.net>
List: port-atari
Date: 10/23/1995 02:46:52
Huhu Benni,

> Here is the output of Waldis program:
> 
> type      start     size
> GEM           2    28243

This is the first entry in the root sector. It describes a
normal partition, which presumably contains one of those evil
GEMDOS-filesystems. ;-)

Sector 0 is the root sector. Sector 1 is the AHDI bad sector
list. First partition starts at sector 2.
Fine.

> NBR       28245    34387

Second entry in the root sector, also a normal partition.
The second partition starts immediately after the first:
2 + 28243 = 28245.
Fine.

> NBU       62632   240170

Third entry in the root sector, also a normal partition.
The third partition starts immediately after the second:
28245 + 34387 = 62632.
Fine.

> XGM      302802   754813 ?

Fourth entry in the root sector, describes an extended
partition (identifier XGM). The fourth partition starts
immediately after the third: 62632 + 240170 = 302802.
Fine.

The root sector cannot contain more than four partition
descriptors. Since you defined five partitions, one of
the partitions in the root sector had to be an extended
partition. An extended partition can contain any number
of subpartitions (only limited by the number of available
sectors).

The start sector (302802) of an extended partition is
just an auxilary root sector, which contains 1 or 2
partition descriptors, similar to the main root sector.

This extended partition ends at sector 1057614 (302802
+ 754813 - 1). That's OK, the total number of sectors
on the disk is 1057616 (numbered 0..1057615). The last
sector, which seems to be unused, is probably used to
store a safety copy of the AHDI partition table.
Fine.

> NBU      302803   377406

This is the first entry in the auxilary root sector at
sector 302802. It describes a normal partition, which
starts immediately after the auxilary root sector:
302802 + 1 = 302803.
Fine.

> XGM      680209   377407 ?

This is the second entry in the auxilary root sector at
sector 302802. It describes the next subpartition whithin
the extended partition. This subpartition starts immediately
after the previous partition: 302803 + 377406 = 680209.
Fine.

The start sector (680209) is the next auxilary root sector.

> LNX      680210   377405

This is the first entry in the auxilary root sector at
sector 680209, and also the last entry (i.e. the second
entry is marked invalid). It describes a normal partition,
which starts immediately after the auxilary root sector:
680209 + 1 = 680210
Fine.

This partition ends at sector 1057614 (680210 + 377405 - 1),
which is the end of the extended partition (see above).
Fine.

> medium size: 1057616
> sector size: 512 bytes
> 
> The ? partitions shouldn't be there!?

They're not descriptors of real partitions, as indicated by the
XGM identifier. The easiest way to look at them is as pointers
to an auxilary root sector (similar, but not identical, to the
real root sector (sector 0)). For more details see the excellent
Atari Profibuch.


Conclusion: I'm astonished that NetBSD does not accept this AHDI
            partition information, it looks perfectly valid to me.
            I'll check the source code later this day (it's really
            time to go to bed now ;-) ).


Good night,
Waldi