Ventoy icon indicating copy to clipboard operation
Ventoy copied to clipboard

[issue]: Hangs at BIOS POST on Foxconn G31MX-K

Open dilworks opened this issue 1 month ago • 3 comments

Official FAQ

  • [x] I have checked the official FAQ.

Ventoy Version

1.1.07

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

Legacy BIOS Mode

Partition Style

MBR

Disk Capacity

Several sizes

Disk Manufacturer

Several brands

Image file checksum (if applicable)

None

Image file download link (if applicable)

No response

What happened?

I have this old late Core 2 era motherboard here, a Foxconn G31MX-K, where I'm trying to use Ventoy to boot several OS install media. Unfortunately, this machine has proven to be very stubborn since any attempt to run Ventoy on it ends with a hang early at POST (if I disable the boot logo splash, it hangs before showing the amount of installed RAM).

Things I have tested so far:

  • Try several versions of Ventoy: no dice, had a old stick with 1.0.94 or so, upgraded it to the latest 1.1.07, even made a completely new stick from scratch but everything triggers the hang. All of those sticks boot fine on other computers!
  • Try several different USB sticks: Tried with SanDisk, legit Kingston, and even an ancient 4GB Memorex stick, all with the same exact result: a hang on this Foxconn, OK boot elsewhere.
  • Try different USB ports: nope, didn't changed things.
  • Check RAM for errors: memtest86+ gives a clean bill of health, also tried swapping RAM sticks with no improvement.
  • BIOS tweaks: there is not much USB-related settings to tinker with this Award BIOS-based motherboard, only enable/disable USB, check Mass Storage settings (some drives may need to be manually set to USB-HDD on this mobo to boot)... no improvement.
  • BIOS updates: Tricky to find nowadays since Foxconn stopped making consumer motherboards a few years ago and completely blackholed any resources for the existing ones, including BIOS updates. In any case, mobo had P02, managed to update it to P14, both BIOS exhibit THE SAME PROBLEM, and hang at THE SAME PLACE!
  • FWIW this machine is able to boot other USB boot media: memtest86+, old Parted Magic sticks, UBCD...

In an act of desperation, I went hardcore and started messing with Ventoy's MBR, just to find a couple interesting things that actually affected Ventoy boot:

  • This motherboard hates exFAT partitions for some reason. Reformatting the main partition to anything else helps, but there is another landmine to bypass:
  • The very first instruction at the MBR is a "jmp 0x65" (EB 63), that is, a short jump. For some reason, this triggers whatever early USB check this motherboard is doing so badly that it ends hanging! Moving that jump a few dozen bytes ahead actually managed to get me booting... almost! Instead, I ended hitting the final landmine: Ventoy's MBR check. Of course I'm booting with a tampered MBR which Ventoy dislikes and I get the dreaded "This is not a standard Ventoy device and is Not Supported (12)" error.
  • Even if i patch out the MBR check with my own modded MBR (36 bytes of NOPs in my case!), the check STILL fails - either I'm missing something, or the BIOS is managing to mangle the MBR even more :/

So close, yet so far...

dilworks avatar Oct 29 '25 01:10 dilworks

Perhaps not the same issue I had ~~but, could be a clue perhaps #3381.~~

vibbe avatar Oct 29 '25 20:10 vibbe

@vibbe this motherboard predates UEFI widespread support - it's strictly a old school legacy booter with no UEFI support whatsoever, so I can't even try that on it (UEFI is very rare to find on late Core 2 era motherboards, and Secure Boot was introduced in 2011... about 2 years after this motherboard was made.

My most powerful clue here is the MBR stuff - dunno what the hell the Foxconn BIOS is validating on USB media, but apparently it enters into a unrecoverable state when presented with a vanilla Ventoy MBR. Moving the early JMP past the first ~48 bytes (well past the BPB which I'm not even sure if it is used on modern legacy boot at all) AND not using a exFAT partition seem to be enough to please this weird BIOS... dunno why.

dilworks avatar Oct 29 '25 23:10 dilworks

Oh okay, I see. Not my area of expertise, but here’s a thought:

flowchart TB
    BIOS[/"Legacy BIOS probe"/] --> Check["MBR sanity check\n(probe FAT signatures)"]
    Check -->|early JMP at 0x00| Hang["System hangs!\nJMP too early, BPB not valid"]
    Check -->|JMP shifted past ~0x30| Success["Boot continues normally\nBPB layout OK"]
    
    style BIOS fill:#f9d5d3,stroke:#e63946,stroke-width:2px,color:#000000
    style Check fill:#fef9c3,stroke:#f4c430,stroke-width:2px,color:#000000
    style Hang fill:#f4cccc,stroke:#d93025,stroke-width:2px,color:#000000
    style Success fill:#d0f4de,stroke:#2a9d8f,stroke-width:2px,color:#000000

Many legacy BIOSes of that era probe drive types using FAT signatures and do a simple MBR sanity check before jumping to code. That explains why the early JMP in Ventoy’s MBR can hang the Foxconn board — it likely expects a DOS-style BPB layout.

Shifting the jump past ~0x30 and avoiding exFAT fits what these BIOSes need. Not really Ventoy’s fault; the firmware just assumes a very specific MBR structure. Your analysis lines up perfectly. :)

Hope that helps!

Anyway, I hope you got everything in order? :)

vibbe avatar Oct 30 '25 06:10 vibbe