diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-04-26 17:33:18 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-04-26 17:33:18 +0000 |
commit | f4d605abf615f5874339c95f0309f824ad07577e (patch) | |
tree | 9b3fd0c482fbd1df2a42dbc67e53560e32e86c71 /sys/arch/i386/stand | |
parent | 2d7740a3b1a96dd7d345686c8e2c1e1277f4f5d1 (diff) |
Make amd64/i386 boot(8) pass the DUID of the selected boot device to the
kernel so that it can use it to identify the root disk. This will be
needed in order to correctly boot from a softraid volume.
ok deraadt@ marco@ krw@
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r-- | sys/arch/i386/stand/boot/conf.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/exec_i386.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c index 8c564ea0213..f1f3be3125f 100644 --- a/sys/arch/i386/stand/boot/conf.c +++ b/sys/arch/i386/stand/boot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.45 2011/03/08 17:24:31 krw Exp $ */ +/* $OpenBSD: conf.c,v 1.46 2011/04/26 17:33:17 jsing Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -43,7 +43,7 @@ #include <dev/cons.h> #include "debug.h" -const char version[] = "3.16"; +const char version[] = "3.17"; int debug = 1; diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c index bd9821d910f..80af47dfbc1 100644 --- a/sys/arch/i386/stand/libsa/exec_i386.c +++ b/sys/arch/i386/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.33 2009/04/30 13:47:16 dlg Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.34 2011/04/26 17:33:17 jsing Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -54,6 +54,7 @@ run_loadfile(u_long *marks, int howto) extern int com_speed; /* from bioscons.c */ bios_ddb_t ddb; extern int db_console; + bios_rootduid_t rootduid; if (sa_cleanup != NULL) (*sa_cleanup)(); @@ -70,6 +71,9 @@ run_loadfile(u_long *marks, int howto) addbootarg(BOOTARG_DDB, sizeof(ddb), &ddb); } + bcopy(bootdev_dip->disklabel.d_uid, &rootduid.duid, sizeof(rootduid)); + addbootarg(BOOTARG_ROOTDUID, sizeof(rootduid), &rootduid); + /* Pass memory map to the kernel */ mem_pass(); |