I had check by unmounting /boot/firmware. On the root partition /boot/firmware is indeed empty.
Here is a normal rsync I ran using sudo rsync -aDH / /tmp/rsyncTmp
And this is from sudo image-backup -i /mnt/tstb.img
I grabbed that file list from /tmp/image-backup-mnt/boot while image-backup was running.
For whatever reason it's only present when either running image-backup or usb-boot.
I've spent the better part of today reading through your code and can't find a single thing which should cause the issue.
Ok, I just had a thought while typing this. I inserted a couple of read statements inside the backup function so I can capture exactly when this directory is placed inside /tmp/image-backup-mnt/boot.
It happens when mntimg is run.
This is what the mount loop looks like.
Is that what a normal loop looks like when image-backup runs?
This is the /tmp/image-backup-mnt/boot listing:
It immediately places that directory inside the boot folder.
I'm going to jump into the mntimg() code now, but i'm hoping if you might read this and say aha. LOL
Here is a normal rsync I ran using sudo rsync -aDH / /tmp/rsyncTmp
Code:
/tmp/rsyncTmp/boot $ ls -lattotal 51108drwxr-xr-x 23 root root 4096 Mar 14 13:43 ..drwxr-xr-x 3 root root 4096 Mar 11 04:20 .-rw-r--r-- 1 root root 17162901 Mar 6 11:02 initrd.img-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 17161143 Mar 6 11:02 initrd.img-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 8751247 Feb 29 01:50 vmlinuz-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 8753764 Feb 29 01:50 vmlinuz-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 83 Feb 29 01:50 System.map-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 83 Feb 29 01:50 System.map-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 230500 Feb 29 01:49 config-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 91 Feb 29 01:49 config.txt-rw-r--r-- 1 root root 230511 Feb 29 01:49 config-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 179 Feb 29 01:49 cmdline.txtlrwxrwxrwx 1 root root 18 Dec 4 21:04 issue.txt -> firmware/issue.txtlrwxrwxrwx 1 root root 17 Dec 4 20:37 overlays -> firmware/overlaysdrwxr-xr-x 3 root root 4096 Dec 31 1969 firmware
Code:
/tmp/img-backup-mnt/boot $ ls -lattotal 51112drwxr-xr-x 3 root root 4096 Mar 14 14:02 'firmware'$'\n'drwxr-xr-x 13 root root 4096 Mar 14 13:43 ..drwxr-xr-x 4 root root 4096 Mar 11 04:20 .-rw-r--r-- 1 root root 17162901 Mar 6 11:02 initrd.img-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 17161143 Mar 6 11:02 initrd.img-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 8751247 Feb 29 01:50 vmlinuz-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 8753764 Feb 29 01:50 vmlinuz-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 83 Feb 29 01:50 System.map-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 83 Feb 29 01:50 System.map-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 230500 Feb 29 01:49 config-6.1.0-rpi8-rpi-v8-rw-r--r-- 1 root root 91 Feb 29 01:49 config.txt-rw-r--r-- 1 root root 230511 Feb 29 01:49 config-6.1.0-rpi8-rpi-2712-rw-r--r-- 1 root root 179 Feb 29 01:49 cmdline.txtlrwxrwxrwx 1 root root 18 Dec 4 21:04 issue.txt -> firmware/issue.txtlrwxrwxrwx 1 root root 17 Dec 4 20:37 overlays -> firmware/overlaysdrwxr-xr-x 3 root root 4096 Dec 31 1969 firmware
For whatever reason it's only present when either running image-backup or usb-boot.
I've spent the better part of today reading through your code and can't find a single thing which should cause the issue.
Ok, I just had a thought while typing this. I inserted a couple of read statements inside the backup function so I can capture exactly when this directory is placed inside /tmp/image-backup-mnt/boot.
Code:
backup(){ echo "In Backup..." read mntimg echo "Mounted Img..." read sync echo "Synced..." read
This is what the mount loop looks like.
Code:
loop10 ├─loop10p1 vfat FAT32 boot 98E6-1910 255M 0% /tmp/img-backup-mnt/boot/firmware│ /boot/firmware└─loop10p2 ext4 1.0 rootfs 8bf74842-57d4-40d3-814c-bae6599232a0 236.3G 0% /tmp/img-backup-mnt
This is the /tmp/image-backup-mnt/boot listing:
Code:
/tmp/img-backup-mnt/boot $ ls'firmware'$'\n'
I'm going to jump into the mntimg() code now, but i'm hoping if you might read this and say aha. LOL
Statistics: Posted by mdpaxton — Thu Mar 14, 2024 9:30 pm