seamusdemora / RonR-RPi-image-utils

tools to create & update a backup of a running RPiOS system to a raw image file
276 stars 58 forks source link

Error Messages on Bookworm #4

Closed baumaeschi closed 11 months ago

baumaeschi commented 1 year ago

Hi I'm trying to use image file utils on Raspberry Pi 3B+ with bookworm. The image file is created, but image-backup ends with "Unable to create backup". But anyhow, the image file is created and can also be mounted (see attached Raspberry CLI output)

Could you have a look at the following output? Do you have an idea what the reason for the error messages could be and how they could be avoided?

pi@raspberrypi:~ $ sudo image-backup

Image file to create? /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img

Initial image file ROOT filesystem size (MB) [3057]? 

Added space for incremental updates after shrinking (MB) [0]? 

Create /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img (y/n)? y

Starting full backup (for incremental backups, run: /usr/local/sbin/image-backup /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img)
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.
rsync: [generator] symlink "/tmp/img-backup-mnt/boot/cmdline.txt" -> "firmware/cmdline.txt" failed: Operation not permitted (1)
rsync: [generator] symlink "/tmp/img-backup-mnt/boot/config.txt" -> "firmware/config.txt" failed: Operation not permitted (1)
rsync: [generator] symlink "/tmp/img-backup-mnt/boot/overlays" -> "firmware/overlays" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]

Unable to create backup

pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ sudo image-check /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img

Check /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img (y/n)? y

e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop0p2: 78031/195840 files (0.1% non-contiguous), 639638/782336 blocks

tune2fs 1.47.0 (5-Feb-2023)
Filesystem volume name:   <none>
Last mounted on:          /tmp/img-backup-mnt
Filesystem UUID:          0b2fcd94-8a65-440b-9345-d42771eca555
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         unsigned_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              195840
Block count:              782336
Reserved block count:     39116
Overhead clusters:        30970
Free blocks:              142698
Free inodes:              117809
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      381
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8160
Inode blocks per group:   510
Flex block group size:    16
Filesystem created:       Mon Oct 23 12:11:42 2023
Last mount time:          Mon Oct 23 12:11:45 2023
Last write time:          Mon Oct 23 12:15:31 2023
Mount count:              0
Maximum mount count:      -1
Last checked:             Mon Oct 23 12:15:31 2023
Check interval:           0 (<none>)
Lifetime writes:          2524 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      0fa92eb3-b05b-48f6-93ac-49f07fd27c90
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x58f436b6

pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ sudo image-mount /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img /mnt/PiSD

Mount /mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img on /mnt/PiSD (y/n)? y

e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop0p2: 78031/195840 files (0.1% non-contiguous), 639638/782336 blocks
mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.

/mnt/SamsungT7/Raspberry/Bookworm_2023_10_23.img mounted on /mnt/PiSD

When done, run:
umount /mnt/PiSD
losetup -d /dev/loop0

pi@raspberrypi:~ $ 
daishi4u commented 1 year ago

I'm getting the same error.

franzos commented 1 year ago

Do you have an idea what the reason for the error messages could be and how they could be avoided?

It seems the message shows if any commands have an error (rsync) ref

if [[ $? -ne 0 && $? -ne 24 ]]; then
    errexit "Unable to create backup"
  fi

Ran into the same issue.


EDIT: Worked with this again today; Seems like the files related to the error, do not exist:

ls /tmp/img-backup-mnt/boot/
bcm2710-rpi-2-b.dtb       bcm2711-rpi-cm4.dtb         firmware
bcm2710-rpi-3-b.dtb       bcm2711-rpi-cm4-io.dtb      initrd.img-6.1.0-rpi4-rpi-2712
bcm2710-rpi-3-b-plus.dtb  bcm2711-rpi-cm4s.dtb        initrd.img-6.1.0-rpi4-rpi-v8
bcm2710-rpi-cm3.dtb       config-6.1.0-rpi4-rpi-2712  kernel8.img
bcm2710-rpi-zero-2.dtb    config-6.1.0-rpi4-rpi-v8    System.map-6.1.0-rpi4-rpi-2712
bcm2710-rpi-zero-2-w.dtb  config_bk.txt               System.map-6.1.0-rpi4-rpi-v8
bcm2711-rpi-400.dtb       config.txt                  vmlinuz-6.1.0-rpi4-rpi-2712
bcm2711-rpi-4-b.dtb       COPYING.linux               vmlinuz-6.1.0-rpi4-rpi-v8

No cmdline.txt, no overlays.

hockeygoalie35 commented 11 months ago

These Errors don't happen on the zip file from the R-pi forums post. The git needs to be updated to reflect the changes.

hockeygoalie35 commented 11 months ago

@franzos No Problem! Yes these gits are maintained by other people, not Ron. Ron has stated he doesn't want people adding it to git, as he can only support his own version on the forum. I personally added the latest version to my personal git, just so I can easily have it copy to my pi. I can maintain it myself.

baumaeschi commented 11 months ago

@hockeygoalie35 and @franzos: Thank you so much for the hint and the link to the original post of Ron. I followed the instructions of Seamus/seamusdemora and found them helpful and comprehensible. But I think if one creates such a public git, he/she should update the files to the latest versions (as hockeygoalie35 does in his personal git). In the meantime, I tried the files from Ron's original post and everything works fine on bookworn. Thank you everybody for the clarifications.

seamusdemora commented 11 months ago

Yes, I got x-busy back in October, and the script I wrote to update this repo from the website wandered off and got lost in the weeds somehow. I think I've corrected the problem with the script, and this repo should now match the latest from the forum.

FWIW, and in case anyone is interested: The reason I've set this up is due to the fact that I was "banned for life" from the Raspberry Pi forum. Here's the post that did me in :)

hockeygoalie35 commented 11 months ago

Here's the post that did me in :)

"As you wish" 🔥

franzos commented 11 months ago

Yes, I got x-busy back in October, and the script I wrote to update this repo from the website wandered off and got lost in the weeds somehow. I think I've corrected the problem with the script, and this repo should now match the latest from the forum.

FWIW, and in case anyone is interested: The reason I've set this up is due to the fact that I was "banned for life" from the Raspberry Pi forum. Here's the post that did me in :)

Hm; I get why people prefer not to repeat things again and again and again but you kinda asked to be kicked, and the admin probably had a bad day, so not sure what to say ~ You got what you wished for.

seamusdemora commented 11 months ago

@franzos : Thanks for being so understanding.

seamusdemora commented 11 months ago

@franzos : Thanks for being so understanding.

seamusdemora commented 11 months ago

I guess we're done here.