2019-07-19 01:22:46 +01:00
|
|
|
# Raspberry Pi image specs
|
2017-10-08 21:18:48 +01:00
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
This repository contains the files with which the images referenced at
|
|
|
|
https://wiki.debian.org/RaspberryPiImages have been built.
|
2017-10-08 21:18:48 +01:00
|
|
|
|
|
|
|
## Option 1: Downloading an image
|
|
|
|
|
2019-08-30 15:16:27 +01:00
|
|
|
See https://wiki.debian.org/RaspberryPiImages for where to obtain the
|
2019-07-19 01:22:46 +01:00
|
|
|
latest pre-built image.
|
2017-10-08 21:18:48 +01:00
|
|
|
|
|
|
|
## Option 2: Building your own image
|
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
If you prefer, you can build a Debian buster Raspberry Pi image
|
2018-07-18 23:57:39 +01:00
|
|
|
yourself. If you are reading this document online, you should first
|
|
|
|
clone this repository:
|
2017-10-08 21:18:48 +01:00
|
|
|
|
|
|
|
```shell
|
2019-07-19 01:22:46 +01:00
|
|
|
git clone --recursive https://salsa.debian.org/raspi-team/image-specs.git
|
|
|
|
cd image-specs
|
2017-10-25 09:55:04 +01:00
|
|
|
```
|
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
For this you will first need to install the `vmdb2` package, on a
|
|
|
|
Debian Buster or higher system.
|
|
|
|
|
2019-12-17 20:41:16 +00:00
|
|
|
This repository includes a master YAML recipe (which is basically a
|
|
|
|
configuration file) for all of the generated images, diverting as
|
|
|
|
little as possible in a parametrized way. The master recipe is
|
|
|
|
[raspi_master.yaml](raspi_master.yaml).
|
2019-07-19 01:22:46 +01:00
|
|
|
|
2019-12-17 20:41:16 +00:00
|
|
|
A Makefile is supplied to drive the build of the recipes into images —
|
|
|
|
`raspi_0w` (for the Raspberry Pi 0, 0w and 1, models A and B),
|
|
|
|
`raspi_2` (for the Raspberry Pi 2, models A and B) and `raspi_3`
|
|
|
|
(models A, B, B+). That is, if you want to build the default image for
|
|
|
|
a Raspberry Pi 3B+, you can just issue:
|
2019-07-19 01:22:46 +01:00
|
|
|
|
2019-12-17 20:41:16 +00:00
|
|
|
```shell
|
|
|
|
make raspi_3.img
|
|
|
|
```
|
|
|
|
|
|
|
|
You might also want to edit them to customize the built image. If you
|
|
|
|
want to start from the platform-specific recipe, you can issue:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
make raspi_3.yaml
|
|
|
|
```
|
|
|
|
The recipe drives [vmdb2](https://vmdb2.liw.fi/), the successor to
|
|
|
|
`vmdebootstrap`. Please refer to [its
|
|
|
|
documentation](https://vmdb2.liw.fi/documentation/) for further
|
|
|
|
details; it is quite an easy format to understand.
|
2019-07-19 01:22:46 +01:00
|
|
|
|
2019-12-17 20:41:16 +00:00
|
|
|
Copy the generated file to a name descriptive enough for you (say,
|
|
|
|
`my_raspi.yaml`). Once you have edited the recipe for your specific
|
|
|
|
needs, you can generate the image by issuing the following (as root):
|
2017-10-25 09:55:04 +01:00
|
|
|
|
|
|
|
```shell
|
2019-12-17 20:41:16 +00:00
|
|
|
vmdb2 --rootfs-tarball=my_raspi.tar.gz --output \
|
|
|
|
my_raspi.img my_raspi.yaml --log my_raspi.log
|
2017-10-08 21:18:48 +01:00
|
|
|
```
|
|
|
|
|
2019-12-17 20:41:16 +00:00
|
|
|
This is, just follow what is done by the `_build_img` target of the Makefile.
|
2019-07-19 01:22:46 +01:00
|
|
|
|
|
|
|
## Installing the image onto the Raspberry Pi
|
2017-10-08 21:18:48 +01:00
|
|
|
|
|
|
|
Plug an SD card which you would like to entirely overwrite into your SD card reader.
|
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
Assuming your SD card reader provides the device `/dev/mmcblk0`
|
2018-12-05 00:38:09 +00:00
|
|
|
(**Beware** If you choose the wrong device, you might overwrite
|
|
|
|
important parts of your system. Double check it's the correct
|
|
|
|
device!), copy the image onto the SD card:
|
2017-10-08 21:18:48 +01:00
|
|
|
|
|
|
|
```shell
|
2019-07-19 01:22:46 +01:00
|
|
|
sudo dd if=raspi3.img of=/dev/mmcblk0 bs=64k oflag=dsync status=progress
|
2017-10-08 21:18:48 +01:00
|
|
|
```
|
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
Then, plug the SD card into the Raspberry Pi, and power it up.
|
2017-10-08 21:18:48 +01:00
|
|
|
|
2019-07-19 01:22:46 +01:00
|
|
|
The image uses the hostname `rpi0w`, `rpi2` or `rpi3` depending on the
|
2019-12-17 20:41:16 +00:00
|
|
|
target build. The provided image will allow you to log in with the
|
|
|
|
`root` account with no password set, but only logging in at the
|
|
|
|
physical console (be it serial or by USB keyboard and HDMI monitor).
|