Skip to content
Snippets Groups Projects
Commit 1899b49f authored by Charles JAVERLIAT's avatar Charles JAVERLIAT
Browse files

Instructions to create compressed img

Closes #5
parent 77550a70
No related branches found
No related tags found
No related merge requests found
......@@ -474,6 +474,24 @@ sudo systemctl start pio-remote.service
sudo systemctl status pio-remote.service
```
## Create an image of the system
It is a good idea to create an image of your system to flash it back on a fresh SD card if needed. In fact, corruption of cards can happen, so it is recommended to keep an image ready to be transferred to economize some time.
On a Linux system, plug the SD card and run the following command to create a raw copy:
```sh
sudo dd bs=4M if=/dev/mmcblk0 of=~/Documents/raspios-armhf.img conv=fsync
```
With `/dev/mmcblk0` the name of the SD card. Feel free to change the name of the image.
By default, dd will make a bit-by-bit image of the SD card, even if a major part is filled with zeroes. To reduce the image size, we can use [PiShrink](https://github.com/Drewsif/PiShrink) to reduce its size:
```sh
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
# Install the scripts in the list of binaries to run it directly from cmd-line
sudo mv pishrink.sh /usr/local/bin
sudo pishrink.sh -az ~/Documents/raspios-armhf.img
```
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment