summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2012-03-19 15:20:17 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2012-03-19 15:20:17 +0000
commit5f9c7bf79f6f68b257dd9c5b019b47217ab87267 (patch)
treea00af986d000ae4d50b89dc9b116943f47674565
parentfc16e309fb02d6474db824df00972c04d49b9229 (diff)
Only change the default boot device to a bootable softraid volume, if we
are able to handle the given discipline. At this stage amd64 boot(8) is limited to RAID 1. This makes life easier for users who are booting from a softraid crypto volume, but are loading a kernel from hd0a:/bsd. Tested by jrick@devio.us - thanks!
-rw-r--r--sys/arch/amd64/stand/boot/conf.c4
-rw-r--r--sys/arch/amd64/stand/libsa/dev_i386.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/amd64/stand/boot/conf.c b/sys/arch/amd64/stand/boot/conf.c
index dd64c179201..017370e1c31 100644
--- a/sys/arch/amd64/stand/boot/conf.c
+++ b/sys/arch/amd64/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.21 2012/01/13 14:38:43 jsing Exp $ */
+/* $OpenBSD: conf.c,v 1.22 2012/03/19 15:20:16 jsing Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -42,7 +42,7 @@
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "3.18";
+const char version[] = "3.19";
int debug = 1;
diff --git a/sys/arch/amd64/stand/libsa/dev_i386.c b/sys/arch/amd64/stand/libsa/dev_i386.c
index 4b762562a79..9e735291c22 100644
--- a/sys/arch/amd64/stand/libsa/dev_i386.c
+++ b/sys/arch/amd64/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.9 2012/01/11 14:47:02 jsing Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.10 2012/03/19 15:20:16 jsing Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -112,6 +112,9 @@ devboot(dev_t bootdev, char *p)
* softraid volume.
*/
SLIST_FOREACH(bv, &sr_volumes, sbv_link) {
+ /* For now we only support booting from RAID 1 volumes. */
+ if (bv->sbv_level != 1)
+ continue;
if (bv->sbv_flags & BIOC_SCBOOTABLE)
SLIST_FOREACH(bc, &bv->sbv_chunks, sbc_link)
if (bc->sbc_disk == bootdev)