raspberrypi-ui / piclone

Utility to back up Pi to an SD card reader
260 stars 62 forks source link

Extend number of partitions #19

Open procount opened 5 years ago

procount commented 5 years ago

Hi Simon,

Could you extend the number of partitions that are unmounted from the target drive before cloning? https://github.com/raspberrypi-ui/piclone/blob/fcfda4c3d9b8d4b3063540e9ce4aa67661341a13/src/piclone.c#L225

9 might be considered more than enough for an SD card with a single OS on it, but one that has NOOBS or PINN on it may have a lot more. NOOBS OS partitions start at 6, so any SD card that has 3 or more OSes on it (not uncommon) will fail as a target drive because partition numbers higher than 9 will not be unmounted, thus preventing it from being used as a target (it fails with "unable to create FAT partition" or similar).

I don't think extending this number will have any adverse effects, so why not start at 20 or 30? (NOOBS/PINN can theoretically have up to 63 partitions, but I would consider that excessive and require a HDD rather than an SD card).