[opensuse-support] lots of old initrd/config/vmlinuz in /boot
Hi, while checking the diskspace I found tons of fragements from pld kernels - back int the 4.18.x day in /boot. Should there not be a regular job that purges old kernels (and what belons to it)? Thanks Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 30/08/2019 19.26, Axel Braun wrote:
Hi,
while checking the diskspace I found tons of fragements from pld kernels - back int the 4.18.x day in /boot. Should there not be a regular job that purges old kernels (and what belons to it)?
Yes, there are. First question is, what openSUSE release are you using? cat /etc/os-release -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
W dniu 30.08.2019 o 19:26, Axel Braun pisze:
Hi,
while checking the diskspace I found tons of fragements from pld kernels - back int the 4.18.x day in /boot. Should there not be a regular job that purges old kernels (and what belons to it)?
Thanks Axel
1) You can check if a file belongs to any package by running "rpm -q -f /path/to/file". Files not owned should be safe to remove. 2) There is a script "/sbin/purge-kernels", which should be launched automatically.
On 30/08/2019 22.11, Adam Mizerski wrote:
W dniu 30.08.2019 o 19:26, Axel Braun pisze:
Hi,
while checking the diskspace I found tons of fragements from pld kernels - back int the 4.18.x day in /boot. Should there not be a regular job that purges old kernels (and what belons to it)?
Thanks Axel
1) You can check if a file belongs to any package by running "rpm -q -f /path/to/file". Files not owned should be safe to remove. 2) There is a script "/sbin/purge-kernels", which should be launched automatically.
Verify: systemctl status purge-kernels -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
Am Freitag, 30. August 2019, 23:25:15 CEST schrieb Carlos E. R.:
Verify:
systemctl status purge-kernels
OK, that was the command I was looking for, Thanks T520:/home/docb # systemctl status purge-kernels ● purge-kernels.service - Purge old kernels Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-08-27 07:36:57 CEST; 4 days ago Process: 1448 ExecStart=/sbin/purge-kernels (code=exited, status=1/FAILURE) Main PID: 1448 (code=exited, status=1/FAILURE) Aug 27 07:36:43 T520 systemd[1]: Starting Purge old kernels... Aug 27 07:36:57 T520.internal purge-kernels[1448]: error: package kernel- default-4.18.7-1.5.x86_64 is not installed Aug 27 07:36:57 T520.internal purge-kernels[1448]: /sbin/purge-kernels: giving up. Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Main process exited, code=exited, status=1/FAILURE Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Failed with result 'exit-code'. Aug 27 07:36:57 T520.internal systemd[1]: Failed to start Purge old kernels. purge-kernels reads /etc/zypp/zypp.conf:multiversion.kernels and this is set: multiversion.kernels = latest,latest-1,running but in fact it looks for kernel-default-4.18.7-1.5.x86_64, which is not installed. My idea to check up-date-alternatives --get-selections did not list any kernel-alternatives, neither did /boot show anything with 4.18.7 - wheew is it taking the info from? Cheers Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
31.08.2019 14:51, Axel Braun пишет:
Am Freitag, 30. August 2019, 23:25:15 CEST schrieb Carlos E. R.:
Verify:
systemctl status purge-kernels
OK, that was the command I was looking for, Thanks
T520:/home/docb # systemctl status purge-kernels ● purge-kernels.service - Purge old kernels Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2019-08-27 07:36:57 CEST; 4 days ago Process: 1448 ExecStart=/sbin/purge-kernels (code=exited, status=1/FAILURE) Main PID: 1448 (code=exited, status=1/FAILURE)
Aug 27 07:36:43 T520 systemd[1]: Starting Purge old kernels... Aug 27 07:36:57 T520.internal purge-kernels[1448]: error: package kernel- default-4.18.7-1.5.x86_64 is not installed Aug 27 07:36:57 T520.internal purge-kernels[1448]: /sbin/purge-kernels: giving up. Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Main process exited, code=exited, status=1/FAILURE Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Failed with result 'exit-code'. Aug 27 07:36:57 T520.internal systemd[1]: Failed to start Purge old kernels.
purge-kernels reads /etc/zypp/zypp.conf:multiversion.kernels and this is set: multiversion.kernels = latest,latest-1,running
but in fact it looks for kernel-default-4.18.7-1.5.x86_64, which is not installed.
Show output of rpm -qa 'kernel-*'
My idea to check up-date-alternatives --get-selections did not list any kernel-alternatives, neither did /boot show anything with 4.18.7 - wheew is it taking the info from?
Cheers Axel
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Am Samstag, 31. August 2019, 14:33:29 CEST schrieb Andrei Borzenkov:
31.08.2019 14:51, Axel Braun пишет:
Am Freitag, 30. August 2019, 23:25:15 CEST schrieb Carlos E. R.:
Verify:
systemctl status purge-kernels
OK, that was the command I was looking for, Thanks
T520:/home/docb # systemctl status purge-kernels ● purge-kernels.service - Purge old kernels
Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-08-27 07:36:57 CEST; 4
days ago
Process: 1448 ExecStart=/sbin/purge-kernels (code=exited, status=1/FAILURE)
Main PID: 1448 (code=exited, status=1/FAILURE)
Aug 27 07:36:43 T520 systemd[1]: Starting Purge old kernels... Aug 27 07:36:57 T520.internal purge-kernels[1448]: error: package kernel- default-4.18.7-1.5.x86_64 is not installed Aug 27 07:36:57 T520.internal purge-kernels[1448]: /sbin/purge-kernels: giving up. Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Main process exited, code=exited, status=1/FAILURE Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Failed with result 'exit-code'. Aug 27 07:36:57 T520.internal systemd[1]: Failed to start Purge old kernels.
purge-kernels reads /etc/zypp/zypp.conf:multiversion.kernels and this is set: multiversion.kernels = latest,latest-1,running
but in fact it looks for kernel-default-4.18.7-1.5.x86_64, which is not installed.
Show output of
rpm -qa 'kernel-*'
oh yes, that gives an impressive list: T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.12-1.5.x86_64 kernel-default-4.18.13-1.6.x86_64 kernel-default-4.18.14-1.5.x86_64 kernel-default-4.18.15-1.2.x86_64 kernel-default-4.18.7-1.5.x86_64 kernel-default-4.18.8-1.3.x86_64 kernel-default-4.18.9-1.4.x86_64 kernel-default-4.19.1-1.5.x86_64 kernel-default-4.19.12-1.4.x86_64 kernel-default-4.19.2-1.3.x86_64 kernel-default-4.19.7-1.5.x86_64 kernel-default-4.19.8-1.5.x86_64 kernel-default-4.20.2-1.4.x86_64 kernel-default-4.20.6-1.5.x86_64 kernel-default-4.20.7-1.3.x86_64 kernel-default-5.0.11-1.3.x86_64 kernel-default-5.0.13-1.1.x86_64 kernel-default-5.0.2-1.2.x86_64 kernel-default-5.0.3-1.2.x86_64 kernel-default-5.0.5-1.2.x86_64 kernel-default-5.0.7-1.2.x86_64 kernel-default-5.0.9-1.3.x86_64 kernel-default-5.1.10-1.1.x86_64 kernel-default-5.1.16-1.4.x86_64 kernel-default-5.1.2-1.2.x86_64 kernel-default-5.1.3-1.2.x86_64 kernel-default-5.1.4-1.2.x86_64 kernel-default-5.1.7-1.2.x86_64 kernel-default-5.2.2-1.2.x86_64 kernel-default-5.2.5-1.2.x86_64 kernel-default-5.2.7-1.2.x86_64 kernel-default-5.2.8-1.1.x86_64 kernel-default-5.2.9-1.2.x86_64 kernel-firmware-20190815-1.1.noarch -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
* Axel Braun <docb@opensuse.org> [08-31-19 09:35]: [...]
T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.12-1.5.x86_64 kernel-default-4.18.13-1.6.x86_64 kernel-default-4.18.14-1.5.x86_64 kernel-default-4.18.15-1.2.x86_64 kernel-default-4.18.7-1.5.x86_64 kernel-default-4.18.8-1.3.x86_64 kernel-default-4.18.9-1.4.x86_64 kernel-default-4.19.1-1.5.x86_64 kernel-default-4.19.12-1.4.x86_64 kernel-default-4.19.2-1.3.x86_64 kernel-default-4.19.7-1.5.x86_64 kernel-default-4.19.8-1.5.x86_64 kernel-default-4.20.2-1.4.x86_64 kernel-default-4.20.6-1.5.x86_64 kernel-default-4.20.7-1.3.x86_64 kernel-default-5.0.11-1.3.x86_64 kernel-default-5.0.13-1.1.x86_64 kernel-default-5.0.2-1.2.x86_64 kernel-default-5.0.3-1.2.x86_64 kernel-default-5.0.5-1.2.x86_64 kernel-default-5.0.7-1.2.x86_64 kernel-default-5.0.9-1.3.x86_64 kernel-default-5.1.10-1.1.x86_64 kernel-default-5.1.16-1.4.x86_64 kernel-default-5.1.2-1.2.x86_64 kernel-default-5.1.3-1.2.x86_64 kernel-default-5.1.4-1.2.x86_64 kernel-default-5.1.7-1.2.x86_64 kernel-default-5.2.2-1.2.x86_64 kernel-default-5.2.5-1.2.x86_64 kernel-default-5.2.7-1.2.x86_64 kernel-default-5.2.8-1.1.x86_64 kernel-default-5.2.9-1.2.x86_64 kernel-firmware-20190815-1.1.noarch
late to the table, but if the problem is root file space, that many "installed" kernels are utilizing a *great* amount of file space. So perhapes the snapshots are not your problem. If file space is not the problem, excuse me for jumping in late. and they are *indeed* installed or your rpmdb is sorely out of touch with your system and in need of repair. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Axel Braun composed on 2019-08-31 15:32 (UTC+0200):
T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.12-1.5.x86_64 ... kernel-default-5.2.7-1.2.x86_64 kernel-default-5.2.8-1.1.x86_64 kernel-default-5.2.9-1.2.x86_64 kernel-firmware-20190815-1.1.noarch
Whatever's going wrong with purge-kernels.service, here's a simple enough workaround: zypper al kernel-default-5.2.8 zypper al kernel-default-5.2.9 zypper rm kernel-def* zypper rl kernel-default-5.2.8 zypper rl kernel-default-5.2.9 zypper should then remove all kernels except upon reaching 5.2.8 it will ask what to do about the lock, and you will answer 2 to keep installed. Answer 2 also with 5.2.9. Result should be you have only those two kernels installed. If space is a problem and zypper refuses to behave, remove oldest kernel first using rpm -e, then try again the others with purge-kernels or zypper. Possibly running rpmdb --rebuilddb is first needed to account for the error message about 4.18.7-1.5. -- Evolution as taught in public schools is religion, not science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Hello Felix, Am Samstag, 31. August 2019, 16:09:18 CEST schrieb Felix Miata:
Axel Braun composed on 2019-08-31 15:32 (UTC+0200):
T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.12-1.5.x86_64
...
kernel-default-5.2.7-1.2.x86_64 kernel-default-5.2.8-1.1.x86_64 kernel-default-5.2.9-1.2.x86_64 kernel-firmware-20190815-1.1.noarch
Whatever's going wrong with purge-kernels.service, here's a simple enough workaround:
zypper al kernel-default-5.2.8 zypper al kernel-default-5.2.9 zypper rm kernel-def* zypper rl kernel-default-5.2.8 zypper rl kernel-default-5.2.9
zypper should then remove all kernels except upon reaching 5.2.8 it will ask what to do about the lock, and you will answer 2 to keep installed. Answer 2 also with 5.2.9. Result should be you have only those two kernels installed.
Indeed. Nearly all old kernels got removed, and I get now (after a zypper dup and reboot) T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.7-1.5.x86_64 kernel-default-5.2.10-1.2.x86_64 kernel-firmware-20190815-1.1.noarch The 4.18.7 could only be removed after a rebuild of the rpm-database, and now there is some more space left on the device Thanks to all for your help! Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 31/08/2019 15.32, Axel Braun wrote:
Am Samstag, 31. August 2019, 14:33:29 CEST schrieb Andrei Borzenkov:
31.08.2019 14:51, Axel Braun пишет:
Am Freitag, 30. August 2019, 23:25:15 CEST schrieb Carlos E. R.:
Verify:
systemctl status purge-kernels
OK, that was the command I was looking for, Thanks
:-)
T520:/home/docb # systemctl status purge-kernels ● purge-kernels.service - Purge old kernels
Loaded: loaded (/usr/lib/systemd/system/purge-kernels.service; enabled;
vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-08-27 07:36:57 CEST; 4
days ago
Process: 1448 ExecStart=/sbin/purge-kernels (code=exited, status=1/FAILURE)
Main PID: 1448 (code=exited, status=1/FAILURE)
Aug 27 07:36:43 T520 systemd[1]: Starting Purge old kernels... Aug 27 07:36:57 T520.internal purge-kernels[1448]: error: package kernel-default-4.18.7-1.5.x86_64 is not installed Aug 27 07:36:57 T520.internal purge-kernels[1448]: /sbin/purge-kernels: giving up. Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Main process exited, code=exited, status=1/FAILURE Aug 27 07:36:57 T520.internal systemd[1]: purge-kernels.service: Failed with result 'exit-code'. Aug 27 07:36:57 T520.internal systemd[1]: Failed to start Purge old kernels.
purge-kernels reads /etc/zypp/zypp.conf:multiversion.kernels and this is set: multiversion.kernels = latest,latest-1,running
but in fact it looks for kernel-default-4.18.7-1.5.x86_64, which is not installed.
Show output of
rpm -qa 'kernel-*'
oh yes, that gives an impressive list:
T520:/home/docb # rpm -qa | grep kernel | sort kernel-default-4.18.12-1.5.x86_64 kernel-default-4.18.13-1.6.x86_64 kernel-default-4.18.14-1.5.x86_64 kernel-default-4.18.15-1.2.x86_64 kernel-default-4.18.7-1.5.x86_64
this is the one that purge says: ]>>> Aug 27 07:36:57 T520.internal purge-kernels[1448]: error: package kernel-default-4.18.7-1.5.x86_64 is not installed ]>>> Aug 27 07:36:57 T520.internal purge-kernels[1448]: /sbin/purge-kernels: giving up. Strange.
kernel-default-4.18.8-1.3.x86_64 kernel-default-4.18.9-1.4.x86_64 kernel-default-4.19.1-1.5.x86_64 kernel-default-4.19.12-1.4.x86_64 kernel-default-4.19.2-1.3.x86_64 kernel-default-4.19.7-1.5.x86_64 kernel-default-4.19.8-1.5.x86_64 kernel-default-4.20.2-1.4.x86_64 kernel-default-4.20.6-1.5.x86_64 kernel-default-4.20.7-1.3.x86_64 kernel-default-5.0.11-1.3.x86_64 kernel-default-5.0.13-1.1.x86_64 kernel-default-5.0.2-1.2.x86_64 kernel-default-5.0.3-1.2.x86_64 kernel-default-5.0.5-1.2.x86_64 kernel-default-5.0.7-1.2.x86_64 kernel-default-5.0.9-1.3.x86_64 kernel-default-5.1.10-1.1.x86_64 kernel-default-5.1.16-1.4.x86_64 kernel-default-5.1.2-1.2.x86_64 kernel-default-5.1.3-1.2.x86_64 kernel-default-5.1.4-1.2.x86_64 kernel-default-5.1.7-1.2.x86_64 kernel-default-5.2.2-1.2.x86_64 kernel-default-5.2.5-1.2.x86_64 kernel-default-5.2.7-1.2.x86_64 kernel-default-5.2.8-1.1.x86_64 kernel-default-5.2.9-1.2.x86_64 kernel-firmware-20190815-1.1.noarch
Maybe the rpm database is out of sync? If not, that is taking an awful amount of space. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (6)
-
Adam Mizerski
-
Andrei Borzenkov
-
Axel Braun
-
Carlos E. R.
-
Felix Miata
-
Patrick Shanahan