geckolinux / geckolinux-project

GeckoLinux bug tracker and documentation
https://geckolinux.github.io
208 stars 18 forks source link

How to clean old kernels out of Gecko???? #180

Closed esteelpaz closed 3 years ago

esteelpaz commented 3 years ago

@geckolinux

Been having some issues with grub stemming from how some other distros seem to set up grub, and in the process of discussing my multi-boot grub I provided the data from possibly the "grub-mkconfig" file. I scrolled through it, which is quite lengthy because I have 6 linux distros installed on my desktop, and in the gecko area it seemed like all of the kernels that have ever been are listed, whereas in main channel TW it's a more modest number . . . .

I mostly use "zypper dup -l" to maintain my Gecko system, it doesn't seem like SUSE has anything like "zypper autoremove" like the ubuntu flavors have . . . but still it seems like TW manages to keep it to three kernels, but Gecko seemed to be something like 10????

Is there a simple way to get the kernels down to current and two backups . . . something in Yast perhaps?? I didn't have to do anything in TW to keep it tidy, in comparison Gecko seems to have a trail of kernels going back as far as the eye can see . . . .

geckolinux commented 3 years ago

Hi there, you can configure the kernel retention policy in /etc/zypp/zypp.conf : multiversion.kernels = latest,latest-1,running Also make sure that the purge-kernels service is enabled.

To manually remove kernel versions, just uncheck the ones you don't want:

Screenshot_2020-12-28_21-14-21

esteelpaz commented 3 years ago

@geckolinux

Alrighty, thanks for posting that information . . . I checked the /etc/zypp/zypp.conf file and it did show a bunch of data that was commented out, but I did see

# Note: This entry is not evaluated by libzypp, but by the
##       purge-kernels service (via /sbin/purge-kernels).
##
## Default: Do not delete any kernels if multiversion = provides:multiversion(kernel) is set
multiversion.kernels = latest,latest-1,running

##
## Path to locks file. If not exist then is create.
## In this file is saved also UI locks.

Then I checked out Yast and mirrored what you are showing, and in the Versions tab for the installed 5.9xx kernel were listed approx. 16 versions going back to 5.5.9 . . . that had colors in the box next to their name. I tried to pick the lowest version in the list to snip it out, clicked "accept" and got an error message like Broadcom-wl-kmp-default requires kernel-5.5.9 followed by the usual three choices to "break" one of the two choices, or something else . . . .

So I exited out of it, perhaps all of these kernels have packages that are needed to run different stuff??? I'll have to run this same check in my main TW install and see what shows there, but in the "grub-mkconfig" listing they didn't show the large list that Gecko did . . . . It's not causing problems with running the GUI . . . just seems like there are something like 16 kernel versions that are being used????

I didn't se any listing in the zypp.conf file for "purge-kernels" . . . file was quite long with mostly ###### all over. : - )))

esteelpaz commented 3 years ago

Again, got these strange formatting issues with posting the clipboard from the zypp.conf file . . . ??? Sorry, same on the code tags should have started at "Broadcom . .xxxxx . 5.5.9"

geckolinux commented 3 years ago

Hi there, you probably won't need to edit anything in the zypp.conf file, try just enabling the purge-kernels service in the YaST Services manager.

esteelpaz commented 3 years ago

@geckolinux

OK, thanks for that suggestion, found it, it was marked Inactive . . . I tried "starting" it, but when clicking "apply" or "start & OK" it brought back "config failed, would you like to continue??" . . . tried it a couple of ways, so I don't know if it is set for "On boot" and it will then run it . . . it now says "On boot" but "Failed(failed)" . . . ???? Guess I'll see what happens on next boot . . . .

I'm still getting the "mate-menu" and obsolete "pxydg" ???? file conflict when running zypper . . . given 3 or 4 choices and I pick #3 "keep obsolete xxxx file" . . . sort of interrupts the zypper upgrade "flow" because it won't run through, etc.

esteelpaz commented 3 years ago

@geckolinux

So, just for humor I checked the data in my main channel TW install, in the Yast search "kernel-default" and in the versions tab were just three kernels. Data in the zypp.conf file listed the same "multiversion" items that also show up in the Gecko version.

I checked the Yast Services Manager, and slight variation from the Gecko which was set to manual and then wouldn't accept changes . . . TW has it set to "On boot" . . . but, like Gecko it is flagged as "Inactive (Dead)" . . . .

