I tried next flashing it booting in FreeDOS, as suggested by cyberfish in
this post. But when I run the executable I get an error (something like "DOS/4GW Professional error (2001): exception... (page fault)", which I'm not sure how to interpret). Luckily nothing bad happened to my motherboard. Maybe I didn't know how to interpret the "boot with the vanilla option" part of cyberfish's post, I don't know if booting with the wrong option makes a difference, but I'd like to know better before trying again.