billw2 / rpi-clone

A shell script to clone a booted disk.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recent RPi OS version aren't correctly detected

martignoni opened this issue · comments

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.

commented

Added a fix on my branch

See #152 (more generic fix IMHO).

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.

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.

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.