diff --git a/loader/i386/multiboot_mbi.c b/loader/i386/multiboot_mbi.c index 9c45b3352..3e63b3456 100644 --- a/loader/i386/multiboot_mbi.c +++ b/loader/i386/multiboot_mbi.c @@ -417,6 +417,9 @@ grub_multiboot_set_bootdev (void) biosdev = 0xffffffff; #endif + if (biosdev == 0xffffffff) + return; + dev = grub_device_open (0); if (dev && dev->disk && dev->disk->partition) { diff --git a/loader/i386/multiboot_mbi2.c b/loader/i386/multiboot_mbi2.c index 031d4c0eb..de234727b 100644 --- a/loader/i386/multiboot_mbi2.c +++ b/loader/i386/multiboot_mbi2.c @@ -442,6 +442,9 @@ grub_multiboot_set_bootdev (void) biosdev = 0xffffffff; #endif + if (biosdev == 0xffffffff) + return; + dev = grub_device_open (0); if (dev && dev->disk && dev->disk->partition) {