bkup_rpimage
bkup_rpimage copied to clipboard
routine for mounting compressed Images is missing/not working
it would be nice it mounting compressed images would be possible.
pi@rpi2:~ $ sudo ./bkup_rpimage.sh mount /usb-stick/backup/SD_Card_rpi2_2018-11-20.img.gz /mnt
Attaching /usb-stick/backup/SD_Card_rpi2_2018-11-20.img.gz to /dev/loop0
losetup: /usb-stick/backup/SD_Card_rpi2_2018-11-20.img.gz: Warning: file does not fit into a 512-byte sector; the end of the file will be ignored.
partx: /dev/loop0: failed to read partition table
Mounting /dev/loop0p1 and /dev/loop0p2 to /mnt
mount: special device /dev/loop0p2 does not exist
mount: special device /dev/loop0p1 does not exist
SD Image has been mounted and can be accessed at:
/mnt
pi@rpi2:~ $ ll /mnt
drwxr-xr-x 24 root root 4096 Nov 11 15:25 ..
drwxr-xr-x 2 root root 4096 Nov 20 17:14 boot
drwxr-xr-x 3 root root 4096 Nov 20 17:14 .
pi@rpi2:~ $ ll /mnt/boot/
drwxr-xr-x 3 root root 4096 Nov 20 17:14 ..
drwxr-xr-x 2 root root 4096 Nov 20 17:14 .
This need to umcompress/compress the compressed image on the fly. Not very likely that this will give an acceptable user experience on a rpi...
You may consider to use the -s option to create smaller images and compress them after the last backup to this image has been done.