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

Make cmdline.txt dir discovery regex more robust and use mount instead of /etc/fstab contents #22

Closed framps closed 2 months ago

framps commented 2 months ago

In https://github.com/geerlingguy/rpi-clone/issues/21 @matthijskooijman suggested to make the detection of /boot/firmware/cmdline.txt more robust.

Now the actual mount information is used to extract the information instead of the declarative contents of /etc/fstab.

geerlingguy commented 2 months ago

Confirmed at least on Bookworm on Pi 5 that it works fine, seems like a reasonable way to ensure it's not thrown off by weird circumstances where fstab doesn't align with reality.

matthijskooijman commented 2 months ago

LGTM!