I'd thought of that but it leads to so many questions.What happens if you make an extra FAT partition on the SD card for the SBC that doesn't need it?A very useful backup & recovery tool indeed. I use it on all my Pis. I wonder though if it's intended to be strictly a Pi utility? I have a number of SBC where the bootloader is in flash and where the root folder is on a device with a single ext4 partition. Would be nice if it could skip the processing of a missing FAT partition.
Note that uboot uses sectors at the beginning of the card not included in any partition. If this is where the boot loader and device tree are stored, those also need to be saved in order to recreate a bootable system later.
- Does the FAT partition need to be the first in the MBR?
- Does the utility only copy the MBR, or does it copy everything below the lowest partition, which would not necessarily the first?
You could of course keep it simple by creating the partitions such that the dummy FAT partition is first, and I suspect that UBOOT would still find the ext4 partition without it being the first. But that's not how the systems are presently formatted and it would be easier to make room at the top and create the FAT partition there as a 2nd partition. I'm not sure how hard it is to move an ext4 partition from the command line?
In any case, I've learned a ton of bash script tricks looking at this backup script.
Statistics: Posted by lurk101 — Tue Apr 30, 2024 1:31 am