Post

Create SD card for Raspberry Pi

Create SD card for Raspberry Pi — practical walkthrough with examples.

First, use lsblk to identify the correct block device for your SD card. Then pipe the unzipped Raspberry Pi OS image directly to dd to write it to the card. Make sure you select the right device to avoid overwriting your system drive.

1
2
3
4
5
6
7
8
9
10
11
12
lsblk -p
NAME                      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
/dev/mmcblk0              179:0    0  14.5G  0 disk
/dev/nvme0n1              259:0    0 476.9G  0 disk
├─/dev/nvme0n1p1          259:1    0   360M  0 part  /boot/efi
├─/dev/nvme0n1p2          259:2    0 237.8G  0 part
├─/dev/nvme0n1p3          259:3    0 237.8G  0 part
│ └─/dev/mapper/archlinux 254:0    0 237.8G  0 crypt /
└─/dev/nvme0n1p6          259:4    0     1G  0 part  /boot


unzip -p ~/Downloads/2020-05-27-raspios-buster-full-armhf.zip | sudo dd of=/dev/mmcblk0 bs=4M conv=fsync
This post is licensed under CC BY 4.0 by the author.