You are not logged in.

#1 2022-01-16 22:40:19

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 978

[Beryllium] bl-welcome pae check fails if kernel held.

If for some reason someone set the kernel on hold `sudo apt-mark hold linux-image-*` bl-welcome fails to detect a pae kernel & offers to install one.

This has the potential to be damaging, a held kernel is probably indicative that someone had issues after a kernel upgrade & reverted to the previous version.

On a two user system, or if the user thought "Oh, that must be why the last upgrade was b0rked!" they may accept the offer, which would reinstall the kernel they blocked & remove the hold. 

Yes I know it's a very unlikely situation.

It's unlikely enough I'd have not even mentioned it, except that it's also a trivial fix.

Current check that the installed kernel (or at least one of them, not necessarily the running one, a separate issue I don't much care about) is pae capable:

Somewhere in the first 10 lines of system-tweaks wrote:
dpkg -l | grep -Eq '^ *ii +linux-image-[^ ]*(amd64|pae) '

This  catches it, & spots a pae capable kernel is installed, even when it's held.

dpkg -l | grep -Eq '^ *(h|i)i +linux-image-[^ ]*(amd64|pae) '

Last edited by Bearded_Blunder (2022-01-17 01:56:33)


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#2 2022-01-17 03:14:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,971
Website

Re: [Beryllium] bl-welcome pae check fails if kernel held.

^Good catch, and an easy fix!
Thanks again.

EDIT
Change committed but I'm holding off on the package upgrade just in case anything else comes up that can be incorporated.

Last edited by johnraff (2022-01-17 04:32:36)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#3 2022-01-17 17:40:17

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,545

Re: [Beryllium] bl-welcome pae check fails if kernel held.

Wouldn't this happen mostly on 32 bit systems or if a 32 bit kernel is what's running on a 64 bit system?


Real Men Use Linux

Online

#4 2022-01-17 18:37:50

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 978

Re: [Beryllium] bl-welcome pae check fails if kernel held.

DeepDayze wrote:

Wouldn't this happen mostly on 32 bit systems or if a 32 bit kernel is what's running on a 64 bit system?

Well if you look at what it's checking for (pae) you might think so, however, if you look at the expression used to actually check, the check fails on both 32 and 64 bit if the kernel is held. Because it'll return pass for pae on both bitnesses it saves checking arch first. unfortunately it'll also fail for both if the kernel is held.  Before the change that is.

Of course anyone savvy enough to know they'd needed to hold their kernel and know how, ought to spot the script was talking bollox if it said they hadn't got pae on a 64 bit system.

However, if they let it, at that point the consequence of saying yes would be trying to install linux-image-686-pae on their 64 bit system.   Which *I think* would fail, should on pure 64 bit, not quite as sure if they've set up multi arch, but I'm not about to try either way.

johnraff wrote:

Change committed but I'm holding off on the package upgrade just in case anything else comes up that can be incorporated.

No rush, I don't think it's likely anyone will run foul of that between now & when you release the upgrade, it's been that way years & never arisen.

I've something that possibly could be in the works, oddly enough very near that location and in the same file, though I don't expect it to be quite as easy a decision as that one was when I fire it off.  It'll land in Development & Suggestions though, rather than Bug Reports when it does.  I'm still testing.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

Board footer

Powered by FluxBB