diff --git a/lib/libdisk/open_disk.c b/lib/libdisk/open_disk.c index 6ffe88d..10ce2f4 100644 --- a/lib/libdisk/open_disk.c +++ b/lib/libdisk/open_disk.c @@ -128,6 +128,14 @@ Int_Open_Disk(const char *name, char *conftxt) } /* + * In case BIOS have no data on the heads and sector count, set a + * reasonable default. + */ + if (d->bios_hd == 0) + d->bios_hd = 16; + if (d->bios_sect == 0) + d->bios_sect = 63; + /* * Calculate the number of cylinders this disk must have. If we have * an obvious insanity, we set the number of cylinders to zero. */