Create headless RPI4 with WiFi from Windows PC/Laptop via manjaro-arm-installer

In case this helps someone, here are the steps I used to write a minimal RPI4 (headless with WiFi) on a Windows PC
You will need:

  • Windows X64 PC (faster is better, I first tried this on an old Acer Aspire One and it took an hour..)
  • Internet or WiFi connection
  • USB Stick/Thumbdrive (will be used to boot live X64 Manjaro on your PC)
  • SD card to write Manjaro ARM RPI4 minimal

Create bootable USB-Stick to run Live Manjaro on your PC

Boot Live Manjaro on PC

  • Boot your PC from the USB-Stick
    Note: you may have to configure your system to allow booting from the USB-Stick instead of Windows.
    This is explained in 'Booting into the Live-System':
    https://manjaro.org/support/firststeps/#making-a-live-system

  • Select item "Boot: Manjaro.." from the "Welcome to Manjaro" menu:
    Use the arrow keys and carriage return to select

  • Login to Manjaro (user and password are displayed on the screen).

  • If you don't have wired Internet access, connect to your WiFi via:

    nmcli -ask dev wifi conn wifi-ssid-here

Enter your WiFi password to the 'Password:' prompt.

  • Install the manjaro-arm-installer package (and any others you desire) on to your PC:
    sudo pacman -Syy manjaro-arm-installer # htop mc tmux

Write minimal RPI4 to SD card

  • Check what disk devices Manjaro sees on your PC:
    lsblk -f
  • Insert the destination SD card into your PC
  • Determine the device name of the SD card
    lsblk -f

WARNING: be sure to note the correct name of your SD card, as other accessible devices may include your Windows drive(s)!
In my case it was 'sdd', your case may be different.

  • Run manjaro-arm-installer
    sudo manjaro-arm-installer
  • Answer all the prompts for: Device, Edition, User, SDCard, Timezone, Locale, Hostname, etc.
  • After some minutes (depending on your network and PC speed) your SD card will have a minimal destribution on it.

Setup WiFi on the RPI4 minimal SD card from your PC

The Raspberry PI Model 4B includes integrated WiFi, let's enable it!

WiFi Setup Part 1 - create a minimal configuration file, ~/wifi.1

  • Save some typing:
     f1='wifi.1'
  • Set the initial part of this configuration file:
     printf 'ctrl_interface=/run/wpa_supplicant \n update_config=1 \n' > $f1
  • Append your WiFi SSID and WiFi password to this file:
     wpa_passphrase 'your-WiFi-ssid-here' 'your-WiFi-password-here' >> $f1
  • Verify/correct the file using the nano text editor:
     nano $f1

(use CTL+X to exit from the nano editor, and Y to write the file)

WiFi Setup Part 2 - enable WiFi on the SD card from your PC

  • Find your SD card:
    lsblk -f
  • Your new SD card will have two paritions, with labels 'BOOT_MNJRO' and 'ROOT_MNJRO'
    You want to access the ROOT_MNJRO partition by mounting it to a new directory:
    mkdir rpi4
    sudo mount -L ROOT_MNJRO rpi4
  • Copy the configuration file (contains your WiFi SSID and password) on to your SD card:
    sudo cp $f1 rpi4/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
  • Do enough of a 'systemd enable' so WiFi starts when you boot your PI:
    sudo ln -s /usr/lib/systemd/system/wpa_supplicant\@.service \
                rpi4/etc/systemd/system/multi-user.target.wants/wpa_supplicant\@wlan0.service

Try out your SD card

  • Dismount your SD Card:
    sudo umount rpi4
  • Shutdown your PC:
    sudo shutdown -h now
  • Remove the Manjaro Live USB-Stick from your PC
  • Boot your PI using your new SD card
  • Reboot your Windows PC and access your PI from a Windows Powershell (or CMD) window:
    ssh your-pi-username@your-pi-hostname

where 'your-pi-username' and 'your-pi-hostname' are the values you defined in manjaro-arm-installer

Some info on using SSH on windows:

5 Likes

This topic was automatically closed after 90 days. New replies are no longer allowed.

Forum kindly sponsored by