Subject: Re: Tracking -current while not trashing stable installation
To: None <netbsd-help@netbsd.org>
From: David Laight <David@l8s.co.uk>
List: netbsd-help
Date: 01/26/2002 12:35:21
> I see NetBSD boot selector wouldn't be able to boot Linux on a logical
> partition, hence the preference for lilo.

I think I could fix that!  Space it somewhat tight, it might require the
text message to be put into the first sector of each extended partition.
Seems fair that the mbr code can use that sector!
(I'm fairly sure that lilo reads stuff out of the linux partition)

The 'fdisk' in -current will display all the extended partition details.
It has been written to recursively descend the extended partition table,
however I have 'gut' feeling that this isn't necessary.  I know each
extended partition table should describe 1 piece of disk and another
extended partition, which makes me think that the sub-partitions should
all end at the same place.  This would make it possible to actually
add partitions without asking the user too much info about how the
disk should be split up.  (The fact that the sector numbers in the
sub-headers are all relative to the base of the extended ptn makes this
even more likely).

Does anyone have a disk with lots of linux partitions they are willing
to run the 'current' netbsd fdisk on (to report the format) and sent it
to me?  If the format is what I expect, it ought to be possible to get
the netbsd boot code to use an extended partition.
> 
> ^ Eack disk needs its own disklabel......
> 
> I can't RTFM now, not being in NetBSD, but will have to see how to put a
> disklabel on a non-BSD DOS-only, or DOS and Linux, disk.

You need to allocate one of the 4 main partitions as a netBSD one - doesn't
have to be very big though.

The system might generate one internally that references the 4 dos
partitions (slices e,f,g and h I think), but I don't know the side
effects of actually executing that lump of code :-)

It might be worth 'stealing' another bit in the minor number from the number
of supported disks - currently 64k), so that the first 16 dos partitions
can always be accessed - without needing a netBSD disklabel.  The hardest
part of this is actually deciding what to call the enties (wd0[A-P] ?).

>  I notice Linux fdisk
> has a command b (edit bsd disklabel) but haven't tried it, don't want to risk
> screwing things, read that BSD disklabels are not compatible across the BSDs
> (Free, Net and Open).

The netBSD one is a different partition type, so the linux code probably
won't find it.

    David