kesboot icon indicating copy to clipboard operation
kesboot copied to clipboard

pacman uninstall hook missed kernel with prefix

Open zeners opened this issue 1 year ago • 1 comments

when uninstalling a kernel, the efi-var can't be found:

# mhwd-kernel -r linux67                                                                                                      ✔ 
...
:: Pre-transaction-Hooks werden gestartet …
(1/3) Removing linux initcpios...
(2/3) Updating EFI variables (remove)...
Can't find the builduser kernel in the EFI variables...
...

if i read the source correctly, "builduser" should be the name of the kernel to be removed?

zeners avatar Feb 25 '24 15:02 zeners

for successful kernel uninstall, i added 2 parts in main.sh:_remove_efi_hook: after _strings="${_strings%%/*}" added:

		local _version_backup
		_version_backup="$(echo "$_strings" | cut -d "." -f 1,2)"

and after _final="${_final#(}" added:

		if [ "$_final" == "builduser" ]; then
			_final="${_version_backup}-$(uname -m)"
		fi

i'm unsure thats going wrong, but it looks like the kernel doesn't contain the expected string

now i'm get:

(2/3) Updating EFI variables (remove)...
===> Removed 6.7-x86_64

zeners avatar Feb 25 '24 19:02 zeners