Loading Raspberry Pi OS to an SD card
Load RPi OS to an SD card¶
From Linux¶
1. Load the OS¶
Download the Raspberry Pi OS from here.
Raspberry Pi OS Lite Release date: May 3rd 2023 System: 64-bit Kernel version: 6.1 Debian version: 11 (bullseye) Size: 308MB
Load it on the SD with dd
:
xz -dc 2023-05-03-raspios-bullseye-arm64-lite.img.xz | sudo dd of=/dev/sdb status=progress bs=4M conv=fsync
2. Configure the OS boot¶
On the bootfs
partition add a ssh
file and userconf
file:
# Run from SD on the "bootfs" partition.
touch ssh
paste <(echo "pi:") <(openssl passwd -6 'raspberry') -d "" > userconf
Warning
The following method for wifi connection setup is no longer supported according to the docs (2023-11-02): "Previous versions of Raspberry Pi OS made use of a wpa_supplicant.conf file which could be placed into the boot folder to configure wireless network settings. This is no longer possible from Raspberry Pi OS Bookworm onwards." "To configure wireless network access at first boot in a headless Raspberry Pi, use the advanced settings menu in Raspberry Pi Imager." Instead use the Raspberry Pi Imager software, as explained here. You can also check for an answer here: https://raspberrypi.stackexchange.com/q/144850/51575
Create a wpa_supplicant.conf
file in the same folder with these contents (details here):
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=<Insert 2 letter ISO 3166-1 country code here>
update_config=1
network={
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
}
Info
Note that only 2.4GHz networks work for the Raspberry Pi 3 (5GHz networks do not work).
From Windows¶
1. Install Ubuntu Server 64 bits 20.04 LTS¶
Note
You will need a micro-sd memory with space greater than 8 gb.
Install Raspberry Pi OS using Raspberry Pi Imager
Once you have the imager:
- Choose OS → Other general-pusrpose OS → Ubuntu → Ubuntu Server 20.04 LTS
- Insert the sd in your computer
- Choose storage (detect your sd automatically)
- In the configuration option:
- Enable SSH
- Enable set host name
- Set username and password. (typically: pi, raspberry)
- Enable configure wireless LAN
- Enable set local settings
- Save and write
- Safely unmount and eject the micro SD card. Then insert it into the Raspberry Pi, and plug it to the power supply.
Connect to the Raspberry¶
The easiest way to connect to the Pi is to use a spare display and keyboard. Once you plug it in and it boots, you'll be asked to input the user (e.g. pi
) and the password (e.g. raspberry
).
If you configured your Pi's networking details correctly in the previous steps, you can try to connect to the Pi through the network (i.e. headlessly) by following these instructions.
After doing so, continue with the software setup guide.