Subject: Re: should sysinst change MBR_PTYPE_386BSD to MBR_PTYPE_NETBSD?
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-install
Date: 06/16/2003 09:15:05
>   | These are all compounded by editing the mbr table prior to an overlay
>   | install,
> 
> Separating these two in sysinst is a big mistake - there should be just
> one disk layout step, which should accomplish both - first (if necessary)
> by determining how much total space (and where) for NetBSD (defaulting to
> what is in NetBSD MBR partition(s), if any, or unallocated space on the drive
> if not) and then just using the NetBSD label to allocate the space.

I was going to revamp the mbr editor so that it shows the free space
on the disk and asks how much of it the user wants to use for netbsd.
Allowing the user to delete other partitions in order to make space.
(with a possible option of hand editing all the numbers...)

> Once that is done, whatever MBR partitions are needed to prevent some other
> installer from believing there's more unallocated space on the drive than
> actually exists should be created, automatically - with the NetBSD MBR
> partition being placed so it is correct for booting (the bootstrap code
> and the NetBSD disklabel need to be there).

I certainly intend making any othen partitions (ie other than the netbsd
partition that sysinst will install into) appear in the final list of
partitions.  This will include any (upto 8) extended partitions and
remove the need for mbrlabel.

> Beyond that, the NetBSD MBR partition is irrelevant to NetBSD
> (I know you know that, I'm not sure that everyone here understands).

Yes, but is is dangerous to be using space that isn't alocated in the mbr.
IMHO sysinst should install 'sane' systems where filesystems are either
part of a netbsd partition or partition in their own right.

> If all the NetBSD space can be
> described by that one MBR entry, fine (that will be the usual case).
> If not, create others (stick them in extended partitions, where no normal
> NetBSD code will ever see them) to handle the other ranges.

You can't do that, there are restriction on what the extended partition
can describe.  You have to create the mbr extended partition and then
transfer the info to the netbsd disklable.

> There's absolutely no point allowing sysinst to create setups which can't
> work with NetBSD - if someone has a need to do that, they can use fdisk
> or disklabel manually.   They'll know how.

Indeed, also sysinst doesn't need to be able to create all of the setups
that will work with netbsd.  Just ones that will work given most start
positions.

> There also isn't a reason to
> tell novices that they have to allocate space for NetBSD twice.   That's
> something that most people simply cannot believe makes any sense at all.

Phrasing the questions correctly should make it alright.
Q1) which part of the disk can netbsd use.
Q2) how should the area be split up.

For i386, the Linux 'one filesystem one partition' scheme isn't stupid!

	David

-- 
David Laight: david@l8s.co.uk