Skip to content

Raspberry PI 4 Setup Instructions

Edward Zhu edited this page Feb 7, 2023 · 7 revisions

Raspberry PI 4 Setup Instructions

Last updated: 2/6/2023

What you need

  • A Raspberry PI 4
  • A MicroSD card with at least 64 GB of capacity
  • The Raspberry PI Imager, which can be downloaded here.

Flashing the SD card

  • Connect the SD card to your machine.
  • Run the Raspberry PI Imager with sudo
    sudo rpi-imager
    
  • Under Operating System, select Ubunutu Server 20.04.5 LTS (64-BIT). This will install a headless (no GUI) version of Ubuntu 20.04. NOTE: As new version of Ubuntun are released, this instruction may need to be updated.
  • Under Storage, select the SD card that you connected.
  • Click the gear icon for advanced settings.
  • Check Enable SSH and select Use password authentication.
  • Check Set username and password and set to:
    • Username: mpclab
    • Password: mpclab
  • Scroll to bottom and click SAVE.
  • Click Write.

Setting up the Raspberry PI

  • Insert the SD card into the slot on the Raspberry PI.
  • Connect the Raspberry PI to a display, keyboard, and power source.

WiFi Setup for Headless Installations

  • On the Raspberry PI, run the command ip addr show and make note of the MAC address next to link/ether for the wireless network interface wlan0. The MAC address is an 8 character string with every two characters separated by a colon.
  • Follow the instructions in the MPC Lab WiFi instructions document about whitelisting a device for connection to the lab WiFi network.
  • Navigate to /etc/netplan and open up the configuration file 50-cloud-init.yaml for editing, e.g.
    cd /etc/netplan
    vim 50-cloud-init.yaml
    
  • Edit the file so it looks as follows, where you should replace <IP> with a static IP address for the Raspberry PI. Make sure that it does not conflict with the IP addresses of any existing devices on the network.
    network:
        version: 2
        wifis:
            renderer: networkd
            wlan0:
                access-points:
                    MPC_LAB_5G:
                        password: self.barc_h0me
                dhcp4: true
                optional: true
                addresses: [<IP>/24]
                gateway4: 192.168.50.1
    
  • Apply the settings using sudo netplan apply
  • Check that you have connected to the network by running a command like sudo apt update
Clone this wiki locally