:: Running pre-transaction hooks...
(1/2) Removing linux initcpios...
/usr/share/libalpm/hooks/60-mkinitcpio-remove.hook is ran, which in turn executes /usr/share/libalpm/scripts/mkinitcpio-remove.
So feel free to improve this process by modifying the script. Another option is having some kernel that doesn’t get touched by update. Or have an iso image in your grub.
Sure. But are you saying that that can only happen on arch/-based distros?
No this is not a problem of the distro itself. It is a problem of the update-process.
When you handle kernel-updates using the same methods as for every other package, you end in a process where even the use of several kernels lead to an easily breakable update.
When you think of the kernel and modules as of a very valuable resource, you need to take special care of them during the update.
For example you could make the update for kernels in an serial fashion.
Delete ONE kernel
and modules,
update them,
recreate initrd and grub
Then after this is completed (and synced) do the next kernel. This is by far not unbreakable, but it is better than now.
I think we can all agree that update process could be better. But can someone come up with an actual practical implementation that won’t require rewriting 10 other packages and changing who-knows-what? Just being realistic here.
mhwd-kernel is just a bash script that calls pacman.
You can write another script that does multiple pacman updates and uses --ignore <find whatever kernel and any other package that "depends" on it like headers, modules and whatnot> - you can probably just repurpose some of mhwd-kernel script.
Anyway, this is a lame solution and you need at least two kernels installed. So it’s easier to just install linux-mainline or any other linux kernel from AUR (beside kernels from repo) and then just update repo first and after AUR. This alone will ensure a working kernel. Simple.