On 12/1/23 11:53, Patrick O'Callaghan wrote:
On Fri, 2023-12-01 at 10:28 -0700, home user wrote:
On 12/1/23 10:06 AM, Tim via users wrote:
On Fri, 2023-12-01 at 09:11 -0700, home user wrote:
What is the current, simple, best practice, f38 way of removing
the
oldest memtest, both from the hard drive (if it's there) and from
the grub menu?
It *ought* to be as simple as
dnf remove kernel.....
Where you use a specific kernel package version name. And it does
everything.
Which is pretty much happens when you install a new kernel update
and
it removed the oldest one, automatically.
You can play with the DNF configuration files to specify how many
kernels (install-only packages) to keep on your system, and let it
automatically handle this for you. But I always suggest keeping
more
than 3, I go for 5. It might be some time before you notice that a
kernel update has caused a problem, and it's handy to be able to go
back more than just one, to test things.
Because of past problems with hard drive space when doing upgrades,
I've got it set to keep 3. (installonly_limit=3).
How do I get the full "name" of the kernel to be deleted without re-
booting (so I can see the grub menu)?
'rpm -qa kernel' will list all the installed kernels. The one to be
deleted on the next dnf update will be the oldest.
The rpm command did not give me enough information, so I had to do the
reboot. The grub menu shows 4 kernels and 2 memtests (manually typed):
------
Fedora Linux (6.6.2-101.fc38.x86_64...
Fedora Linux (6.6.2-101.fc38.x86_64...
Fedora Linux (6.6.2-101.fc38.x86_64...
Fedora Linux (6.6.2-101.fc38.x86_64...
(the rescue kernel)
Memtest86+ (memtest86+x64.bin-6.20...
Fedora Memtest memtest86+-5.31...
(windows)
------
The rpm command
------
bash.27[~]: rpm -qa kernel
kernel-6.5.5-200.fc38.x86_64
kernel-6.5.12-200.fc38.x86_64
kernel-6.6.2-101.fc38.x86_64
bash.28[~]: rpm -qa memtest86+
memtest86+-6.20-4.fc38.x86_64
bash.29[~]:
------
The "dnf upgrade" did fine, as Patrick described, for a few weeks, but
not yesterday. Trying the "dnf remove"...
------
bash.29[~]: dnf remove kernel-6.6.2-101.fc38.x86_64
Dependencies resolved.
======================================================================================================================================================
Package Architecture Version
Repository Size
======================================================================================================================================================
Removing:
kernel x86_64 6.6.2-101.fc38
@updates 0
Transaction Summary
======================================================================================================================================================
Remove 1 Package
Freed space: 0
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing :
1/1
Erasing : kernel-6.6.2-101.fc38.x86_64
1/1
Running scriptlet: kernel-6.6.2-101.fc38.x86_64
1/1
Verifying : kernel-6.6.2-101.fc38.x86_64
1/1
Removed:
kernel-6.6.2-101.fc38.x86_64
Complete!
bash.30[~]: dnf remove memtest86+-5.31
No match for argument: memtest86+-5.31
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
bash.31[~]: ls /boot
config-6.5.10-200.fc38.x86_64 initramfs-6.5.8-200.fc38.x86_64.img
System.map-6.5.10-200.fc38.x86_64
config-6.5.12-200.fc38.x86_64 initramfs-6.6.2-101.fc38.x86_64.img
System.map-6.5.12-200.fc38.x86_64
config-6.5.8-200.fc38.x86_64 loader
System.map-6.5.8-200.fc38.x86_64
config-6.6.2-101.fc38.x86_64 lost+found
System.map-6.6.2-101.fc38.x86_64
efi memtest86+x64.bin vmlinuz-0-rescue-70857e3fb05849139515e66a3fdc6b38
grub2 symvers-6.5.10-200.fc38.x86_64.xz vmlinuz-6.5.10-200.fc38.x86_64
initramfs-0-rescue-70857e3fb05849139515e66a3fdc6b38.img
symvers-6.5.12-200.fc38.x86_64.xz vmlinuz-6.5.12-200.fc38.x86_64
initramfs-6.5.10-200.fc38.x86_64.img symvers-6.5.8-200.fc38.x86_64.xz
vmlinuz-6.5.8-200.fc38.x86_64
initramfs-6.5.12-200.fc38.x86_64.img symvers-6.6.2-101.fc38.x86_64.xz
vmlinuz-6.6.2-101.fc38.x86_64
bash.32[~]:
------
There's still too-old files in "/boot".
(rebooting so I can see the grub menu again)
The grub menu is unchanged.
(Jeffrey said)
> See <https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-
> offline/#sect-clean-up-old-kernels>.
The script there uses the same dnf command that Patrick suggested.
I don't think Patrick's suggestion was wrong. Rather, the situation is
messier. I recall seeing warnings and errors during yesterday's
patching. All were during the clean-up phase. So I hunted through the
logs. I've attached a text file of what might be relevant lines, along
with adjacent lines for context. They are all from dnf.rpm.log.
So what is the right way to get rid of all the out-of-date files
(related to 6.5.8-200)? Is it best to just brute force it (the "rm"
command), or is there a better way?
[snip]
2023-11-30T13:43:07-0700 SUBDEBUG Upgraded: webkitgtk6.0-2.42.1-1.fc38.x86_64
2023-11-30T13:43:07-0700 INFO warning: file 038ab37008fa8fdb4c9e59797dcf0a9e883253: remove failed: No such file or directory
warning: file fc1cd3db05928a7972d6ed5a904ee3aa426326: remove failed: No such file or directory
2023-11-30T13:43:08-0700 SUBDEBUG Upgraded: webkit2gtk4.0-2.42.1-1.fc38.x86_64
2023-11-30T13:43:08-0700 INFO warning: file 41acf57d23f627efec408d8cba131887bc990b: remove failed: No such file or directory
warning: file 233433e4595e3d97b93e9336fd6983b084f087: remove failed: No such file or directory
2023-11-30T13:43:08-0700 SUBDEBUG Upgraded: corosync-3.1.7-3.fc38.x86_64
[snip]
2023-11-30T13:43:18-0700 SUBDEBUG Upgraded: webkit2gtk4.1-2.42.1-1.fc38.x86_64
2023-11-30T13:43:18-0700 INFO warning: file 686d9081806aba30fe876d522faf101ccf1a1f: remove failed: No such file or directory
warning: file 2a05e7a5ba32c2aa6cc6159f1585b7fb4eb779: remove failed: No such file or directory
2023-11-30T13:43:18-0700 SUBDEBUG Upgraded: javascriptcoregtk4.1-2.42.1-1.fc38.x86_64
[snip]
2023-11-30T13:43:40-0700 SUBDEBUG Upgraded: kwin-5.27.9-2.fc38.x86_64
2023-11-30T13:43:40-0700 SUBDEBUG Erase: kmod-nvidia-470xx-6.5.5-100.fc37.x86_64-3:470.199.02-3.fc37.x86_64
2023-11-30T13:43:54-0700 SUBDEBUG Erase: kernel-6.5.5-100.fc37.x86_64
2023-11-30T13:43:54-0700 SUBDEBUG Erase: kernel-modules-6.5.5-100.fc37.x86_64
2023-11-30T13:43:54-0700 INFO depmod: ERROR: could not open directory /lib/modules/6.5.5-100.fc37.x86_64: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
warning: %postun(kernel-modules-6.5.5-100.fc37.x86_64) scriptlet failed, exit status 1
2023-11-30T13:43:54-0700 ERROR Error in POSTUN scriptlet in rpm package kernel-modules
[snip]
2023-11-30T13:43:55-0700 SUBDEBUG Upgraded: dracut-network-059-4.fc38.x86_64
2023-11-30T13:43:55-0700 SUBDEBUG Erase: kernel-devel-6.5.5-100.fc37.x86_64
2023-11-30T13:43:55-0700 INFO warning: file 6.5.5-100.fc37.x86_64: remove failed: No such file or directory
2023-11-30T13:43:56-0700 SUBDEBUG Upgraded: elfutils-libelf-devel-0.189-3.fc38.x86_64
[snip]
2023-11-30T13:43:56-0700 SUBDEBUG Upgraded: grub2-tools-1:2.06-102.fc38.x86_64
2023-11-30T13:43:56-0700 INFO Created symlink /etc/systemd/user/timers.target.wants/grub-boot-success.timer → /usr/lib/systemd/user/grub-boot-success.timer.
2023-11-30T13:43:56-0700 SUBDEBUG Upgraded: sssd-ldap-2.9.1-1.fc38.x86_64
[snip]
2023-11-30T13:44:09-0700 SUBDEBUG Upgraded: kf5-akonadi-server-mysql-23.08.1-2.fc38.x86_64
2023-11-30T13:44:09-0700 SUBDEBUG Erase: kernel-modules-core-6.5.5-100.fc37.x86_64
2023-11-30T13:44:09-0700 INFO warning: file 6.5.5-100.fc37.x86_64: remove failed: No such file or directory
2023-11-30T13:44:09-0700 SUBDEBUG Erase: kernel-core-6.5.5-100.fc37.x86_64
2023-11-30T13:44:09-0700 INFO warning: file COPYING-6.5.5-100.fc37: remove failed: No such file or directory
warning: file 6.5.5-100.fc37.x86_64: remove failed: No such file or directory
2023-11-30T13:44:09-0700 SUBDEBUG Upgraded: linux-firmware-20231030-1.fc38.noarch
[snip]
2023-11-30T13:44:24-0700 SUBDEBUG Upgraded: mariadb-server-3:10.5.22-1.fc38.x86_64
2023-11-30T13:44:25-0700 INFO warning: file 1691f2dd27e09b504bcf39b772cdfe06604b43: remove failed: No such file or directory
warning: file f8e4ec479bbb004c5fde6a3caf33b13ca52e43: remove failed: No such file or directory
warning: file bb5f7383490972cd752c110dd1a9824a60e55d: remove failed: No such file or directory
warning: file b02e1e7c4ee64e10513956a76906f4d56107ef: remove failed: No such file or directory
warning: file 9cb25a83d7cfc8ef8f1f7d136152e6f2d27f72: remove failed: No such file or directory
warning: file 0f91dde3da1fdc8fa51c54a1da6d97336dbec2: remove failed: No such file or directory
warning: file c4457a6ca7fc4865547cd623615c33c9f26c56: remove failed: No such file or directory
2023-11-30T13:44:25-0700 SUBDEBUG Upgraded: plasma-workspace-5.27.9.1-2.fc38.x86_64
2023-11-30T13:44:25-0700 SUBDEBUG Upgraded: subversion-1.14.2-13.fc38.x86_64
2023-11-30T13:44:25-0700 INFO warning: file 178eb1f60f88b9d9eae6ffc54e476836302a74: remove failed: No such file or directory
warning: file fba51e4515fbf3800e3983cdc6d77d8e12425c: remove failed: No such file or directory
warning: file 5267eea6e44eb7e1c0fba2895dd3a1fa7ad76a: remove failed: No such file or directory
warning: file a0de69d521bb160865aa4b2b761e87d01a39de: remove failed: No such file or directory
warning: file aa90356034cb3bf9207df5bbd98c91ff1c923b: remove failed: No such file or directory
warning: file 1ed18ac93a4f1434c4aefc784149453ca64380: remove failed: No such file or directory
warning: file 8dd4c6852204a09a46de1af6a86add5c4a96a5: remove failed: No such file or directory
warning: file d4683136ae87ffa94ad3509a45f3119d843043: remove failed: No such file or directory
warning: file 9359a39516fff69896caf97932d1044f5a8698: remove failed: No such file or directory
2023-11-30T13:44:25-0700 SUBDEBUG Upgraded: elfutils-libs-0.189-3.fc38.x86_64
[snip]
2023-11-30T13:44:26-0700 SUBDEBUG Upgraded: subversion-libs-1.14.2-13.fc38.x86_64
2023-11-30T13:44:26-0700 INFO warning: file a3a582a4752fad7ff120c25d74f5790029f81d: remove failed: No such file or directory
warning: file d5735ea7684072208dc3afb173160fb5c48fb7: remove failed: No such file or directory
warning: file b950da5c805a0621c7c597a365c90ff6de47b9: remove failed: No such file or directory
warning: file a883912e1d947b4f348d4e8da03bd0556baec5: remove failed: No such file or directory
2023-11-30T13:44:26-0700 SUBDEBUG Upgraded: kf5-audiocd-kio-23.08.1-1.fc38.x86_64
[snip]
2023-11-30T13:44:37-0700 SUBDEBUG Upgraded: glibc-langpack-en-2.37-13.fc38.x86_64
2023-11-30T13:44:37-0700 SUBDEBUG Upgraded: glibc-2.37-13.fc38.x86_64
2023-11-30T13:46:49-0700 INFO --- logging initialized ---
2023-11-30T13:46:52-0700 SUBDEBUG Installed: kmod-nvidia-470xx-6.6.2-101.fc38.x86_64-3:470.223.02-1.fc38.x86_64
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue