Subject: port-cobalt/36639: Cobalt bootloader will not boot from RAIDFrame Mirror
To: None <port-cobalt-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <rthille@rangat.org>
List: netbsd-bugs
Date: 07/12/2007 20:15:01
>Number: 36639
>Category: port-cobalt
>Synopsis: Cobalt bootloader fails to load kernel from RAIDFrame Mirror
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-cobalt-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Jul 12 20:15:00 +0000 2007
>Originator: Robert P Thille
>Release: NetBSD 3.99.20
>Organization:
None
>Environment:
System: NetBSD bluesky.thille.org 3.99.20 NetBSD 3.99.20 (RThille_2006-06-02) #0: Fri Jun 2 18:29:42 PDT 2006 rthille@:/home/system/NetBSD/current/cobalt/obj/sys/arch/cobalt/compile/RThille_2006-06-02 cobalt
Architecture: mipsel
Machine: cobalt
>Description:
The port-cobalt bootloader does not understand RAIDFrame Mirrors
and so is unable to load a kernel from said mirrors.
>How-To-Repeat:
create a root which lives on a RAIDFrame Mirror.
>Fix:
Patch to enhance the port-cobalt bootloader:
cvs diff: Diffing .
Index: wd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/stand/boot/wd.c,v
retrieving revision 1.5
diff -u -b -p -r1.5 wd.c
--- wd.c 11 Dec 2005 12:17:06 -0000 1.5
+++ wd.c 5 May 2006 22:00:58 -0000
@@ -43,6 +43,7 @@
#include <machine/param.h>
#include <machine/stdarg.h>
+#include <dev/raidframe/raidframevar.h> /* For RF_PROTECTED_SECTORS */
#include "boot.h"
#include "wdvar.h"
@@ -179,6 +180,10 @@ wdgetdisklabel(wd)
DPRINTF(("illegal partition\n"));
return (EPART);
}
+ if (lp->d_partitions[wd->sc_part].p_fstype == FS_RAID) {
+ DPRINTF(("USING RAID OFFSET\n"));
+ lp->d_partitions[wd->sc_part].p_offset += RF_PROTECTED_SECTORS;
+ }
DPRINTF(("label info: d_secsize %d, d_nsectors %d, d_ncylinders %d,"
"d_ntracks %d, d_secpercyl %d\n",
>Unformatted: