Subject: Dynamic Drive Overlay (DDO) MBR/IDE support possible?
To: None <port-i386@netbsd.org>
From: Markus W Kilbinger <kilbi@rad.rwth-aachen.de>
List: port-i386
Date: 04/12/2004 10:39:36
Hi!

Last weekend I tried to install netbsd on an older i386 machine with
bios 32gb hd/ide limitation, which should use a (newer) 80gb hd. So I
had to install a Dynamic Drive Overlay (DDO) first (Ontrack's in this
case) to make the entire disk capacity available.

This DDO driver installs an initial/artificial mbr partition (table)
of kind (src/sys/sys/bootblock.h):

  #define MBR_PTYPE_ONTRACK       0x54

which contains some code to remap the drives real capacities after
bios is passed.

For further usage of the disk from an os point of view the real
content of the disk seems to be shifted from sector 0 to sector 63
(incl. the real mbr).

NetBSD seems to not understand the effect of this DDO effect, so it
cannot be installed with this kind of bios workaround.

In my need I tried a linux distrib (2.4.24 kernel) which seems to
understand it:

  hda: [DM6:DDO] [remap +63] [9729/255/63] hda1 hda2 < hda5 hda6 >

(also further usage of these real partitions seems to work under
linux).

Q: How to use such kind of disk/bios workaround under netbsd? (Is
   there any way?)

In case it's not possible would it be hard to implement?

Looking at the linux source (2.6.5) there is a 'sect0' variable as an
offset for all real disk access (= 0 for 'normal' cases, = 63 in the
DDO case).

Just for completeness of this problem, these seems to be some other
mbr partition types which are relevant in s similar way
(src/sbin/fdisk/fdisk.c):

  struct part_type {
  	  int              type;
  	  const char      *name;
  } part_types[] = {
  [...]
  	  {0x51, "DM6 Aux1 (or Novell)"},
  [...]
  	  {0x53, "DM6 Aux3"},
  	  {0x54, "DM6 DDO"},
  	  {0x55, "EZ-Drive (disk manager)"},

For DM6's the offet seems to be set to 63.

For the EZ-Drive type the real mbr is located at sector 1 instead of
sector 0 (every 'block 0' access is remapped to 'block 1'; nothing
more).

Comments? (Please ;-))

Markus.