Kernel weg nach update

Ja ich bitte darum. :bowing_man:

[manjaro /]# mhwd-kernel -i linux510
:: Synchronizing package databases...
 core                                                                             166.9 KiB  2.59 MiB/s 00:00 [#################################################################] 100%
 extra                                                                           1896.1 KiB  34.9 MiB/s 00:00 [#################################################################] 100%
 community                                                                          7.0 MiB  58.2 MiB/s 00:00 [#################################################################] 100%
 multilib                                                                         177.5 KiB  17.3 MiB/s 00:00 [#################################################################] 100%
warning: linux510-5.10.117-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) linux510-5.10.117-1

Total Installed Size:  78.16 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 linux510-5.10.117-1-x86_64 is up to date
(1/1) checking keys in keyring                                                                                [#################################################################] 100%
(1/1) checking package integrity                                                                              [#################################################################] 100%
(1/1) loading package files                                                                                   [#################################################################] 100%
(1/1) checking for file conflicts                                                                             [#################################################################] 100%
(1/1) checking available disk space                                                                           [#################################################################] 100%
:: Running pre-transaction hooks...
(1/1) Save Linux kernel modules
:: Processing package changes...
(1/1) reinstalling linux510                                                                                   [#################################################################] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Updating module dependencies...
(3/6) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.117-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.117-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
(4/6) Updating Kernel initcpios for Nvidia-DRM...
(5/6) Updating Grub-Bootmenu
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.9-x86_64.img
Found initrd fallback image: /boot/initramfs-5.9-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.7-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done
(6/6) Restore Linux kernel modules

==> Warning:
         -> Kernel has been updated. Modules of the current kernel
         -> have been backed up so you can continue to use your
         -> computer. However, the new kernel will only work
         -> at next boot.


Könnte das ein Probelm sein:

Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done
(6/6) Restore Linux kernel modules

Der findet ja noch die alten EOL Kernel. Da du die wahrscheinlich nicht rechtzeitig entfernt hast (bevor sie aus der repo entfernt wurden), bleibt da nur die manuelle Entfernung…

hm… kannst du mal folgendes prüfen:

pamac list --installed | grep "linux5[7,8,9]" 

Ansonsten, sollte linux510 nun funktionieren. Also du solltest booten können.

Das hier ist kein Problem. Das ist im Normalfall dein USB-Stick.

[manjaro /]# pamac list --installed | grep "linux5[7,8,9]"
[manjaro /]# 

pamac list --installed | grep "linux"

:question:

[manjaro /]# pamac list --installed | grep "linux"
archlinux-appstream-data           20220512-1                    extra      20.0 MB
archlinux-keyring                  20220424-1                    core       1.5 MB
lib32-util-linux                   2.38-1                        multilib   1.1 MB
linux-api-headers                  5.17.5-2                      core       5.4 MB
linux-firmware                     20220509.b19cbdc-1            core       516.6 MB
linux-firmware-whence              20220509.b19cbdc-1            core       194.1 kB
linux-latest                       5.10-1                                   
linux510                           5.10.117-1                    core       82.0 MB
linux515                           5.15.41-1                     core       109.1 MB
linux517                           5.17.9-1                      core       129.1 MB
playonlinux                        4.3.4-4                       AUR        4.0 MB
util-linux                         2.38-1                        core       12.6 MB
util-linux-libs                    2.38-1                        core       989.6 kB

Na dann kannst du die entfernen:

rm -fv /boot/initramfs-5.{7,8,9}-x86_64.img
rm -fv /boot/initramfs-5.{7,8,9}-x86_64-fallback.img
rm -fv /boot/linux5{7,8,9}-x86_64.kver
update-grub

:notebook: Vermutlich müssen dann auch noch die Kernel Module entfernt werden der jeweiligen Version in: /usr/lib/modules/

Dann die Kernel von oben erneut installieren:

mhwd-kernel -i linux510 linux515 linux517

Um diesen Blödsinn zu vermeiden, sollte man Stable Kernel immer frühzeitig upgraden und EOL Kernel sobald wie möglich entfernen. Am Sichersten ist man mit LTS Kernel. https://www.kernel.org/

Super, bootet wieder. Vielen Dank für die Spitzen-Hilfe.

1 Like

Ein kleines Problem noch.
Kann man auch die vmlinuz… Dateien löschen?

Wie kann ich den aktuellsten kernel nutzen. Installiert ist er, aber genutzt wird 5.10:

Dann mal versuchen, den Kernel 5.17 zu booten.
Geht im Grub Menu.

Diesmal hat es geklappt, vorher wurde 5.17 garnicht angezeigt.
Was kann ich mit den vmlinuz-Dateien machen?

Vmlinux sind die Kernel Dateien.
:laughing:

Kannst du löschen. :wink:

Habe jetzt den aktuellen Kernel 5.17 laufen und 5.10 LTS ist installiert.
Habe nun 5.15 LTS installiert und wollte 5.10 LTS deinstallieren.
Das ging jedoch nicht weil es wohl Abhängigkeiten gibt.
Wie kann ich herausfinden welches Programm noch den alten Kernel benötigt?

Ich würde es ja sehr praktisch finden, wenn mhwd-kernel die .preset.pacsave dateien automatisch mitlöscht, wenn man zb.

$ sudo mhwd-kernel -r linuxYZ

oder

$ sudo mhwd-kernel -i linuxYZ rmc

macht.

ich mache das auch immer handisch wenns nen neuen Kernel gibt,

mit:

updatedb
rm /etc/mkinitcpio.d/*.preset.pacsave

@pheiduck pacdiff maybe?
https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave#pacdiff

was genau meinst du mit updatedb?

@CK76 Das wird hierfür benötigt:

$ locate --existing --regex "\.pac(new|save)$"

Um die Datenbank zu aktualisieren.

@raguse bei mir findet pacdiff komischer Weise nur pacnew files muss ich mal ausprobieren ob die nach einem updatedb damit gefunden werden.

@pheiduck I noticed that pacdiff has some inconsistencies which I think come from using mhwd. Not sure though. I had .pacsave leftovers of removed kernels which I had to delete manually. It’s good to know that such tool exists and can also be used for automation, just in case.