How to net boot Raspberry Pi OS from Windows

Copyright © 2019-2021 Herbert Hanewinkel, Neuried
 
updated March 2021

Remote booting Raspberry Pi OS from Windows

The setup assumes the following addresses. Adapt to your own numbers:

Windows IP address (Server): 192.168.1.10
Router/Gateway IP address: 192.168.1.73
DNS Server IP address: 192.168.1.73
RPi IP address (Client): 192.168.1.12

On Windows:
  1. Create a folder e.g. "c:\server\raspios".
  2. Create a sub folder, "boot"
  3. Download a zipped Raspbian image, e.g. 2020-12-02-raspios-buster-armhf-lite.zip
  4. Use 7zip to extract the SD image.
  5. Use 7zip to open the SD image and extract "0.fat".
  6. Use 7zip to open "0.fat" and extract the whole contents to folder "boot".
  7. In file "cmdline.txt" in folder "boot" from the line
In haneWIN NFS Server (1.2.58 and higher)
  1. Select under Preferences-Server the option "Save attributes/uid/gid on NTFS volumes".
  2. Create a NFS server exports entry:
    c:\server -name:server -alldirs -i32 -maproot:0:0
    What the options do:
    • name the exported filesystem raspios for clients
    • allow mount of subfolders
    • some raspiberry software for desktop and audio fails with 64 bit inodes, there reduce inodes numbers to 32 bits.
    • map linux user root to root for file access

7zip can open "1.img" but it is in ext format and 7z does not handle symbolic links on extraction. We need the contents of "1.img" in the correct format for the NFS server:
  1. Boot the RPi with libreelec and login with ssh (setup description on previous page)
    1. Create two directories /var/raspios and /var/nfs
    2. mount -t nfs 192.168.1.10:/server/raspios /var/raspios
      now we can access the image "1.img" in libreelec.
    3. Bind the image to a device:
      losetup /dev/loop1 /var/raspios/1.img
    4. Mount the device:
      mount /dev/loop1 /var/nfs
      now we can access the contents of the image "1.img" in libreelec
    5. cp -a /var/nfs /var/raspios
      (could take an hour depending on the downloaded Raspberry Pi OS release. libreelec has no rsync and cp -a worked fine)
    6. Clean up:
      umount /var/raspios and umount /var/nfs
      rmdir /var/raspios and rmdir /var/nfs
In haneWIN DHCP Server
  1. Create a new DHCP server profile with name "raspios" for clients with static IP addresses.
  2. Configure the profile
  3. In Preferences-TFTP set the TFTP Root Directory to: c:\server\raspios\boot

    dhcp tftp configuration

Power on the RPi.
That's it. Have fun.

remote desktop
After installing XFreeRDP2 you can access your "diskless" Raspberry Pi using Windows Remote Desktop.
If you don't see any fonts on your desktop, please make sure you have enabled the -i32 option in exports.

Further hints:


www.haneWIN.net Home