t2linux / T2-Debian-and-Ubuntu-Kernel

Ubuntu Kernel for T2 Macs.
128 stars 14 forks source link

Failed to verify checksum - update_t2_kernel #91

Closed jaadth closed 2 weeks ago

jaadth commented 3 weeks ago

Got an error with the update_t2_kernel script. Upgrading to v6.9.5-1. The variable latestk is missing the "-1" portion so that the sha check fails.

a) linux-headers-6.9.5-t2-mantic_6.9.5-1_amd64.deb b) linux-headers-6.9.5-1-t2-mantic_6.9.5-1_amd64.deb

actual_headers_chksum=$(cat ./sha | grep linux-headers-${latestk}_${latestkver}_amd64.deb | cut -d " " -f 1) actual_headers_chksum=$(cat ./sha | grep linux-headers-6.9.5-t2-mantic_6.9.5-1_amd64.deb | cut -d " " -f 1)

when

$ cat ./sha
5ddff90dcea107a02e8a3b288a16479999a75a0b871420a6757ec1872bce9348  ../linux-headers-6.9.5-1-t2-mantic_6.9.5-1_amd64.deb
81823325b3f5e7937fcc95b3abdb894c7bc834f0ae08bb7ef2c39a521ae4292a  ../linux-image-6.9.5-1-t2-mantic_6.9.5-1_amd64.deb
a2a6c3b5bd9b9369af69860f3017fa48acd4be58c528e0a71057997660a7a445  ../linux-libc-dev_6.9.5-1_amd64.deb

I don't know all the "could be" values of $latest for this logic, but this fixes it. Maybe breaks some other situation.

if [[ (${#latest} = 6) || (${#latest} = 7) ]]
then
pkgrel=$(echo $latest | cut -d "-" -f 2)
latestkver=$(echo $latest | cut -d "v" -f 2 | cut -d "-" -f 1 | awk '{print $1".0"}')-${pkgrel}
latestk=$(echo $latest | cut -c 2- | cut -d "-" -f 1 | awk '{print $1".0-t2"}')-${EFFECTIVE_CODENAME}
else
latestkver=$(echo $latest | cut -d "v" -f 2)
# XXX: ERROR HERE: latestk=$(echo $latest | cut -c 2- | cut -d "-" -f 1 | awk '{print $1"-t2"}')-${EFFECTIVE_CODENAME}
latestk=$(echo $latest | cut -c 2- | awk '{print $1"-t2"}')-${EFFECTIVE_CODENAME}
fi

I know there's new instructions to use apt to do these installs, I just prefer to do manually as I have to install another driver after each upgrade.

Also, just in case...

$ apt list --installed | grep t2-kernel-script

t2-kernel-script/now 7.8 amd64 [installed,local]

Thanks for all your efforts in this project, much appreciated!!!

AdityaGarg8 commented 3 weeks ago

t2-kernel-script is obselete.

Now the kernels are hosted on the apt repo.

https://github.com/t2linux/T2-Debian-and-Ubuntu-Kernel?tab=readme-ov-file#using-the-apt-repo

AdityaGarg8 commented 3 weeks ago

Remove t2-kernel-script by running sudo apt purge t2-kernel-script and install linux-t2 by running sudo apt install linux-t2. Instructions to add the apt repo which hosts the kernels has been given in the link I sent in the previous message.

AdityaGarg8 commented 2 weeks ago

Considering it as resolved due to lack of replies. Please reopen if still doesn't work.