billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.48k stars 327 forks source link

Recent RPi OS version aren't correctly detected #151

Open martignoni opened 1 year ago

martignoni commented 1 year ago

Logic to detect RPi OS version has changed and should be taken in account. Notably

cat /etc/os-release | grep PRETTY

doesn't return "Raspbian" string any more.

framps commented 1 year ago

Added a fix on my branch

martignoni commented 1 year ago

See https://github.com/billw2/rpi-clone/pull/152 (more generic fix IMHO).

J-Luc16 commented 1 year ago

I am surprised, this is what is returned by a raspbian Bullseye :

cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye

RPI_CLONE never stopped working for me, also with the bullseye.

martignoni commented 1 year ago

This seems to be a 32bit version (what date?)

We have to take in account 64bit of RPiOS version too. The detection logic should work for both 32bit and 64bit version.

J-Luc16 commented 1 year ago

Built very recently (january). I understand your concern about the 32/64 bits, I am not skilled enough to give my advice. FYI it's the latest kernel (6.1), I don't know if it matters in the answer to os-release. Thanks for all.