8 ms·
Get PC BIOS back on UEFI only system
- ehutch79 1y agoWhy?
- p_ing 1y agoDOS. Can’t think of any other reason.
- okanat 1y agoYou get better DOS emulation with DOSBox, rather than trying to make the modern peripherals work on a CSM / BIOS system.
- kevin_thibedeau 1y agoDOSBox doesn't give access to real hardware. DOSemu doesn't run well on 64-bit machines. If you need unfettered hardware access, FreeDOS on the bare machine is the best option.
- mycall 1y agoWhat about using PCem? It does well emulating real hardware.
- kevin_thibedeau 1y agoThat does one no good if you need something connected to a parallel port.
- ale42 1y agoActually it does give some. I'm using old ham radio software like CT9 under Windows 64-bits using DOSBox-X, with the parallel port configured in pass-through mode. DOSBox-X supplies a specific driver for this kind of direct hardware access. Of course not everything will work that way.
- II2II 1y agoThe two reasons I can think of: to run legacy or educational operating systems. There are going to be limitations to what can be supported, but simply getting the OS to boot is part of the battle. It would also be useful for those who want to experiment with operating systems by creating their own. Yes you can do that without BIOS support, but there are many old tutorials floating around that depend upon BIOS support. The BIOS was also created as a primitive hardware compatibility layer, so it will provide basic support for things like I/O.
- Retr0id 1y agoYou get a better experience on the educational front from booting them in a VM, but it's certainly more fun to boot on real hardware.
- axiolite 1y agoFrom the project page: "Boot FreeDOS, Windows XP, and Windows 7" Additionally, it was just 3 years ago that memtest86plus finally got a UEFI version. That was painful for a few years there. (Though the 4GB RAM limit would have made this not an ideal solution.) I'm sure there are other such self-hosting utilities that haven't been and may not be ported/rewritten to work under UEFI.
- sdflhasjd 1y agoI think I remember Windows 7 (and maybe even Vista) supported UEFI natively.
- justsomehnguy 1y agoIt's a mishmash. Vista and 7 can't boot from the GPT partitions and overall widespread UEFI support on the hardware is ~2013, way beyond Vista and very late in 7 lifecycle.
- o11c 1y agoHuh, Github fails quite badly at dealing with submodules from other forges.
- LukeShu 1y agoVery cool hack. But, as okanat says, if the goal is to run legacy operating systems, then modern hardware is going to be challenging in other ways too. IME the biggest thing I want PC BIOS back for is the ability to use non-GPT disk layouts, which this doesn't accomplish as, as to use it you put it on the EFI partition on your GPT disk.
- skissane 1y agoMBR and GPT can coexist on the same disk - MBR goes in sector 0, GPT starts in sector 1. Normally the MBR in sector 0 is “protective” (it just marks the whole disk as in use), but in theory you can create a “hybrid” disk in which the MBR and GPT both describe the same partitions. I suppose you could even reserve most of the disk as one big GPT partition and then split that up into multiple MBR partitions. You’d have to be very careful editing the partition table on such a disk because standard tools might break it.
- rjst01 1y agoIn practice, whether or not this actually works can be very hit-or-miss. We've found several UEFI implementations will not consider a disk bootable if the pMBR doesn't exactly match the spec, which specifies that the 'protective' partition shouldn't be marked as bootable in the MBR partition table. Meanwhile, other implementations will not consider the disk bootable in BIOS mode if the partition in the pMBR is not marked bootable.
- mintsuki 1y agoIndeed! Which is why the only portable solution is to not do this. For stuff that needs to be bootable by both BIOS and UEFI the only portable solution is to use MBR, not GPT. That means all legacy BIOS systems will boot it, and so will all UEFI systems since UEFI must support MBR. For ISOs that need to additionally be booted off of optical media (aka ISOHYBRIDs) the story gets more complicated, but ultimately what you need to take away from that is the same: avoid GPT at all cost.
- skissane 1y ago
- mmastrac 1y ago> Windows XP/7's video modesetting logic is a bit mysterious. It may try to set a incompatible mode using int10h, which will cause flickering or even black screen after transferring control to the legacy OS. I would really love to know more about this. I assume it's this VGA driver: https://github.com/tongzx/nt5src/tree/master/Source/XPSP1/NT/drivers/video/ms/vga/disp/16bpp https://github.com/tongzx/nt5src/tree/master/Source/XPSP1/NT...
- ronsor 1y agoWow, Microsoft open-sourced Windows XP?
- mmastrac 1y ago... uhh, not really. :)
- skissane 1y agoMicrosoft owns GitHub, and GitHub is crawling with Windows source code leaks… and I’m wondering it anyone at Microsoft really cares? Is it possible they’ve even made an intentional decision just to ignore it? If it were an Oracle source code leak, I expect they’d have a crack team of lawyers suing people 24x7 until it was all gone… maybe that’s why there haven’t (to my knowledge) been any Oracle source code leaks (I vaguely remember one of Solaris, but that wasn’t such a clearcut case since IIRC it was mostly previously open sourced code) Well, it wouldn’t surprise me if some unfriendly intelligence agency somewhere had succeeded in stealing some of it, but if they have, they are unlikely to release it publicly
- jsheard 1y ago> Microsoft owns GitHub, and GitHub is crawling with Windows source code leaks… and I’m wondering it anyone at Microsoft really cares? Even weirder is that GitHub hosts all of the tools for activating (i.e. cracking) modern versions of Windows and Office as well. Microsoft really doesn't care.
- deleted 1y ago[deleted]
- userbinator 1y agoThis is like the reverse of the bootloaders first pioneered by the Hackintosh community to boot UEFI macOS on traditional BIOS systems. and VESA VBIOS from SeaBIOS project Unfortunately I believe modern GPUs without a standard VBIOS may not act enough like an IBM VGA for a generic VGA VBIOS to work, so I see another project for someone in the future: a retrofit VBIOS, especially for those GPUs e.g. Intel's for which lots of open-source driver code and documentation is available but later models no longer come with a VBIOS. Perhaps also injecting a true CSM from an old closed-source UEFI BIOS, before they started removing it, is worth doing as in my limited experience SeaBIOS isn't as quite compatible as the closed-source ones for some edge-cases.
- mjg59 1y agoIt's actually pretty much the same as the project to get Windows running on Intel Macs before Apple released Boot Camp
- kotaKat 1y agoI'd love to see someone tackle eMMC support on older machines as the next step.
- userbinator 1y agoEasily done in hardware. Look online for SD/SDHC/MMC to IDE/SATA adapters.
- 3036e4 1y agoAmazing! I thought all hope of ever running FreeDOS on the bare metal again on new hardware was lost, but maybe using this code (or something similar) a future FreeDOS installer can fix this at least on some systems.
- coolcoder613 1y agoI have been looking for something like this for a long time, I am glad to see it now exists.
- lproven 1y agoMe too. Tell me more...?
- fuzzfactor 1y agoBeautiful. This is the project that I think has been needed for a while now. So much that a Replacement CSM for user implementation has been top of mind to suggest here, awaiting the next time I see a request from programmers looking for a worthwhile project. Now there's nothing more performant than a request being granted before it's even been made :)