Reputation: 31
EDIT: Editing in case anyone stumbles upon this in the future. The UEFI boot partition was formatted in NTFS and it needed to be FAT32. Apparently the American Megatrends UEFI doesn't have full support for NTFS, so you can 'dir' and 'type' files from the UEFI shell, but you can't run scripts or write to files. The solution was to boot into Windows, copy all of the files to a different drive, format the partition as FAT32, and copy the files back.
Original Problem:
Long story short, I've got a computer (an MSI x99s gaming motherboard to be exact) that I need to boot from the existing UEFI on the motherboard. The reason I need to boot from UEFI is that I got a new SSD and the legacy BIOS doesn't recognize it, but there's a 3rd party driver out there that does.
Anyway, I put the driver on one of my other hard drive partitions, along with a Startup.nsh
script that says:
.efi
that boots Windows 10 from the now-visible SSD partitionI know this sequence of commands will boot to Windows 10, because it works if I type it in from the UEFI shell prompt. The problem is that when I run any .nsh file from the UEFI shell, including startup.nsh
, it produces this error message:
Shell: Cannot read from file - 800000000000001f
If I use the 'type' command I can see the contents of the .nsh
file just fine, so I figure it's either my firmware just has some horrible bug in it, or there's some attribute I need to set on the .nsh
file.
Upvotes: 3
Views: 5870
Reputation: 2109
I had the exact same issue recently, 4 different NSH scripts and only 1 was working. The only difference was that my working scripts was the "main" one and the other really smalls.
I added many comments to all my script to make them > 1KB and it solved my issue on all of them. No idea why but might worth a try
Upvotes: 0
Reputation: 1
from the intel uefi pdf at https://www.intel.com/content/dam/support/us/en/documents/motherboards/server/sb/efi_instructions.pdf
Basic Instructions for Using the Extensible Firmware Interface (EFI) Using EFI Revision 2.0 3 1.4 Running the EFI script under the EFI Shell Change from the EFI shell to the USB device folder: The first USB device found shows up in the mapping as fs0 (File system 0); the next device shows up as fs1, etc.
Upvotes: 0
Reputation: 21
Been there, tried to use NVMe on old motherboard
You can't use map -r, it will discontinue the startup.nsh read stream
echo Load NVMe Driver
load fs0:\NvmExpressDxe-64.efi
echo Remap drives
connect -r
set -v efishellmode 1.1.2
map -u
echo Boot from NVMe
fs1:\EFI\Boot\BOOTX64.EFI
echo Done!
Upvotes: 2