Giter Club home page Giter Club logo

Comments (32)

schau80269 avatar schau80269 commented on August 26, 2024

This is not an issue with WoR-Flasher, but rather a strange HW/SW compatibility issue. I've had massive trouble installing Win11 Pro ARM64 24H2 into NVMe SSDs mounted into USB enclosures that feature the Realtek RTL9210B chip inside (e.g. Sabrent EC-SNVE) for my Raspberry Pi 5 (and Orange Pi 5 Plus). Problem symptoms were similar to yours. I then changed to a different USB enclosure with Jmicron JMS583 chip inside (e.g. 1st gen Plugable USBC-NVME) and OS installation proceeded normally to completion. For some unknown reason, Win11 ARM64 OS installation bits just do not play nice with RTL9210B-based NVMe USB enclosures, but Win11 x86-64 OS (for Intel & AMD) does not have this issue. Even updating the firmware of the Realtek USB enclosure did not help. Switching to Jmicron-based USB enclosure is the only realistic workaround I've found. Tricky part is how to identify whether a USB enclosure uses Realtek or Jmicron chip as the manufacturers never volunteer this info.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

Another option is to connect an NVMe SSD directly to the Raspberry Pi 5 with a m.2 PCIe hat. With latest bootloader installed into the Pi 5, WoR-Flasher works great installing Win11 ARM64 24H2 OS directly into NVMe SSDs. The performance is good too, especially with the PCIe configured to gen 3 speed.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

WoR-Flasher is NOT at fault for your Win11 OS installation failures with Raspberry Pi 5 and NVMe SSD. There is a known issue with the Win11 inbox NVMe storage driver (stornvme.sys) not working with RPi5, so installations using stock (unmodified) OS installation bits will fail, and even if you somehow make it through the installation, the OS will likely fail during OOBE and never reach the desktop properly. WoR-Flasher simply gets badly tripped up by this issue.

To use WoR-Flasher to directly install Win11 into NVMe SSD, it is necessary to replace the stornvme driver residing in the OS installation files (boot.wim & install.wim) on the USB installation media. A version of stornvme driver v6 "50%" provided recently by developer digdoug2 on Discord works well with RPi5 and I've had multiple successful installations and stable OS operation with several different NVMe SSD brands and models attached via m.2 Hat.

Attached is a script I wrote that uses DISM to automate the replacement of stornvme.sys for boot.wim & install.wim, and optionally inject 3rd-party ARM64 device drivers (there are none currently for RPi5). Once the boot.wim & install.wim files are processed by this script, Win11 installation into NVMe SSD connected to RPi5 should work.

Inject_ARM64_Drivers_Replace_stornvme_Win11ARM64.zip

from wor-flasher.

Botspot avatar Botspot commented on August 26, 2024

This looks promising. @schau80269 If you are interested in getting this added to the wor-flasher for everyone, let me know!

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

@Botspot Feel free to add stornvme driver replacement functionality to WoR-Flasher! Replacing the inbox stornvme driver is critical in getting Win11 ARM64 OS to install successfully for ARM SBCs such as Raspberry Pi 5 and Rockchip RK3588-based boards such as the Orange Pi 5 series. With the replacement stornvme driver in place, WoR-Flasher typically completes OS installation into NVMe SSD on RPi5 in less than 6 minutes, and subsequent OS bootups are trouble free. The ARM64 driver injections in my script are mostly for my Orange Pi 5 Plus. Pre-injected RK3588 ARM64 drivers don't seem to affect Raspberry Pi 5 installations. I also inject a ARM64 driver for Realtek USB-to-Ethernet adapters (1GbE & 2.5GbE) so RPi5 can have internet connectivity during the OOBE setup. The v6 "50%" stornvme driver provided by digdoug2 serves the RPi5 extremely well. I've had zero crashes. Unfortunately, it's different for my Orange Pi 5 Plus where there are still random DPC_Watchdog_Violation BSOD crashes with NVMe SSD, so Win11 ARM64 24H2 currently runs with NVMe SSDs on Raspberry Pi 5 better than with RK3588 SBCs.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

stornvme v6 driver was posted to the "Windows on R" Discord server by digdoug2. Attached is a copy.

stornvme_v6.zip

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

