summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2012-03-19 15:20:16 +0000
committerjsing <jsing@openbsd.org>2012-03-19 15:20:16 +0000
commitff668c54ab0bd1e7c92289e84fd9593682505d7c (patch)
tree0881012d0080cf92d72e6c0b6a60fd9b9829ca72
parentUse $() instead of backticks. (diff)
downloadwireguard-openbsd-ff668c54ab0bd1e7c92289e84fd9593682505d7c.tar.xz
wireguard-openbsd-ff668c54ab0bd1e7c92289e84fd9593682505d7c.zip
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)