Update to 22.04.3

Keith keithw at caramail.com
Fri Aug 11 21:40:06 UTC 2023


On 8/11/23 14:56, Jerry Geis wrote:
> 
> 
[snipped]

> 
>   apt list -q2 ~i"(~V6.2.0|~V5.19.0)"~n^linux |sed 's/\// [/' |cut -d"[" 
> -f1,3
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in 
> scripts.
> 
> linux-generic-hwe-22.04 [installed]
> linux-headers-6.2.0-26-generic [installed,automatic]
> linux-headers-generic-hwe-22.04 [installed,automatic]
> linux-hwe-6.2-headers-6.2.0-26 [installed,automatic]
> linux-image-5.19.0-46-generic [installed,automatic]
> linux-image-6.2.0-26-generic [installed,automatic]
> linux-image-generic-hwe-22.04 [installed,automatic]
> linux-modules-5.19.0-46-generic [installed,automatic]
> linux-modules-6.2.0-26-generic [installed,automatic]
> linux-modules-extra-5.19.0-46-generic [installed,automatic]
> linux-modules-extra-6.2.0-26-generic [installed,automatic]
> 

Hmm, missing
  linux-headers-5.19.0-46-generic
  linux-hwe-5.19-headers-5.19.0-46

> 
> This is what I did to update:
>                                  apt-get --yes                 update
>                                  apt-get --yes --with-new-pkgs upgrade
>                                  apt-get --yes --purge         autoremove
>                                  apt-get --yes                 autoclean

Well, as a matter of preference, I never use --yes with apt or apt-get 
simply because I want to review everything that apt is going to do 
before it does it. In fact, I usually include the "-s" option on any 
command action to simulate what apt is going to do without making any 
changes to the system.

The "--with-new-pkgs" isn't necessary in most cases. I'd leave it off 
unless you have a specific reason for including it.

Ok, I'd do a package database check first and then do a reinstall of the 
kerne package.
$ sudo apt-get check
$ sudo dpkg --audit
$ sudo dpkg --configure -a
$ sudo dpkg -V
The last one will take some time as it checks each installed package's 
file list (/var/lib/dpkg/info/*.list to see if the listed files exists 
on the system, and then checks their m5sums against the owning package's 
md5sum file also in the dpkg info directory. To expedite just checking 
the kernel packages in question, use this command:

$ apt list -q2 ~i~V6.2.0~n^linux |cut -d"/" -f1 |xargs sudo dpkg -V

??5?????? means md5sum mismatch
??5?????? c means md5sum mismatch on conffile
missing   obvious this what you'll be looking for mostly.

Assuming no other problems with package database, you can do a reinstall 
of the 6.2 kernel packages and a upgrade of the 5.19 kernel package.

(this should all be one line)
$ apt list -q2 ~i"(~V6.2.0|~V5.19.0)"~n^linux |cut -d"/" -f1 |xargs sudo 
apt -s upgrade --reinstall

Examine the output carefully. Nothing should be removed. The 6.2 
packages should be reinstalled and the 5.19 packages should be upgraded. 
The list of packages affected should be same as the first "apt list" 
command If anything different, DON'T REMOVE the "-s" option from the 
sudo apt command! and post results of the dry-run. Have you performed a 
back-up lately?

  If you'd rather just not mess with upgrading the 5.19 packages at the 
moment, then change ~i"(~V6.2.0|~V5.19.0)"~n^linux to ~i~V6.2.0~n^linux 
and only 6.2 packages will be affected.

Remove "-s" option and proceed if the dry-run results looks copacetic.

Have you performed a back-up lately?

-- 
Keith





More information about the ubuntu-users mailing list