Subject: Re: dual-booting a WinXP box?
To: <>
From: David Laight <david@l8s.co.uk>
List: port-i386
Date: 01/30/2004 20:13:31
On Fri, Jan 30, 2004 at 09:49:14AM +0000, Aidan Kehoe wrote:
>
> It should break this, yeah?
Do you mean you want it to break?
> Where "h" is a small ffs1 partition from back
> before any boot selector had decent support for UFS2, and "a" is UFS2.
>
> 16 partitions:
> # size offset fstype [fsize bsize cpg/sgs]
> a: 24641568 32311440 4.2BSD 1024 8192 46448 # (Cyl. 32055 - 56500)
> b: 1024000 31246521 swap # (Cyl. 30998*- 32014*)
> c: 35150220 31246425 unused 0 0 # (Cyl. 30998*- 65869*)
> d: 78140160 0 unused 0 0 # (Cyl. 0 - 77519)
> e: 11743515 66396645 NTFS # (Cyl. 65869*- 77519)
> f: 31246362 63 MSDOS # (Cyl. 0*- 30998*)
> g: 9443637 56953008 4.2BSD 1024 8192 0 # (Cyl. 56501 - 65869*)
> h: 40919 32270521 4.2BSD 1024 8192 95 # (Cyl. 32014*- 32054)
> #
I'm not exactly sure how you are booting that anyway?
I suspect you have copied the bootstrap code into the sectors between
the beginning of 'c' (netbsd mbr partition) and the start of 'b' (swap).
There is (and has always been) a restriction that the boot code be in
the netbsd partition at the start of the mbr boot partition.
So to make that bootable you would need to make the mbr partition start
at the beginning of either 'a' or 'h' (leaving the swap in a different
mbr partition).
I've just had a thought that the pbr boot code could look in the 2nd sector
of the mbr partition for a netbsd disklabel if it fails to find a filesystem
at offset 0 (normal) or 64 (raid) and try partition 'a' instead.
The kernel writes the netbsd disklabel to the start of all netbsd mbr (type
169) partitions, so it is likely to be correct. disklabel(8) doesn't and
changing it is too hard until the disklabel -B has been killed.
David
--
David Laight: david@l8s.co.uk