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

Advanced users • Re: Image File Utilities

$
0
0
I am running Armbian 12 on an Orange Pi 3, with a 32GB SD card. I have the image-util files placed in a folder under root, and I am backing up to a folder than is an NFS mount to a NAS.

Image File Utilities is intended for use on a Raspberry Pi running Raspberry Pi OS.

I just did a quick-and-dirty test using 'Armbian_25.5.1_Rpi4b_bookworm_current_6.12.28_minimal.img' on a Raspberry PI 5 and all went well:

Code:

Image file to create? /mnt/test.imgInitial image file ROOT filesystem size (MB) [1208]?Added space for incremental updates after shrinking (MB) [0]?Create /mnt/test.img (y/n)? yStarting full backup (for incremental backups, run: ./image-backup /mnt/test.img)e2fsck 1.47.0 (5-Feb-2023)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary informationarmbi_root: 29472/128000 files (0.1% non-contiguous), 275025/511744 blocksresize2fs 1.47.0 (5-Feb-2023)Resizing the filesystem on /dev/loop0p2 to 409063 (4k) blocks.The filesystem on /dev/loop0p2 is now 409063 (4k) blocks long.resize2fs 1.47.0 (5-Feb-2023)Resizing the filesystem on /dev/loop0p2 to 407357 (4k) blocks.The filesystem on /dev/loop0p2 is now 407357 (4k) blocks long.resize2fs 1.47.0 (5-Feb-2023)Resizing the filesystem on /dev/loop0p2 to 407354 (4k) blocks.The filesystem on /dev/loop0p2 is now 407354 (4k) blocks long.e2fsck 1.47.0 (5-Feb-2023)Pass 1: Checking inodes, blocks, and sizesPass 2: Checking directory structurePass 3: Checking directory connectivityPass 4: Checking reference countsPass 5: Checking group summary informationarmbi_root: 29472/104000 files (0.2% non-contiguous), 273521/407354 blocks

I suggest you test on a fresh installation and see if it succeeds.
Most Armbian images have only 1 partition (Ext4 rootfs) so your script does not support that. Raspberries and UEFI PCs need to have a FAT for intermediate bootloader or bootmanager, so that works. U-Boot that is used for almost all other SoCs/SBC/embedded can read Ext4 (default included). Also Btrfs if you configure/compile yourself.
One can generate an Armbian image with 2 parttitions, so a bootFAT, Ext4 or Btrfs rootfs, but then still the U-Boot that is placed between partition table and 1st partition 'is forgotten', so a backup image created with your script will never boot. It would be easy to do some 'dd' writing the bootloader blob in theory, actually Armbian has a default script that can write it correctly for every brand SoC more or less.
What I did more than a decade ago when I was not aware that RPi could read FAT, was just dd all sectors from 0 to 2nd partition into a 'subimage', like backing up grub for BIOS PCs. The bootFAT was not that large those days. Writing that back to new SD-card and rsyncing or btrfs receive the rootfs from NAS-backup was then easy enough restore.
Bus as one can generate

Statistics: Posted by redvli — Fri Jun 27, 2025 5:55 am



Viewing all articles
Browse latest Browse all 8051

Trending Articles