Index: x86_autoconf.c =================================================================== RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v retrieving revision 1.65 diff -u -r1.65 x86_autoconf.c --- x86_autoconf.c 29 Jul 2012 18:05:47 -0000 1.65 +++ x86_autoconf.c 2 Oct 2012 21:57:28 -0000 @@ -346,7 +346,10 @@ return; } - if ((biw = lookup_bootinfo(BTINFO_BOOTWEDGE)) != NULL) { + bid = lookup_bootinfo(BTINFO_BOOTDISK); + biw = lookup_bootinfo(BTINFO_BOOTWEDGE); + + if (biw != NULL) { /* * Scan all disk devices for ones that match the passed data. * Don't break if one is found, to get possible multiple @@ -382,7 +385,7 @@ continue; } booted_device = dv; - booted_partition = 0; + booted_partition = bid != NULL ? bid->partition : 0; booted_nblks = biw->nblks; booted_startblk = biw->startblk; } @@ -392,7 +395,7 @@ return; } - if ((bid = lookup_bootinfo(BTINFO_BOOTDISK)) != NULL) { + if (bid != NULL) { /* * Scan all disk devices for ones that match the passed data. * Don't break if one is found, to get possible multiple