Skip to content

Instantly share code, notes, and snippets.

@wongsyrone
Last active September 20, 2023 03:12
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wongsyrone/aca57ed19fa0f7afef172dbfea3c9cd2 to your computer and use it in GitHub Desktop.
upgrade Ubuntu mainline kernel
apt-get update && apt-get dist-upgrade -y
apt autoremove -y
rm linux*.deb
# removed due to libc6 unmet dependency
# curl -O https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15.67/amd64/linux-headers-5.15.67-051567-generic_5.15.67-051567.202209080732_amd64.deb
# removed due to libssl3 unmet dependency
# curl -O https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15.67/amd64/linux-headers-5.15.67-051567_5.15.67-051567.202209080732_all.deb
curl -O https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15.67/amd64/linux-image-unsigned-5.15.67-051567-generic_5.15.67-051567.202209080732_amd64.deb
curl -O https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.15.67/amd64/linux-modules-5.15.67-051567-generic_5.15.67-051567.202209080732_amd64.deb
dpkg -i linux*5.15.67-051567*.deb
sed -ir "s/GRUB_DEFAULT=.*/GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux 5.15.67-051567-generic\"/g" /etc/default/grub
apt-get purge linux-headers-5.15.0-051500rc7 linux-modules-5.15.0-051500rc7 linux-image-unsigned-5.15.0-051500rc7-generic
update-grub
reboot
apt-get purge linux-headers-4.15.0-48 linux-modules-extra-4.15.0-48-generic linux-image-4.15.0-48-generic
install openssl 1.1
---
curl -O http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu5_amd64.deb
dpkg -i libssl1.1_1.1.0g-2ubuntu5_amd64.deb
@wongsyrone
Copy link
Author

switched to https://xanmod.org/ due to bbrv3

@wongsyrone
Copy link
Author

check output before cleaning

echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | grep -v $(uname -r) | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-modules | awk '{ print $2 }' | grep -v $(uname -r) | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | grep -v $(uname -r) | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge && update-grub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment