Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5044

Advanced users • Re: Image File Utilities

$
0
0
Just noticed something with my backups of Ubuntu 24.04. The Bootfs mounting for /boot/firmware is unmounted during backup and not mounted afterwards. The weird thing is it doesn't do it every time. Not sure how to proceed to figure out why and how to prevent/fix it from happening. If it's not caught before the next backup the system-boot partition in the image is empty.

Code:

admin@FileServer:~$ ls /boot/firmware/README                        bcm2711-rpi-400.dtb.bak        bootcode.bin.bak  fixup_db.dat.bak  start4db.elfbcm2710-rpi-2-b.dtb           bcm2711-rpi-cm4.dtb            cmdline.txt       fixup_x.dat       start4db.elf.bakbcm2710-rpi-2-b.dtb.bak       bcm2711-rpi-cm4.dtb.bak        config.txt        fixup_x.dat.bak   start4x.elfbcm2710-rpi-3-b-plus.dtb      bcm2711-rpi-cm4s.dtb           fixup.dat         hat_map.dtb       start4x.elf.bakbcm2710-rpi-3-b-plus.dtb.bak  bcm2711-rpi-cm4s.dtb.bak       fixup.dat.bak     hat_map.dtb.bak   start_cd.elfbcm2710-rpi-3-b.dtb           bcm2712-rpi-5-b.dtb            fixup4.dat        initrd.img        start_cd.elf.bakbcm2710-rpi-3-b.dtb.bak       bcm2712-rpi-5-b.dtb.bak        fixup4.dat.bak    initrd.img.bak    start_db.elfbcm2710-rpi-cm3.dtb           bcm2712-rpi-cm5-cm4io.dtb      fixup4cd.dat      meta-data         start_db.elf.bakbcm2710-rpi-cm3.dtb.bak       bcm2712-rpi-cm5-cm4io.dtb.bak  fixup4cd.dat.bak  network-config    start_x.elfbcm2710-rpi-zero-2-w.dtb      bcm2712-rpi-cm5-cm5io.dtb      fixup4db.dat      overlays          start_x.elf.bakbcm2710-rpi-zero-2-w.dtb.bak  bcm2712-rpi-cm5-cm5io.dtb.bak  fixup4db.dat.bak  start.elf         uboot_rpi_3.binbcm2710-rpi-zero-2.dtb        bcm2712d0-rpi-5-b.dtb          fixup4x.dat       start.elf.bak     uboot_rpi_4.binbcm2710-rpi-zero-2.dtb.bak    bcm2712d0-rpi-5-b.dtb.bak      fixup4x.dat.bak   start4.elf        uboot_rpi_arm64.binbcm2711-rpi-4-b.dtb           boot.scr                       fixup_cd.dat      start4.elf.bak    user-databcm2711-rpi-4-b.dtb.bak       boot.scr.bak                   fixup_cd.dat.bak  start4cd.elf      vmlinuzbcm2711-rpi-400.dtb           bootcode.bin                   fixup_db.dat      start4cd.elf.bak  vmlinuz.bakadmin@FileServer:~$admin@FileServer:~$ sudo image-backup /mnt/homeserver/FileServer-backup.img --options --exclude='/media/pibackups'[sudo] password for admin:admin@FileServer:~$admin@FileServer:~$ ls /boot/firmware/admin@FileServer:~$admin@FileServer:~$ sudo mount -aadmin@FileServer:~$admin@FileServer:~$ ls /boot/firmware/README                        bcm2711-rpi-400.dtb.bak        bootcode.bin.bak  fixup_db.dat.bak  start4db.elfbcm2710-rpi-2-b.dtb           bcm2711-rpi-cm4.dtb            cmdline.txt       fixup_x.dat       start4db.elf.bakbcm2710-rpi-2-b.dtb.bak       bcm2711-rpi-cm4.dtb.bak        config.txt        fixup_x.dat.bak   start4x.elfbcm2710-rpi-3-b-plus.dtb      bcm2711-rpi-cm4s.dtb           fixup.dat         hat_map.dtb       start4x.elf.bakbcm2710-rpi-3-b-plus.dtb.bak  bcm2711-rpi-cm4s.dtb.bak       fixup.dat.bak     hat_map.dtb.bak   start_cd.elfbcm2710-rpi-3-b.dtb           bcm2712-rpi-5-b.dtb            fixup4.dat        initrd.img        start_cd.elf.bakbcm2710-rpi-3-b.dtb.bak       bcm2712-rpi-5-b.dtb.bak        fixup4.dat.bak    initrd.img.bak    start_db.elfbcm2710-rpi-cm3.dtb           bcm2712-rpi-cm5-cm4io.dtb      fixup4cd.dat      meta-data         start_db.elf.bakbcm2710-rpi-cm3.dtb.bak       bcm2712-rpi-cm5-cm4io.dtb.bak  fixup4cd.dat.bak  network-config    start_x.elfbcm2710-rpi-zero-2-w.dtb      bcm2712-rpi-cm5-cm5io.dtb      fixup4db.dat      overlays          start_x.elf.bakbcm2710-rpi-zero-2-w.dtb.bak  bcm2712-rpi-cm5-cm5io.dtb.bak  fixup4db.dat.bak  start.elf         uboot_rpi_3.binbcm2710-rpi-zero-2.dtb        bcm2712d0-rpi-5-b.dtb          fixup4x.dat       start.elf.bak     uboot_rpi_4.binbcm2710-rpi-zero-2.dtb.bak    bcm2712d0-rpi-5-b.dtb.bak      fixup4x.dat.bak   start4.elf        uboot_rpi_arm64.binbcm2711-rpi-4-b.dtb           boot.scr                       fixup_cd.dat      start4.elf.bak    user-databcm2711-rpi-4-b.dtb.bak       boot.scr.bak                   fixup_cd.dat.bak  start4cd.elf      vmlinuzbcm2711-rpi-400.dtb           bootcode.bin                   fixup_db.dat      start4cd.elf.bak  vmlinuz.bakadmin@FileServer:~$
Not sure the of the cause, but found an old post from someone else having this issue. Ended up creating a bash script seems to work so far.

Code:

backup="/mnt/backup/LibreNMS-backup.img"firmware=$(ls /boot/firmware/| wc -l)#echo "Current file count" "$firmware"logger "Number of files in /boot/firmware/: " $firmwareif [[ $firmware == "0" ]]; then        #echo "Run mount -a"        mount -a        firmware=$(ls /boot/firmware/| wc -l)        logger "Number of files in /boot/firmware/ after mount: " $firmwarefilogger "image-backup $backup"              image-backup $backuplogger -- "Backup file: " `ls -l $backup`logger "Image backup of system complete"

Statistics: Posted by James734 — Wed Sep 11, 2024 8:38 pm



Viewing all articles
Browse latest Browse all 5044

Trending Articles