Closed ephestione closed 5 years ago
I can't agree :-)
Try RaspiBackup.sh mount <imgfile>
and one for <imgfile>/boot
Now umount <imgfile>/boot
finally: check the content <imgfile>/boot
and you will notice that it's is empty now.
root@raspberrypi(54)/home/pi/scripts_#./RaspiBackup.sh mount /mnt/USB64/BACKUPS/MyRaspi-191004_062515.img
Attaching /mnt/USB64/BACKUPS/MyRaspi-191004_062515.img to /dev/loop0
Mounting /dev/loop0p1 and /dev/loop0p2 to /mnt/MyRaspi-191004_062515.img/ SD Image has been mounted and can be accessed at: /mnt/MyRaspi-191004_062515.img/
root@raspberrypi(53)/home/pi/scripts_#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 5.9G 0 loop
├─loop0p1 259:0 0 246M 0 part /mnt/MyRaspi-191004_062515.img/boot
└─loop0p2 259:1 0 5.6G 0 part /mnt/MyRaspi-191004_062515.img
root@raspberrypi(53)/home/pi/scripts_#df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0p2 5729880 3808276 1610820 71% /mnt/MyRaspi-191004_062515.img
/dev/loop0p1 248012 40049 207964 17% /mnt/MyRaspi-191004_062515.img/boot
ls -l /mnt/MyRaspi-191004_062515.img/boot
total 39576
-rwxr-xr-x 1 root root 23946 Aug 21 20:59 bcm2708-rpi-b.dtb*
-rwxr-xr-x 1 root root 24205 Aug 21 20:59 bcm2708-rpi-b-plus.dtb*
...
umount /mnt/MyRaspi-191004_062515.img/boot
root@raspberrypi(53)/home/pi/scripts_#ll /mnt/MyRaspi-191004_062515.img/boot
total 0
And I forgot to mention the x
option of the rsync options...
Oh okay, I'm not fluent in rsync so I thought that either it was creating a duplicate, or it was copying the files twice. But alright ;)
Don't worry the files are not copied only the directory /boot and this is needed as mountpoint ;-)
Had this thought just now... shouldn't /boot be excluded by the rsync command on rootfs? Wouldn't it otherwise create a duplicate of the boot partition inside an unmounted target folder? Or otherwise... for reasons?