7

FreeDOS .img was burned to a USB drive via balena etcher.

enter image description here

A UEFI only desktop does not recognize the FreeDOS USB stick for boot. USB bootup tests, on a BIOS laptop, indicates a successful legacy boot.

QUESTIONS

  • What is required to be UEFI bootable?
  • Is it possible to change the Partition table from MSDOS to GPT?

UPDATE

The Dell 7010 desktop firmware is old and for some reason: only UEFI boot. The Legacy boot option is greyed-out. Booting from the DVD/CD is not possible

The goal is to update the firmware with a DOS executable provided at this link:

https://www.dell.com/support/home/en-us/drivers/DriversDetails?driverId=5M70H

6
  • Are you sure that it is impossible to boot that computer in BIOS mode?
    – sudodus
    Aug 5, 2020 at 19:48
  • Yes, for some reason it will not accept the command to enable legacy bootup.
    – gatorback
    Aug 5, 2020 at 19:49
  • Please tell us about the computer: brand name and model. Maybe someone who reads this knows how to boot it in BIOS mode.
    – sudodus
    Aug 5, 2020 at 19:51
  • Now I see what you intend to do. Then VirtualBox is not an option, and updating the the firmware is not an option unless you can do it in Linux. The problem with FreeDOS might be that it is a 16 bit system, and UEFI does not accept such systems (we have that problem with memtest+). Maybe there is another DOS version that runs in UEFI mode. It seems overkill to get Windows for this purpose.
    – sudodus
    Aug 5, 2020 at 19:59
  • 3
    Did you turn off UEFI Secure Boot? That prevents CSM/BIOS/legacy boot.
    – oldfred
    Aug 5, 2020 at 20:16

3 Answers 3

8

FreeDOS assumes a BIOS, and does not work with UEFI

The FreeDOS wiki page wiki.freedos.org/wiki/index.php/UEFI tells us that it does not work:

UEFI is an acronym for Unified Extensible Firmware Interface.

Note that many new (2010 and later) computers boot using UEFI, which is not compatible with BIOS. FreeDOS assumes a BIOS, and does not work with UEFI.

Many motherboard manufacturers are replacing BIOS+MBR with UEFI+GPT. UEFI uses a GPT table instead of the MBR. UEFI handles large-sectored hard disks. Hard disk manufacturers are already (2010 and later) coming out with hard disks with large sectors, which BIOS does not handle (they are hard-coded to 512-byte sectors).

Almost all UEFI systems today (2021) can boot also in BIOS mode alias CSM alias legacy mode. But we can expect that in the future many PC computers will be delivered with UEFI/BIOS systems that boot only in UEFI mode.

A workaround to run FreeDOS would be to install it in a virtual machine and set this virtual machine to boot in BIOS mode alias CSM alias legacy mode. You can use VirtualBox for that purpose. (But you cannot flash the computer's BIOS that way.) There is also DOSBox, an x86 emulator with DOS.

Edit 1:

I found this link, that might be helpful:

wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux

Flashing BIOS from Linux

This article aims on providing information on flashing your system BIOS under Linux. Most manufacturers provide a Windows executable or a BIOS executable that can only be run under Windows. However, there are a few utilities that allow you to upgrade your system BIOS under Linux. Warning: Flashing motherboard BIOS is a dangerous activity that can render your motherboard inoperable! While the author of this article has successfully run this procedure many times, your mileage may vary. Be careful! You may want to consider updating microcode instead if it is supported by your system. Note:

...

For users with Dell computers, Dell recommends Linux users flash their BIOS following information located here (in short, put the .EXE on a USB stick and use the F12 boot menu to access the firmware's flash utility).

Edit 2:

Flashing BIOS from Windows PE

It is possible to run Windows PE also in UEFI mode. The standard procedure is to use your own or a friend's Windows 10 system to create a Windows PE system in a USB pendrive or CD/DVD disk.

When booted from Windows PE you can flash the BIOS.

According to this link it can be redistributed for non-commercial purposes (so OK to use a Windows PE made in a friend's Windows system).

4
  • 1
    Although the underlying problem is not solved, credit is awarded because FreeDOS is apparently not able to meet the UEFI requirement
    – gatorback
    Aug 5, 2020 at 20:04
  • Maybe you dare do it from Linux, or try to get along updating microcode instead.
    – sudodus
    Aug 5, 2020 at 20:20
  • 1
    Thanks for introducing fwupdmgr Unfortunately it seems that the Dell Optiplex 7010 is not supported by fwupd.org/lvfs/search?value=Dell+Optiplex
    – gatorback
    Aug 5, 2020 at 23:29
  • 2
    To clarify: there is no UEFI "requirement" any DOS variant can "meet". UEFI native boot strips away the BIOS functionality on which DOS was based. One might even say parts of DOS were delegated to BIOS. So disabling Legacy Boot is disabling vital parts of DOS.
    – korkman
    Dec 13, 2020 at 23:34
2

What we need, (as far as I can see) to support this, would effectively be a BIOS implimentation built into a UEFI boot loader. (ie. all the usual BIOS interrupt APIs)

So you boot BIOS code (or at least a reasonably complete CSM) via UEFI, and then that boots DOS. There may still be issues with MBR, and x64 only booting. It's extremely difficult to drop to 16-bit mode, let alone add a 32-bit DOS extender after that, once you've jumped to x64 mode... and impossible (I believe) in IA-64. That's part of what UEFI was meant to solve, and why EFI was the solution for everything except x86/64 systems for so long. (it needed the "Universal" extensions to go from EFI to UEFI before they could use it on that [frankly, PIFA] platform)

However, short of IA64, I think it would be possible using virtualisation technologies and exception handlers to "emulate" problem instructions. Any system which would present these issues will also have so much horsepower to spare, that the extra steps (and expensive context switching) would be more of a headache for the OS developers than users.

Remember, we have Open Source BIOS code built into various VM solutions, including QEMU and VirtualBox. It's only that they expect an OS with drivers for available hardware, and the only OS you'll have available will be the UEFI firmware.

As an alternative tactic:-
You may be able to install a Linux system and run freeDOS under KVM, with PCI pass-through for as much hardware as possible. That should work using current software technology..? Bearing in mind that DOS is really meant for ISA systems, not PCI ones anyway.

1
  • Doesn't seem so impossible. If you have kernel level ia64 you can set the control bits to go back to real mode and far jump down to the bottom of ram. From there, you can reload a 32 bit support that sets itself up as high in RAM as possible that knows how to convert 16 bit interrupt calls to UEFI calls. It would be slow by modern standards changing CPU instruction mode all the time but fast by DOS standards.
    – Joshua
    Apr 24, 2023 at 1:53
1

If I remember correctly that Legacy Boot is usually greyed out because "Secure Boot" is enabled in another menu page. Once it is disabled the option to use Legacy Boot becomes available.

This information can also be found in the DELL FAQ found at:

https://www.dell.com/support/kbdoc/en-bb/000133480/uefi-and-secure-boot-faqs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .