On Sat, Oct 26, 2013 at 01:41:46PM -0500, Adam Thompson wrote:
> I recently followed the most up-to-date guidance I could find on booting 
> OpenBSD off softraid(4), and *everything* I found showed that I needed 
> the kernel on a separate slice so boot(8) could find it.
> 
> For that matter, boot(8), boot_amd64(8) and biosboot(8) all fail to 
> mention the special behaviour of installboot(8) on softraid(4), so I 
> have - AFAIK - no way of discovering that OpenBSD can boot directly off 
> a softraid(4) root partition.
>
> Yeah, I know - submit a patch.  I'm having trouble figuring out 
> precisely what to say where.  I'm hoping it's obvious to someone else...
> 
> <whine>I know OpenBSD borrows useful concepts from Linux from time to 
> time, but not keeping the manpages up to date isn't a "feature" I'd like 
> to see brought over to the BSD world. One of the fundamentals of OpenBSD 
> has historically been correct documentation.</whine>

As of 5.4 the softraid(4) man page has a related paragraph in
the CAVEATS section:

     softraid has boot support only for the CRYPTO and RAID 1
     disciplines, and only on amd64 and i386 platforms.
 
This diff makes this notice more prominent and adds some details
and cross references. Good enough?

Index: share/man/man4/softraid.4
===================================================================
RCS file: /cvs/src/share/man/man4/softraid.4,v
retrieving revision 1.31
diff -u -p -r1.31 softraid.4
--- share/man/man4/softraid.4   12 Mar 2013 14:00:57 -0000      1.31
+++ share/man/man4/softraid.4   27 Oct 2013 12:51:07 -0000
@@ -107,6 +107,21 @@ discipline.
 It writes data to each chunk in sequence to provide increased capacity.
 CONCAT does not provide redundancy.
 .El
+.Pp
+.Xr installboot 8
+may be used to install
+.Xr boot 8
+in
+.Nm
+volume meta data to allow booting from the volume.
+Boot support is currently limited to the CRYPTO and RAID 1 disciplines
+on amd64 and i386 platforms.
+At the
+.Xr boot 8
+prompt, softraid volumes have names beginning with
+.Sq sr
+and can be booted from like a normal disk device.
+CRYPTO volumes will require a decryption passphrase or keydisk at boot time.
 .Sh EXAMPLES
 An example to create a 3 chunk RAID 1 from scratch is as follows:
 .Pp
@@ -153,11 +168,26 @@ The RAID volume is now ready to be used 
 See
 .Xr bioctl 8
 for more information on configuration of RAID sets.
+.Pp
+Install
+.Xr boot 8
+on the RAID volume:
+.Bd -literal -offset indent
+# /usr/mdec/installboot /boot /usr/mdec/biosboot sd0
+.Ed
+.Pp
+At the
+.Xr boot 8
+prompt, load the /bsd kernel from the RAID volume:
+.Bd -literal -offset indent
+boot> boot sr0a:/bsd
+.Ed
 .Sh SEE ALSO
 .Xr bio 4 ,
 .Xr bioctl 8 ,
 .Xr disklabel 8 ,
 .Xr fdisk 8 ,
+.Xr installboot 8 ,
 .Xr newfs 8
 .Sh HISTORY
 The
@@ -177,10 +207,6 @@ The RAID 4 and 5 disciplines do not init
 This is due to the scrub functionality not being currently implemented.
 .Pp
 Currently there is no automated mechanism to recover from failed disks.
-.Pp
-.Nm
-has boot support only for the CRYPTO and RAID 1 disciplines,
-and only on amd64 and i386 platforms.
 .Pp
 Sparc hardware needs to use fstype
 .Dq 4.2BSD
Index: sys/arch/amd64/stand/boot/boot.8
===================================================================
RCS file: /cvs/src/sys/arch/amd64/stand/boot/boot.8,v
retrieving revision 1.18
diff -u -p -r1.18 boot.8
--- sys/arch/amd64/stand/boot/boot.8    27 Sep 2012 12:26:28 -0000      1.18
+++ sys/arch/amd64/stand/boot/boot.8    27 Oct 2013 12:35:12 -0000
@@ -138,6 +138,11 @@ attempts to load the kernel executable
 .Pa /bsd .
 If it fails to find the kernel and no alternative kernel image has
 been specified, the system will be unable to boot.
+.Pp
+.Nm
+supports booting from
+.Xr softraid 4
+RAID 1 and CRYPTO volumes.
 .Sh COMMANDS
 The following commands are accepted at the
 .Nm
@@ -377,6 +382,7 @@ option.
 .Xr gzip 1 ,
 .Xr autoconf 4 ,
 .Xr ddb 4 ,
+.Xr softraid 4 ,
 .Xr biosboot 8 ,
 .Xr boot_amd64 8 ,
 .Xr boot_config 8 ,
Index: sys/arch/i386/stand/boot/boot.8
===================================================================
RCS file: /cvs/src/sys/arch/i386/stand/boot/boot.8,v
retrieving revision 1.55
diff -u -p -r1.55 boot.8
--- sys/arch/i386/stand/boot/boot.8     27 Sep 2012 12:26:28 -0000      1.55
+++ sys/arch/i386/stand/boot/boot.8     27 Oct 2013 12:32:54 -0000
@@ -138,6 +138,11 @@ attempts to load the kernel executable
 .Pa /bsd .
 If it fails to find the kernel and no alternative kernel image has
 been specified, the system will be unable to boot.
+.Pp
+.Nm
+supports booting from
+.Xr softraid 4
+RAID 1 and CRYPTO volumes.
 .Sh COMMANDS
 The following commands are accepted at the
 .Nm
@@ -377,6 +382,7 @@ option.
 .Xr gzip 1 ,
 .Xr autoconf 4 ,
 .Xr ddb 4 ,
+.Xr softraid 4 ,
 .Xr biosboot 8 ,
 .Xr boot_config 8 ,
 .Xr boot_i386 8 ,

Reply via email to