So, for some reason TW is able to keep the kernels limited to the three . . . but Gecko is spreading it out across something 16???? big number . . . bigger than three. : - )))

geckolinux commented 3 years ago

You can safely manually remove all but the latest kernel version. As for automatically cleaning out the old kernels, you'll definitely need the purge-kernels service to be enabled.

esteelpaz commented 3 years ago

OK, well, if you check the 3rd post in the thread, when I tried to use Yast to remove the last kernel listed as installed, it flashed an error about "broadcom-wl"??? So I aborted out of it. I'm actually not using wifi on that computer, but still, it seemed like there was a dependency going back to that what might be the 16th kernel???

I'll look into enabling purge-kernel, but same thing there, an error about "failing to config" as I posted above about it . . . .

geckolinux commented 3 years ago

You'll have to carefully read the options it gives you to deal with broadcom-wl. If you don't have Broadcom WiFI you can just remove it completely. Otherwise you'll need the kernel version of broadcom-wl to align with at least one kernel version that you're keeping.

Same thing with the purge-kernel message, please read it carefully and post it here.

esteelpaz commented 3 years ago

Having a heck of a time with Gecko today, tried to get into YAst after I booted up and it wasn't letting me in, with some "pid management" error . . . half an hour later I tried to run a zypper in the terminal. sudo zypper ref && sudo zypper dup -l [sudo] password for root: System management is locked by the application with pid 739 (/usr/bin/zypper). Close this application before trying again. But, as far as I know I'm not running it?? Fresh boot of Gecko 30 minutes ago?? I'll have to check into the "purge-kernel" and "broadcom-wl" issues later on . . . .

esteelpaz commented 3 years ago

Still getting the error when trying to update via console sudo zypper ref [sudo] password for root: System management is locked by the application with pid 836 (/usr/bin/zypper). Close this application before trying again. I tried to run "kill" on the pid, but it won't except any of my variations that I tried. I tried to cat it and it won't open it. I looked at the file in the GUI by navi and it shows "modified Mon 28 Dec 2020 3:43 AM PST" . . . but the computer would not have been booted at that time . . . .

As part of the continuing problems, yesterday after posting the "heck of a time" post, when I tried to shut down out of the Gecko, could not do it, tried various methods, had to use the power button. So I spent some time to change from lightdm over to gdm, as I did in my laptop . . . trying to reboot after that it asked for my password "application inhibiting restart" . . . took a long time to reboot.

So, same question as above, why is "/usr/bin/zypper" blocking attempts to upgrade the system via terminal, but then when I ran "zypper in gdm" . . . it ran through and I changed the default-displaymanager in the console??

I'm about to check again whether I can restart out of MATE DE, or whether I can only do it via GNOME.

geckolinux commented 3 years ago

Hi there, please post your question to the openSUSE forum, and let us know what the resolution was. There are no GeckoLinux-specific modifications or issues introduced that could cause this problem, so it's an upstream issue.

esteelpaz commented 3 years ago

@geckolinux

Alrighty, I'll look into that, so far this problem has not shown up in my mainstream TW distro . . . just the Gecko on my desktop. I'll post back here when there is something to report. As far as this thread goes I can't check the broadcom dependency stuff because it isn't letting me into Yast, etc. No worries on it.

geckolinux commented 3 years ago

Looking at your previous posts I think I found the issue:

sudo zypper ref && sudo zypper dup -l

I'm pretty sure you just had two zypper processes that were trying to run concurrently, one in the background so you didn't see it in your terminal. Maybe try rebooting the system and directly opening YaST Software, without doing anything on the command line. YaST Software won't work if zypper is running in another previous process, and zypper won't run if YaST Software was opened first.

esteelpaz commented 3 years ago

@gecklinux:

Well, yes, "usr/bin/zypper" is blocking Yast Software and console zypper processes . . . I went over to my laptop and checked Gecko there and no problems. Went over to the desktop and checked TW and no problems there. I've been running my updates with that command for quite some time, just did it in TW. Some forum guru on OpenSUSE posted that as the console way to update in rolling editions.

I went then to Gecko rolling in the desktop, and "zypper" is blocking just a simple "sudo zypper ref" . . . and also Yast software management is blocked, but I could check displaymanager in yast. It wants me to "close the application" . . . but combos of "kill PID" "kill PID #xxx" none of them succeeded in killing the "zypper" that is for some reason "running" in spite of a number of reboots and so forth. Is there a command that will "close this app"???

