-
Notifications
You must be signed in to change notification settings - Fork 27
optimizing "Desktop" and "Pi OS with desktop and recommended software" images
Tom Hodder edited this page Oct 30, 2021
·
3 revisions
These source images are very large, and by default creating restore images of these will result in very large sizes. The restore image contains one copy of the root partition as rootfs, once copy as restorefs, and that also contains a zipped copy of rootfs. so usually about 3 times the original size.
To work around this, the tool supports providing an alternative source for the recovery partition (referred to as a SLIM image). I recommend using the lite image that corresponds to the desktop/full image.
- download and unzip both the desktop image and the lite image;
$ ls -la
2021-01-11-raspios-buster-armhf-lite.zip
2021-01-11-raspios-buster-armhf.zip
- unzip both files
$ unzip 2021-01-11-raspios-buster-armhf-lite.zip
$ unzip 2021-01-11-raspios-buster-armhf.zip
- Execute the script which modifies the image, but provide the
-l
option
$ sudo ./create-factory-reset -a -s \
-i 2021-01-11-raspios-buster-armhf.img \
-l 2021-01-11-raspios-buster-armhf-lite.img
- This will produce a new image with
restore
suffix;
2021-01-11-raspios-buster-armhf.restore.img
That image should be much smaller than if the restore image was based on the full fat desktop image.
- you can flash this to the rPi
sudo dd if=2021-01-11-raspios-buster-armhf.restore.img of=/dev/sdX bs=4M conv=fsync