How to setup a new Rasperry Pi

14 Feb 2020 » linux, raspberry

Goal of this post is to sum up the the steps to end up with a USB booted Raspberry Pi on Fedora - all prepared on Mac OS.

Prepare SD card

curl -L -o
sudo diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=raspbian-lite.img of=/dev/rdisk2 conv=syn

Prepare USB pendrive with Fedora

Format USB pendrive then:

cd /tmp
curl -o Fedora-Minimal-31-1.9.aarch64.raw.xz
unxz Fedora-Minimal-31-1.9.aarch64.raw.xz
sudo diskutil unmountDisk /dev/disk2
sudo dd bs=1m if=Fedora-Minimal-31-1.9.aarch64.raw of=/dev/rdisk2 conv=syn

First boot on Raspbian SD card

echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
sudo reboot

Then check you get 17:3020000a output by the following command:

vcgencmd otp_dump | grep 17:

USB boot

You now can plug the USB pendrive and remove the SD card, then reboot and proceed with Fedora install.

Resize disk

Once you’re done, do not forget to expand root partition on USB pendrive:

sudo su
growpart /dev/sda 3
resize2fs /dev/sda3