geckolinux commented 3 years ago

Hmm, you'll definitely need to use sudo to kill those processes as root. Or just reboot your computer.

geckolinux commented 3 years ago

Also try deleting the /var/run/zypp.pid file, and the yast.pid file as well if it exists.

esteelpaz commented 3 years ago

@geckolinux

Thanks for the suggestions, I'll try that . . . very likely I did use "sudo" . . . . I'll report back later.

geckolinux commented 3 years ago

You could also try sudo killall -9 zypper y2base y2start yast2 and then try opening YaST Software again. If it still complains about a blockage then it's tripping up on an old stale PID file.

esteelpaz commented 3 years ago

sudo zypper ref [sudo] password for root: System management is locked by the application with pid 754 (/usr/bin/zypper). Close this application before trying again. 1@1:~> sudo zypper rm /var/run/zypp.pid System management is locked by the application with pid 754 (/usr/bin/zypper). Close this application before trying again. 1@1:~> sudo killall -9 zypper y2base y2start yast2 y2base: no process found y2start: no process found yast2: no process found 1@1:~> sudo zypper ref Repository 'Google-chrome' is up to date. Repository 'Google-talkplugin' is up to date. Repository 'Nvidia' is up to date. Repository 'Packman_Tumbleweed' is up to date. Repository 'Tumbleweed_OSS' is up to date. Repository 'Tumbleweed_OSS-updates' is up to date. Repository 'Tumbleweed_non-OSS' is up to date. Repository 'Skype' is up to date. All repositories have been refreshed.

So it looks like the "killall zypper" was what it was looking for . . . still getting that "keep obsolete package" on the mate-menu issue question. Kind of a strange series of events on the "failure to log out or shut down" combined with "zypper is blocking this process" . . . . But, thanks for the assist getting through it.

geckolinux commented 3 years ago

Ok, good. So how about now running a sudo zypper dup, and let it remove the obsolete package(s) if it asks you.

esteelpaz commented 3 years ago

I did that dup move after I got past the zypper blaockade; this is back to my other bugger report on the dependency of mate-menu && pxydg?? packages, where the #3 choice is "keep obsolete package" . . . not sure if main channel TW has worked it's way through that one or not . . . .

But, interestingly when I restarted out of Gecko today I saw a quick flash on a TTY - like page that said, "Purge old kernels" . . . so, possibly the old kernels might have been . . . purged???

geckolinux commented 3 years ago

"Purge old kernels" . . . so, possibly the old kernels might have been . . . purged???

You can check how many versions are installed like this: https://user-images.githubusercontent.com/2692138/103254060-ddf60a80-4951-11eb-963f-891182e9f2de.png

the # 3 choice is "keep obsolete package"

And what are the other choices? There are no packages with unsolvable or defunct dependencies like that in the Tumbleweed repos, so it's just a matter of correcting some manual user intervention that was apparently made at some point in time.

esteelpaz commented 3 years ago

@geckolinux

Thanks for that link, I'll check it when I get back to Gecko TW.

From the thread #163 . . . seems like the olde threads have been tidied up?

``Problem: mate-menu-20.04.1-2.1.noarch requires python3-xdg, but this requirement cannot be provided deleted providers: python3-pyxdg-0.26-6.2.noarch not installable providers: python3-xdg-4.0.1-1.1.noarch[download.opensuse.org-oss] Solution 1: Following actions will be done: deinstallation of mate-menu-20.04.1-2.1.noarch deinstallation of mate-panel-branding-openSUSE-42.1-4.44.noarch deinstallation of mate-menu-lang-20.04.1-2.1.noarch Solution 2: deinstallation of python3-pyxdg-0.26-6.2.noarch Solution 3: keep obsolete python3-pyxdg-0.26-6.2.noarch Solution 4: break mate-menu-20.04.1-2.1.noarch by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/4/c/d/?] (c): ``

3 seems to be the choice that works. Mate claims it isn't their problem . . . it did show up in TW around the same time, but not sure if they have cleaned it up or not.

geckolinux commented 3 years ago

Solution #2 appears to be the right one.

esteelpaz commented 3 years ago

OK, but then why does it say, "mate-menu-xxx requires python3-xdg, requirement can't be provided, deleted providers, python3-pyxdg-xxxx"???

