Page 1 of 1

Bootable vhd

Posted: Tue Oct 15, 2024 9:47 pm
by hsnewman

I have a vhd disk file which is bootable under qemu but not on the MiSTer (AO486). The message on the MiSTer is: "No bootable device". I don't understand why the file is bootable in qemu but not the MiSTer. Ideas?


Re: Bootable vhd

Posted: Wed Oct 16, 2024 7:22 am
by Bas

Plenty, but it's probably geometry. There are many ways in which you can convert a "bunch of sectors" into a Cylinders/Heads/Sectors geometry, and there's no real standard there. The geometry itself is encoded in the form of a few bytes in the BIOS Parameter Block on the volume boot record in FAT filesystems. If that's different from what AO486 emulates, things may well go boom.


Re: Bootable vhd

Posted: Wed Oct 16, 2024 9:36 am
by Hackshed_Carl

I had this very issue yesterday.
I resolved it by creating the VHD file on the MiSTer directly from console.

Press F9 to open the console and use these details :-
user = root
password = 1

change into your AO486 directory and run the following command :-

dd if=/dev/zero of=DOS.vhd bs=1M count=2048

you can rename the file by changing DOS.vhd to whatever.vhd

To change the size, alter the last number in the command. You need to specify the size in MB so 2GB is 2048mb


Re: Bootable vhd

Posted: Wed Oct 16, 2024 1:21 pm
by Bas

Another reason could be the file format. Something called 'VHD' should be a Microsoft Hyper-V disk image. Those are practically the same as a raw image, usually, except for a 512-byte footer. Unless you have a differential/sparse (whatever the term) image where only occupied sectors are allocated a part of the file itself. Those also have structures in the file header and AO486 won't like those. You could probably use qemu-img to convert to a raw image.

It's been an annoyance of mine for quite a while that this core uses 'vhd' as the extension for files that are not VHD-files at all but just raw sector images.