On Sat, Dec 05, 2015 at 09:34:35PM +0100, Alexander Bochmann wrote:
> I recently tried to install OpenBSD 5.8 on a Sun Fire, 
> using a RAID-1 softraid as boot device. System doesn't 
> boot though, and ends up with this:
> 
>  > Sun Fire V245, No Keyboard
>  > Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
>  > OpenBoot 4.25.10, 4096 MB memory installed, Serial #67141234.
>  > Ethernet address 0:12:33:0:11:aa, Host ID: 8400123a.
>  > 
>  > Rebooting with command: boot
>  > Boot device: disk0  File and args: sr0a:/bsd
>  > OpenBSD IEEE 1275 Bootblock 1.4
>  > >> OpenBSD BOOT 1.7
>  > Unknown device: sr0
>  > Cannot boot from softraid: Unknown error: code 19
>  > Program terminated
> 
> As the documentation for booting from softraid on sparc64 
> feels somewhat sparse, I'm not actually shure I set things up 
> correctly:
> 
> - from the install cd, created disklabels with a RAID 
>   partition on sd0 and sd1
> - assembled softraid with bioctl:
> 
>  > # bioctl -c 1 -l /dev/sd0a,/dev/sd1a softraid0
>  > sd4 at scsibus2 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct 
> fixed
>  > sd4: 70004MB, 512 bytes/sector, 143369136 sectors
>  > softraid0: RAID 1 volume attached as sd4
> 
> (the system has two other disks)
> 
> - ran ./install to install OpenBSD to sd4
> - rebooted and set boot parameters as per boot_sparc64(8)
> 
> Any steps I am missing? Any hints how to further debug this?
> 
> Thanks,
> 
> Alex.
> 

Can you show the output of 'devalias' at the ok> prompt?
If your disks are more than 4 levels deep inside the device tree
then the diskprobe loop in the boot loader won't see them.

If so, the following (untested) diff might fix the problem (adjusting
to an arbitrarily chosen higher recursion level of 10).

The easiest way to try this diff is to build a new release on another
sparc64 system (see man release(8)) and install that.

Alternatively, the following might work as a shortcut:
(If you're unsure about how to follow those steps, building a full
release will be easier!)
Compile all of /usr/src/sys/arch/sparc64/stand/ and run make install in
/usr/src/sys/arch/sparc64/stand/ofwboot, then copy /usr/mdec/ofwboot
onto a httpd server's webspace where a bsd.rd can fetch it from.
Boot the sun fire into bsd.rd and fetch the patched ofwoot to /tmp/.
Now mount your installed system's root partition at /mnt and its
/usr partition at /mnt/usr, and run:
  /mnt/usr/sbin/installboot sd4 /mnt/usr/mdec/bootblk /tmp/ofwboot
to install the patched boot loader.

Index: diskprobe.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc64/stand/ofwboot/diskprobe.c,v
retrieving revision 1.3
diff -u -p -r1.3 diskprobe.c
--- diskprobe.c 9 Dec 2014 18:05:16 -0000       1.3
+++ diskprobe.c 6 Dec 2015 16:47:23 -0000
@@ -110,12 +110,12 @@ void dump_node(int node)
 
 /*
  * Hunt through the device tree for disks.  There should be no need to
- * go more than four levels deep.
+ * go more than 10 levels deep.
  */
 void
 diskprobe(void)
 {
-       int node, child, stack[4], depth;
+       int node, child, stack[10], depth;
        char buf[32];
 
        stack[0] = OF_peer(0);
@@ -146,7 +146,7 @@ diskprobe(void)
                }
 
                child = OF_child(node);
-               if (child != 0 && child != -1 && depth < 3)
+               if (child != 0 && child != -1 && depth < 9)
                        stack[++depth] = child;
                else
                        stack[depth] = OF_peer(stack[depth]);

Reply via email to