Skip to main content
Topic: problem with interrupted update? (Read 573 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

problem with interrupted update?

I took my laptop with me, but not the charger, so I knew I had a limited amount of working time.  When there was about 5 to 10 minutes left, KDE told me so, and offered to put the machine to sleep.  I said no, as I was in the middle of a pacman -Syu.  Unfortunately, KDE and I must have thought differently about the battery life left, and KDE proceeded to shut down the machine anyway.  On reboot, grub told me it couldn't find /boot/vmlinux-linux.  After much weeping and wailing and gnashing of teeth, I booted to a recent Artix iso copied to USB thumb drive and mounted the system.  (openrc, with entire / on one partition, ESP partition mounted to /boot/efi)  /boot had no files in it - no kernel, no initramfs.  A chroot and 'pacman -S linux' restored all the "missing" files, so I'm not looking for help - just for suggestions as to the probable cause.  I would have expected updating the linux package to replace those files in a way that wouldn't actually leave them missing if interrupted.  I don't particularly want to explicitly test this, but am I missing some more obvious reason (i.e., why is it my fault?) or should I file a bug against either the linux package or pacman itself?

Re: problem with interrupted update?

Reply #1
When the kernel updates (which is what happened here), there's a mkinitcpio hook at the end that regenerates the initramfs for the new kernel. Since your machine unexpectedly shutdown in the middle of the update, this last, vital step never occurred so grub wasn't able to find the initramfs for your kernel.

Re: problem with interrupted update?

Reply #2
This is why Debian apt updates take so long to unpack and install the packages in comparison. Everything is done to ensure as far as possible the system is left in a working state after an incomplete update. On a big update it takes an age! Disk IO is slow due to fsync'ing everything. Pacman updates are optimized more for speed. I think it would probably be seen more as a feature than a bug if you raised it, although you could if you liked of course, but check it hasn't been discussed before.

Re: problem with interrupted update?

Reply #3
@Dudemanguy: that's true, but the kernel itself was also missing, not just the initramfs.  I still haven't looked into whether this has already been reported, but I'll post back here if I find anything interesting.

 

Re: problem with interrupted update?

Reply #4
/boot/vmlinux-linux isn't actually installed by the linux package. It's installed by the alpm hook (either mkinitcpio or dracut).