0

I have a USB flash drive which I used Rufus on and put freedos on it (FAT32). I created a folder in the drive EFI\BOOT with the file bootx64.efi in directory BOOT. I enter my bios then boot from my flash drive (disabling secure boot and enabling legacy with correct priority). Success, now I change the dir to EFI\Boot and check to see if bootx64.efi is in it. And it is. I type on the file hit enter ( checked spelling and caps multiple times) then I get Bad Command or file name - "BOOTX64.EFI" I need to run this so I can change an address that will let me hot plug my mpcie port I'm using for my eGPU so I can use it since the 1050 Ti was released without the drivers that let you use mPCIe setup. I tried this with a 980 Ti and it was literally plug and play, 0 modification needed. Sorry if poorly questioned I will be glad to include more information if needed, thank you! I also understand the consequence of messing up and bricking the laptop.

1 Answer 1

2

The filename EFI\BOOT\bootx64.efi is the fallback filename for a (U)EFI boot loader. (These boot loaders normally reside on FAT filesystems, which are case-insensitive.) This file will normally hold a duplicate of GRUB, the Windows boot loader, an EFI shell, or some other EFI tool.

It sounds like you're trying to run bootx64.efi from DOS. Unless something has changed recently in FreeDOS, EFI programs cannot be run from DOS, and DOS programs cannot be run from EFI. Thus, your approach will not work; you'd have as much luck running a macOS program in Windows.

I'm not quite following your explanation of what this program is. If it's an EFI program, then chances are you need to do one of two things:

  • Run it once -- If the program needs to be run once (like to update the firmware, although your description makes it sound like this is not what it's doing), then you can do so in any number of ways. The easiest is likely to copy the program to a FAT filesystem on a USB flash drive as EFI\BOOT\bootx64.efi. You should then be able to "boot" the USB flash drive to run the program. Other ways to run it would be to launch an EFI shell (by copying an EFI shell program file to a USB flash drive and "booting" it) or by creating an entry in whatever boot manager you use to launch the program.
  • Integrate it into your boot process -- If the program needs to run every time you boot, then your task is trickier, since you must integrate it into your normal boot process. Precisely how to do this depends on what OS(es) you're running and what boot manager(s) you're using. You might need to change the boot process to boot via an EFI shell and use a startup.nsh script to launch the program you're trying to run followed by your regular boot loader or boot manager. If the file in question is a driver, then my rEFInd boot manager should enable you to launch it automatically on every boot. I'd need more details to provide better advice if the program needs to run on every boot -- but in this case, I'd expect the program's author to provide such instructions.

OTOH, if the program is a DOS program, then booting to FreeDOS and running it there makes sense, but renaming it as bootx64.efi is completely pointless. I suspect this is not the case, since any sane instructions you found for running a DOS program would not include this weird step. On the off chance that it is a DOS program, though, you should just leave it with its original filename (probably ending in .com or .exe) and run it as such. That said, running a DOS program as part of the normal boot process of an EFI-based computer would be impossible, or at least very tricky. You might still use a DOS program to make a permanent change (like upgrading firmware).

1
  • Not what I wanted to hear, but alas, it is what it is and I'll have to change the boot mode to BIOS to be able to boor FreeDOS. +1
    – Fabby
    Apr 22, 2018 at 17:50

You must log in to answer this question.

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