geerlingguy / rpi-clone

A shell script to clone a booted disk on a Raspberry Pi.
https://rpi-clone.jeffgeerling.com/
BSD 3-Clause "New" or "Revised" License
172 stars 10 forks source link

Minor issue - e2label #7

Open bclaymiles opened 4 months ago

bclaymiles commented 4 months ago

I'm using f2fs on one of my pi's, and each time rpi-clone runs, it reports:

Editing /mnt/clone/etc/fstab PARTUUID to use ea0b56b4 e2label: Bad magic number in super-block while trying to open /dev/sda2

Which makes sense, since you can't add an extX label to an f2fs filesystem. I've tested the backups, they work fine, so this is a cosmetic error at worst.

bclaymiles commented 4 months ago

I should probably add - the script is invoked nightly as: /usr/local/sbin/rpi-clone -u -v sda So I'm not declaring that a label should be written. Likewise, the logic in the script appears to suggest that it should not be trying to write a label on a non ext filesystem, which is why this appears to be a bug. However, I'm not a coder, so my interpretation of what the script is doing may be faulty.

matthijskooijman commented 3 months ago

Seems the problem is that the code assumes the rootfs is ext. This is fixed as a side effect of my PR #16.