Skip to content

Latest commit

 

History

History
62 lines (60 loc) · 3.52 KB

GetShellWithoutMonitorOnWindows.md

File metadata and controls

62 lines (60 loc) · 3.52 KB

Seting up the Pi without a monitor using Windows

Note: These instructions are obsolete. Follow these instructions instead.

  1. Download and install: Notepad++ Alternatively, any other text editor which is capable of editing files with Unix-style line endings.
  2. Optional: Watch this video to get an idea of the process. The steps from the video are partially automated, below.
  3. Remove the MicroSD card from your computer and reinsert it. Do not at any point during the setup of the USB drive allow Windows to format any partition on any drive.
  4. Note that a new drive labeled "boot" has appeared on your computer. Note the drive letter of that drive.
  5. Right-click on your Start menu icon and select "Windows PowerShell (Admin)".
  6. Right-click the title bar of the window and select "Properties". Ensure that the "Use legacy console" checkbox is unchecked and activate the OK button. If it was checked before you unchecked it, close te PowerShell window and go back to step 3. If it wasn't, proceed onto the next step.
  7. Run the following command:

    Note: You can paste into the PowerShell window by right-clicking. The text will appear at the position of the cursor, not necessarily at the position where you click.

    Set-ExecutionPolicy -Scope CurrentUser Unrestricted
    
  8. Enter Y when prompted, and press Enter.
  9. Run the following commands:
    cd ~
    wget https://raw.githubusercontent.com/marcone/teslausb/main-dev/setup/windows/setup-piForHeadlessConfig.ps1 -OutFile setup-piForHeadlessConfig.ps1
    ./setup-piForHeadlessConfig.ps1 -Verbose
    
  10. Enter the single letter of the "boot" drive and press Enter.
  11. Enter the SSID of your WiFi network and press Enter.
  12. Enter the Pre-Shared Key of your WiFi network and press Enter.
  13. If you want to add additional WiFi networks, execute:
    ./add-wifi.ps1 -Verbose
    
  14. If you will use any public or insecure networks, be sure to update your password using the instructions at the end of this document.
  15. Enter the additional SSID and Pre-Shared Key of the WiFi network and repeat as necessary.
  16. Eject the sd card.
  17. Move the sd card to the Pi.
  18. Connect a micro usb cable to the port labeled "USB" on the Raspberry Pi, and to the PC.
  19. On the PC, press your Windows key, type Control Panel.
  20. Open "Network and Sharing Center"
  21. Click "Change adapter settings"
  22. Wait for something labeled "USB Ethernet/RNDIS Gadget" to appear.
  23. Enter this command in your PowerShell window:
    ssh pi@raspberrypi.local
    

    Note: If you receive an error indicating that the host id has changed and you can't work around it you'll need to delete the ~\.ssh\known_hosts file. You're especially likely to encounter this error if you're following these instructions for a second time.

  24. If you get an "unknown host" error message install Bonjour: https://support.apple.com/kb/DL999 and go back to step 15.
  25. You should be prompted for the password for the user "pi". Enter
    raspberry
    
  26. Change your password! While not required, it is recommended, especially if you may be using any public or insecure WiFi connections. To do so Enter
    passwd
    
  27. Then enter your new password and press Enter
  28. Confirm your new password and press Enter
  29. If you want to change your password later, you must set the system partition to writeable with either
    /root/bin/remountfs_rw
    
  30. or
    mount / -o remount,rw