Document the usage of bmap files

This commit is contained in:
Gunnar Wolf 2021-08-02 12:17:25 -05:00
parent 6cc7bc3666
commit cef8519ab7
1 changed files with 23 additions and 12 deletions

View File

@ -20,27 +20,25 @@ cd image-specs
``` ```
For this you will first need to install the following packages on a For this you will first need to install the following packages on a
Debian Buster (10) or higher system: Debian Bullseye (11) or higher system:
* vmdb2 (>= 0.17)
* dosfstools
* binfmt-support * binfmt-support
* bmap-tools
* debootstrap
* dosfstools
* fakemachine (optional, only available on amd64)
* kpartx
* qemu-utils * qemu-utils
* qemu-user-static * qemu-user-static
* debootstrap
* time * time
* kpartx * vmdb2 (>= 0.17)
* fakemachine (optional, only available on amd64)
To install these (as root): To install these (as root):
```shell ```shell
apt install -y vmdb2 dosfstools qemu-utils qemu-user-static debootstrap binfmt-support time kpartx apt install -y vmdb2 dosfstools qemu-utils qemu-user-static debootstrap binfmt-support time kpartx bmap-tools
apt install -y fakemachine apt install -y fakemachine
``` ```
Do note that at least currently vmdb2 uses some syntax that is available
only in the version in testing (Bullseye).
If debootstrap still fails with exec format error, try If debootstrap still fails with exec format error, try
running `dpkg-reconfigure qemu-user-static`. This calls running `dpkg-reconfigure qemu-user-static`. This calls
`/var/lib/dpkg/info/qemu-user-static.postinst` which uses binfmt-support `/var/lib/dpkg/info/qemu-user-static.postinst` which uses binfmt-support
@ -65,7 +63,7 @@ or `bullseye` and <result-type\> is `img` or `yaml`.
Model `1` should be used for the Raspberry Pi 0, 0w and 1, models A and Model `1` should be used for the Raspberry Pi 0, 0w and 1, models A and
B. Model `2` for the Raspberry Pi 2 models A and B. Model `3` for all B. Model `2` for the Raspberry Pi 2 models A and B. Model `3` for all
models of the Raspberry Pi 3 and model `4` for all models of the models of the Raspberry Pi 3 and model `4` for all models of the
Raspberry Pi 4. Raspberry Pi 4.
So if you want to build the default image for a Raspberry Pi 3B+ with So if you want to build the default image for a Raspberry Pi 3B+ with
Bullseye, you can just issue: Bullseye, you can just issue:
@ -110,7 +108,20 @@ important parts of your system. Double check it's the correct
device!), copy the image onto the SD card: device!), copy the image onto the SD card:
```shell ```shell
sudo dd if=raspi_3.img of=/dev/mmcblk0 bs=64k oflag=dsync status=progress bmaptool copy raspi_3_bullseye.img.xz /dev/mmcblk0
```
Alternatively, if you don't have `bmap-tools` installed, you can use
`dd` with the compressed image:
```shell
xzcat raspi_3_bullseye.img | dd of=/dev/mmcblk0 bs=64k oflag=dsync status=progress
```
Or with the uncompressed image:
```shell
dd if=raspi_3_bullseye.img of=/dev/mmcblk0 bs=64k oflag=dsync status=progress
``` ```
Then, plug the SD card into the Raspberry Pi, and power it up. Then, plug the SD card into the Raspberry Pi, and power it up.