storahci driver is not used for Raspberry Pi 5 with NVMe SSD, so no driver replacement is needed.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

Here's a replacement storahci driver to keep the CMD script happy.

storahci.zip

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

The script failed to process install.wim. Mounting of install.wim failed with Error:11 and it went downhill from there.

Were you trying to get Win11 OS installed into the same NVMe SSD that was loaded by WoR-Flasher with the modified installation files? I don't recommend doing this as it is more likely to have issues. Instead, use a 8/16GB USB flash drive (not a NVMe SSD in a USB enclosure!) and get WoR-Flasher to load this up, then copy out the boot.wim & install.wim files to another PC to run the script, then copy the modified files (in the Src subfolder) back into the USB flash drive (boot.wim in BOOT partition sources subfolder, install.wim in the exFAT partition) overwriting the originals. Install a blank NVMe SSD to m.2 Hat as OS installation target drive.

Attached is an updated script. Since there are no ARM64 device drivers for RPi5 to inject, simply remove the Drivers subfolder (or don't create one) and the script should skip all driver injections and only do the stornvme driver replacement. Even storahci replacement is not needed for RPi5. So the stornvme_storahci subfolder should just have 2 files: the v6 stornvme.sys & stornvme.pdb and nothing else. This is a better way to install Win11, as the USB flash drive can be used repeatedly for OS installs after WoR-Flasher and script processing is done once.

If you use NVMe SSD in USB enclosure with Realtek RTL9210B bridge chip as OS installation target, your installations will continue to be unsuccessful. I wasted several days fighting this last month and concluded that Win11 ARM64 OS has a major incompatibility with that Realtek chip with no fix in sight. You are much better off installing OS directly into NVMe SSD attached to m,2 Hat. My script was written to enable this to work.

One more thing: Don't leave a copy of the script sitting in the installation media. WoR-Flasher seems to pick it up which may mess up the Pre-installation environment.

Script_to_Inject_ARM64_Drivers_Replace_stornvme_for RPi5_Win11ARM64.zip

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

Something is not right about your install.wim, and DISM chokes up trying to mount it, so of course the stornvme driver replacement fails. Your installation media was thus not prepared properly to support OS installation into NVMe SSD. The script must be run from an elevated command prompt. I suggest you start over by downloading a recent Win11 24H2 ARM64 build from uupdump.net. I've had great success with the 26100.1000 ARM64 build. Attached is a procedure I just wrote up. There are steps to be done with both x86-64 Win11 PC and Raspberry Pi 5. I strongly recommend you use a dedicated USB3 8/16GB flash drive to be OS installation media. Once prepared properly, this USB flash drive should be usable repeatedly for installing OS.

Windows_11_ARM64_OS_Installation_into_NVMe_SSD_for_Raspberry_Pi_5.zip

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

The CMD script should NOT be copied to C:\Windows\System32 and run from there! The SSD drive in my x86-64 Win11 PC is partitioned into C: and D: drives, and the CMD script is sitting in D:\Win11_ARM64_WIM folder along with Orig and stornvme_storahci subfolders. C:\Windows\System32 is Windows folder under strong OS protection and no user files should be copied into it, otherwise you run into file permission issues: Access Denied. Also, where is your J: located? Is J: the USB flash drive? The CMD script is intended to run process boot.wim & install.wim files sitting in an NTFS formatted disk partition. USB flash drive with FAT32 or exFAT formatted partition will run into ACL issues as evidenced in the log. Keeping all these files away from C:\Windows\System32 should go a long way to help the CMD script run successfully. Either create C:\Win11_ARM64_WIM on your PC hard drive, or better yet, shrink C: and use the available space to create a D: partition of at least 30GB, and copy the .wim files into D:\Win11_ARM64_WIM\Orig first before launching the CMD script. The CMD script must still be run from elevated command prompt but change directory (cd) first to D:\Win11_ARM64_WIM then launch the script sitting there. Only when the script completes successfully do you copy the modified boot.wim & install.wim files in the Src subfolder back to the USB flash drive.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

boot.wim was processed properly by the CMD script, but I have no idea why the DISM /export-image command failed on install.wim, and can only guess that something is still wrong with it.

At this point I'd recommend taking a completely different approach, which is entirely done with a Windows x86-64 PC, so possibly more straightforward and faster. High level steps are as follows:

  1. Download a recent Win11 ARM64 build (e.g. 24H2 26100.1150) from uupdump.net. Run the uup_download_windows.cmd script in elevated command prompt to generate the ISO file.
  2. Download Windows on Raspberry Imager (WoR) version 2.3.1. Extract to a folder, edit the settings.ini file to add the following line to the bottom:
    SkipEditionBuildNumCheck = 1
  3. Attach a NVMe SSD via USB m.2 enclosure to PC. This SSD will be used to boot Win11 on RPi5 so it needs to be at least 60GB in size.
  4. Launch WoR 2.3.1, select the attached NVMe SSD, select "Raspberry Pi 2/3" (don't select Raspberry Pi 4), point it to the Win11 ISO image file from uupdump, and let the tool finish installing OS into the SSD.
  5. Download and launch WoR-Boot-Mounter (release 1.1.0) to access the BOOT partition on the NVMe SSD (Click the Mount button),
  6. Copy the files for the latest Raspberry Pi 5 UEFI (bcm2712-rpi-5-b.dtb, RPI_EFI.fd and config.txt) into the BOOT partition, overwriting any existing files. Click the Unmount button to unmount the BOOT partition.
  7. Run the attached script in elevated command prompt to do the stornvme driver replacement directly on the system drive of the NVMe SSD.
    Example: Replace_stornvme_local E K:\Win11_ARM64_WIM\stornvme_storahci
    where E is the Windows partition of the attached NVMe SSD
  8. After this script completes, eject the NVMe SSD from PC and attach it to RPi5 via m.2 Hat. Win11 ARM64 OS should be ready to do first boot on RPi5.

Windows on Raspberry Imager and Boot partition mount utility:
https://worproject.com/downloads

Raspberry Pi 5 UEFI firmware:
https://github.com/worproject/rpi5-uefi

Script_to_replace_stornvme_driver.zip

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

Check that the Pi 5 UEFI files have been properly copied to the small BOOT partition in the NVMe SSD. If Pi 5 cannot boot UEFI it certainly will not boot to Win11. Also, ensure the Pi 5 has latest bootloader installed and has PCIe included in its boot device order. It's normal for Raspberry Pi OS to see the Win11 OS partition as raw since this OS does not recognize the NTFS file system used for Windows. Pi 5 may also need an additional line in config.txt to properly enable the Raspberry m.2 Hat.

https://www.youtube.com/watch?v=93oby86Nvkw

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

schau80269 avatar schau80269 commented on August 26, 2024

UEFI error message about winload.efi file (e.g. cannot be found) is typically caused by something in the BCD (Boot Configuration Data) being out of whack. Your SSD cloning may have neglected to make the necessary BCD content adjustments and created an unbootable clone. Do you know how to use bcdedit? Also, the SSD your cloned from was not working to start with. I don't think that previous SSD was entirely responsible for your OS installation troubles. I would suggest you abandon SSD cloning, blank out your Sabrent SSD (diskpart - clean) and start from scratch.

It's still unclear whether you have generated USB installation media property. If the USB installation media was not set up exactly right, it will doom all OS install attempts! I would suggest that you do a reset, forget about Win11 installation briefly, and work first to ensure your Pi 5 can boot Raspberry Pi 64-bit OS successfully from that Sabrent SSD.

My original script is intended to modify Win11 ARM64 OS installation files (boot.wim & install.wim) to enable OS installation directly into SSD attached to Pi 5. That apparently didn't work for you. My recent script is intended to post-process a Win11 OS installation sitting in an SSD with a replacement stornvme driver for proper OS bootup. That didn't work for you either.

I'm running out of ideas on how to help you troubleshoot. For me, Win11 ARM64 OS installation for Pi 5 has become very straightforward, and I have done it nearly a dozen times. Remote/armchair troubleshooting is always difficult and can easily mislead down the wrong path.

from wor-flasher.

SeaDog58 avatar SeaDog58 commented on August 26, 2024

from wor-flasher.

Marcinoo97 avatar Marcinoo97 commented on August 26, 2024

funny that you think a company that bans every mention of windows on their forums would add support for windows in their Raspberry Pi Imager. WoR tool won't be updated either.

from wor-flasher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.