 +static int
 +tbboot_func(char *arg, int flags)
 +{
-+	int biosdev, slice;
++	int biosdev, slice = 0;
 +	char buffer[512];
 +	tbboot_t *tbhdr = (tbboot_t *)buffer;
 +	int config_biosdev;

+#endif /* SUPPORT_EMULAB */
+
 static int
 setkey_func (char *arg, int flags)
 {
@@ -3757,6 +3965,17 @@
   return 0;
 }
 

+
+		if (biosdev == MAX_BIOS_DRIVE) {
+			errnum = ERR_BOOT_FAILURE;
+			grub_printf("no biosdev found for testbed boot\n");
+		}
+	}
+
