Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1665  / 2 Years ago, tue, july 5, 2022, 3:31:13

How can I switch the Linux kernel package from the System76 repository to using standard Ubuntu repository? My computer has the System76 repository PPA added in addition to the standard Ubuntu 20.04 repositories. Here is a partial output of the apt-cache policy command:


 101 http://ppa.launchpad.net/system76-dev/stable/ubuntu focal/main amd64 Packages
release v=20.04,o=LP-PPA-system76-dev-stable,a=focal,n=focal,l=System76 Stable PPA,c=main,b=amd64

I changed the priority of this PPA from 1000 to 101 to lower it below the standard Ubuntu repository of 500. My computer still has the Linux kernel installed from the System76 repository. Here is a uname -a output:


Linux laptop 5.8.0-7625-generic #26~1604441536~20.04~a2b1f25~dev-Ubuntu SMP Wed Nov 4 01:19:56 U x86_64 x86_64 x86_64 GNU/Linux

How can I revert to the standard Ubuntu Linux kernel and not have the System76 one try to upgrade over it?


Clarification: I'm not running PopOS. The System76 repository has installed a 5.8 Linux kernel and I'd like to safely switch to the Ubuntu 20.04 standard 5.4 Linux kernel. I think I might need some firmware or device drivers from the System76 repository, so I think I need to keep it enabled.


More From » kernel

 Answers
0

Be warned even with apt pinning it could turn your package management/system into chaos. No warranty from me.
For security install ppa-purge first. If something goes bad you can try revert/delete packages with


sudo ppa-purge system76-dev/stable 

another way for be prepared is


/etc/apt/preferences.d/focal.pref 
Package: *
Pin: release n=focal

Pin-Priority: 1001

for this in


/etc/apt/sources.list.d/system76-dev-ubuntu-stable-focal.list

the entries has to be comment out.


sudo apt full-upgrade 
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
python3-distupgrade ubuntu-release-upgrader-core ubuntu-release-upgrader-qt
The following packages will be DOWNGRADED:
accountsservice libaccountsservice0 linux-firmware linux-generic linux-headers-generic linux-image-generic linux-libc-dev ubuntu-drivers-common
virtualbox virtualbox-dkms virtualbox-qt
3 upgraded, 0 newly installed, 11 downgraded, 0 to remove and 0 not upgraded.
Need to get 43,9 MB/145 MB of archives.
After this operation, 50,5 MB disk space will be freed.

Pinning for kernel


/etc/apt/preferences.d/kernel.pref 
# Kernel pinnen

Package: linux-generic
Pin: origin security.ubuntu.com
Pin-Priority:1001

Package: linux-generic
Pin: origin archive.ubuntu.com
Pin-Priority: 1001

Package: linux-image-generic
Pin: origin security.ubuntu.com
Pin-Priority:1001

Package: linux-image-generic
Pin: origin archive.ubuntu.com
Pin-Priority:1001


Package: linux-headers-generic
Pin: origin archive.ubuntu.com
Pin-Priority: 1001

Package: linux-headers-generic
Pin: origin security.ubuntu.com
Pin-Priority: 1001


Package: *
Pin: origin ppa.launchpad.net
Pin-Priority: 300

Packages for kernel from origin archive.ubuntu.com/security.ubuntu.com are preffered (1001)


sudo apt full-upgrade 
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be DOWNGRADED:
linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 3 downgraded, 0 to remove and 0 not upgraded.
Need to get 0 B/7.028 B of archives.
After this operation, 630 kB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg: warning: downgrading linux-generic from 5.8.0.7630.32~1605108853~20.04~8bcf10e~dev to 5.4.0.54.57
(Reading database ... 291830 files and directories currently installed.)
Preparing to unpack .../linux-generic_5.4.0.54.57_amd64.deb ...
Unpacking linux-generic (5.4.0.54.57) over (5.8.0.7630.32~1605108853~20.04~8bcf10e~dev) ...
dpkg: warning: downgrading linux-image-generic from 5.8.0.7630.32~1605108853~20.04~8bcf10e~dev to 5.4.0.54.57
Preparing to unpack .../linux-image-generic_5.4.0.54.57_amd64.deb ...
Unpacking linux-image-generic (5.4.0.54.57) over (5.8.0.7630.32~1605108853~20.04~8bcf10e~dev) ...
dpkg: warning: downgrading linux-headers-generic from 5.8.0.7630.32~1605108853~20.04~8bcf10e~dev to 5.4.0.54.57
Preparing to unpack .../linux-headers-generic_5.4.0.54.57_amd64.deb ...
Unpacking linux-headers-generic (5.4.0.54.57) over (5.8.0.7630.32~1605108853~20.04~8bcf10e~dev) ...
Setting up linux-image-generic (5.4.0.54.57) ...
Setting up linux-headers-generic (5.4.0.54.57) ...
Setting up linux-generic (5.4.0.54.57) ...

you get for all other packages from your ppa updates for installt packages.


Note remaining kernel/headermodules packages from ppa you have to purge on your own.


You can do it on your own risk. Really. Be warned


Better is to remove the ppa with ppa-purge. Remove all apt pinning files.


Reactivate the ppa again.
then create


/etc/apt/preferences.d/system76.pref 
# pinning für system-dev
Package: *
Pin: release o=LP-PPA-system76-dev-stable,a=focal
Pin-Priority: 300

If you need a particular package from ppa you can install it like this.


apt-get -s install -t focal linux-firmware
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
linux-firmware
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Inst linux-firmware [1.187.4] (1.190.1+system76~1605123765~20.04~3894207~dev System76 Stable PPA:20.04/focal [all])
Conf linux-firmware (1.190.1+system76~1605123765~20.04~3894207~dev System76 Stable PPA:20.04/focal [all])

Another example


apt-get -s install -t focal accountsservice
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaccountsservice0
Suggested packages:
gnome-control-center
The following packages will be upgraded:
accountsservice libaccountsservice0
2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Inst accountsservice [0.6.55-0ubuntu12~20.04.4] (0.6.55-0ubuntu13.2pop0~1605745773~20.04~d9482b1~dev System76 Stable PPA:20.04/focal [amd64]) []
Inst libaccountsservice0 [0.6.55-0ubuntu12~20.04.4] (0.6.55-0ubuntu13.2pop0~1605745773~20.04~d9482b1~dev System76 Stable PPA:20.04/focal [amd64])
Conf accountsservice (0.6.55-0ubuntu13.2pop0~1605745773~20.04~d9482b1~dev System76 Stable PPA:20.04/focal [amd64])
Conf libaccountsservice0 (0.6.55-0ubuntu13.2pop0~1605745773~20.04~d9482b1~dev System76 Stable PPA:20.04/focal [amd64])

[#2361] Thursday, July 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calcur

Total Points: 189
Total Questions: 80
Total Answers: 95

Location: Burkina Faso
Member since Thu, Dec 15, 2022
1 Year ago
calcur questions
;