Subject: booting off RAIDframe mirror with i386 -current
To: None <port-i386@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: port-i386
Date: 07/02/2003 00:03:57
With the following ugly diff I was able to boot successfully off a disk
that had the raid0 set at the start of the disk and without the need
for mucking about with boot partitions or wierd offsets for the 'a'
partition.

The "64" should at least be

	#define RF_PROTECTED_SECTORS    64      /* XXX refer to <.../rf_optnames.h> */

and I don't know (read - "this works and that's all I needed") if
there's a better way of doing this.

Anyone more savvy with the i386 bootblocks care to comment?

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/


Index: boot1.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/stand/bootxx/boot1.c,v
retrieving revision 1.1
diff -d -p -u -r1.1 boot1.c
--- boot1.c	2003/04/16 22:17:44	1.1
+++ boot1.c	2003/07/01 13:42:00
@@ -70,6 +70,11 @@ boot1(uint32_t biosdev, uint32_t sector)
 		return "set_geometry\r\n";
 
 	fd = open("boot", 0);
+if (fd == -1) {		/* XXX RF OFFSET */
+ bios_sector += 64;	/* XXX RF OFFSET */
+ fd = open("boot", 0);	/* XXX RF OFFSET */
+}			/* XXX RF OFFSET */
+
 	if (fd == -1 || fstat(fd, &sb) == -1)
 		return "Can't open /boot.\r\n";