The python3-pyxdg xxx package is "obsolete" and is interfering with allowing the python3-xdg package to be installed???

And then question is why isn't zypper just making the "correct decision" to just remove the obsolete package and install the right package for mate-menu???

geckolinux commented 3 years ago

You probably installed a specific version of that package from a non-official source at some point, and it's still respecting what you requested back then. Solution 2 will remove that conflicting package and allow all the other dependencies to be updated correctly. It won't remove anything else without advising you first.

esteelpaz commented 3 years ago

Alrighty, well, I don't know when that would have happened, almost exclusively I use zypper dup -l to select the upgrades . . . . When I rotate back to Gecko I'll try #2 and see how it flies . . . .

esteelpaz commented 3 years ago

Appears that we are not out of the woods on this one, this is after Gecko was shut down two days back and then cold boot this morning. Tried to suspend it after running it for 30 mins and got a request for admin password to "over-ride the process, with a pid error" . . . then running zypper got the same error as before. I'll try to run the killall command in a minute . . . .

sudo zypper dup -l [sudo] password for root: System management is locked by the application with pid 855 (/usr/bin/zypper). Close this application before trying again.

esteelpaz commented 3 years ago

Lordie . . . so got the "sudo killall -9 zypper" command figured out and ran through the dup -l and I selected "option #2" in the questionnaire and it upgraded and or removed the pxydg package . . . and I rebooted.

After a couple of minutes I checked the console for zypper and this time it wasn't blocked . . . however, now there is no "mate-menu" dropdown menu in the upper left corner???? Possibly this relates to the package dependency issues between "mate-menu" and "pythonxxxxxx"??????? Perhaps option #2 wasn't ideal?? : - 0

Otherwise, system seems operational . . . .

geckolinux commented 3 years ago

now there is no "mate-menu" dropdown menu in the upper left corner . . .

This is a known upstream bug. GeckoLinux no longer uses the Advanced Mint Menu. Please install and add the Brisk menu as an alternative.

esteelpaz commented 3 years ago

@geckolinux

OK, thanks for the hints . . . looks like that bug goes back to Jan '20 . . . but for conversations sake, I have TW/MATE also installed on this computer and so far no problems with the menu . . . .

Just odd that I am stumbling into these issues on the Gecko side . . . TW did have the dependency conflict between the mate-menu and python packages . . . .

I'm away from Gecko for a few days as I cycle through my linux distros . . . I'll check back on the Brisk menu suggestion when I get back to it.

geckolinux commented 3 years ago

In that bug report somebody else confirmed that the issue with the Advanced Mate Menu not displaying also is happening on vanilla Tumbleweed.

Since GeckoLinux uses upstream packages, the only thing that can cause dependency problems is manual interventions by the user-- locked package versions, partial upgrades, third party OBS packages installed by the user, etc.

esteelpaz commented 3 years ago

Well, OK, something went sideways . . . as mentioned previously, since I have 6 linux installs on this computer I don't have time to mess around with the innards of any of them, I just run zypper or apt or pacman . . . . In the case of Gecko I haven't added anything or done anything to it, for the most part it's "turn key" . . . but, somehow in zypper it seems like something has gone a tad wonky . . . ????

esteelpaz commented 3 years ago

now there is no "mate-menu" dropdown menu in the upper left corner . . .

This is a known upstream bug. GeckoLinux no longer uses the Advanced Mint Menu. Please install and add the Brisk menu as an alternative.

@geckolinux

Just following up on the "menu" issue . . . I also have a plainjane TW install on my desktop, and I have a Gecko MATE install on my Sys76 laptop . . . neither of those other systems have lost their MATE menu . . . only the one I have had running on the desktop . . . . I didn't add the "brisk" menu to it because I was trying to see if subsequent updates would correct the problem . . . so far, not. And so far the main MATE menus on the TW & the newer Gecko (rolling) install have been fine . . . .

I'm in Gecko desktop right now and I'm looking at what is otherwise a clean and crisp GUI toolbar . . . with a blank space in the left corner . . . nada, nichts . . . etc. : - ))))))

geckolinux commented 3 years ago

It must be a bug that appears only under certain conditions, but as the upstream bug report shows it also happens on vanilla Tumbleweed and Leap systems. Brisk Menu would still be the recommendation.