Subject: Re: shooting oneself in the foot
To: None <tech-kern@netbsd.org>
From: David Laight <David.Laight@btinternet.com>
List: tech-kern
Date: 01/17/2002 12:09:43
>    Erm, what are 'wedges'? (In this context)
> 
> http://www.wins.uva.nl/~frank/wedge.txt has all the collected info.

nice light reading for a thursday am :-)

FWIW:

1) I believe that dos extended partitions should only contain a single
   data partition and another extended partition.  With the usual
   formatting rules this loses one track per partition, but allows
   any existing partition to be split into 2.  Unfortunately it doesn't
   give partitions fixed identities.

2) Coming to netbsd recently (I'm an SVR4MP man) I was surprised that
   the (i386) disklabel:
   a) is allowed to reference outside the partition
   b) is required to reference outside the partition in order to access
      'dos' partitions.

3) There is nothing to stop a PC booting from partitions in the extended
   partition list.  All you need is mbr code that knows how to find them,
   and pbr code that doesn't mind being loaded from one.
   (There is probably space in the bootsel code to do this!  The problem
   is the menu! - maybe use the space in each 'mbr')

Maybe there needs to be a distinction between the table the kernel uses
to map a slice (ie minor number) to part of the disk, and the information
on that disk that determines the map.  ie the kernel 'disklabel' is never
written to disk, but generated from information stored on the disk (and
maybe info from the boot filesystem - the one that contains the kernel).

To avoid partitions (in the loose sense) getting renamed by disk formatting
utilities (eg if an extra partition is included in the extended partition
list) maybe ensure each fs has a unique 'name' (a random number is best)
and save the name and where it was found in the boot filesystem.
This requires some 'fuzzy' code to locate the filesystems at boot time....

    David