Power Loss during update and after restart, file /boot/vmlinuz-6.5-x86-64 not found

I lost power while updating Manjaro KDE (64 bit) on my PC. No UPS was connected.

When I restarted the system I got the message:


Error: file /boot/vmlinuz-6.5-x86-64 not found.
Error: you need to load the kernel first.
Press any key to continue…


None of the kernels load and the abovementioned message keeps coming back.

I can successfully use ‘manjaro-chroot’ to chroot into the above damaged installation.

The installation is encrypted but I have successfully chrooted into it. I don’t know how to fix it after chrooting into it however.

What to do?

Thanks

You’re not the first. :wink: Please follow this tutorial below. :wink:

2 Likes

That did not work for me Aragorn. Upon booting I see only ‘UEFI settings’ on boot screen grub menu, after following that procedure. The earlier list mentioning various installed kernels (on grub menu on booting) has gone.

I need a method to restore the kernels using chroot actually, so that I can boot.

In the chroot environment, try… :arrow_down:

mhwd-kernel -i linux61

Do this for every kernel you want installed, and then issue… :arrow_down:

mkinitcpio -P
update-grub
2 Likes

Then this

Depending on when exactly the process was interrupted you may need to also regenerate initcpio

sudo mkinitcpio -p linuxXXX (insert your kernel number like linux61)

or grub as next steps.

2 Likes

The uppercase -P option uses the presets, so there’s no need to specify a kernel version. :wink:

1 Like

Thanks, this worked.
However, mhwd-kernel -i linux65 didn’t work in chroot for some reason.

I have booted successfully into the damaged system now. And resinstalled linux65 using the standard procedure (system settings).

Thank you Teo, that combined command was useful.

1 Like

Sorry for restarting this discussion, but, it hasn’t worked out fully.

There were filesystem errors due to abrupt shutdown and although my damaged installation is working, it is not running commands like YAY and FLATPAK. Maybe even other commands, I have not checked.

YAY and Flatpak give errors. Do not work at all.

I think I need to run fsck to check for filesystem errors?

Or maybe something else? Journal recovery?

Thanks again.

On using fsck -n, using manjaro-chroot I get the following:


sh-5.1# fsck -n
fsck from util-linux 2.39.2
e2fsck 1.47.0 (5-Feb-2023)
Warning! /dev/mapper/luks-xxxxxxxxxxxxxxxxxxx9 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/mapper/luks-xxxxxxxxxxxxxxxxxxxx9: clean, 626415/6914048 files, 11269402/27654850 blocks
fsck.fat 4.2 (2021-01-31)
/dev/sdc1: 8 files, 121/76643 clusters


You should not run fsck on mounted stuff, so do it from live but exit from chroot.

1 Like

How could I run fsck in my situation? The damaged partition that needs fsck is a luks root partition.

I am not luks competent, i have no idea how it works there, but generally speaking filesystem check is done on an unmounted system. It even shows a big warning if you try to do it.
I would google a guide specifically for luks and fsck if i were you.

2 Likes

Open the container with cryptsetup or whatever tool one would normally use — disclaimer: I don’t use encryption so I’m not familiar with that — but do not mount it or chroot into it. Then, run fsck from the live session.

2 Likes

I did as discussed in this thread and ran fsck successfully from a live USB - but i still get lots of error messages in the damaged installation, which appear to be file system errors.

Is it possible to run fsck at boot soon after luks is opened but before the operating system loads?

Some error message examples:


ldconfig: File /usr/lib/libQt5DesignerComponents.so is empty, not checked.
ldconfig: /usr/lib/libnetsnmptrapd.so.40.1.0 is not an ELF file - it has the w
rong magic bytes at the start.

ldconfig: /usr/lib/libnetsnmpmibs.so is not an ELF file - it has the wrong mag
ic bytes at the start.

ldconfig: File /usr/lib/libQt5Designer.so.5 is empty, not checked.
ldconfig: File /usr/lib/libQt5Help.so.5 is empty, not checked.
ldconfig: File /usr/lib/libpyside6.abi3.so is empty, not checked.
ldconfig: File /usr/lib/libstd-3832a15f20d69b64.so is empty, not checked.
ldconfig: File /usr/lib/libQt5Designer.so.5.15 is empty, not checked.
ldconfig: File /usr/lib/libpyside6.abi3.so.6.5.2 is empty, not checked.
ldconfig: /usr/lib/libm17n-core.so is not an ELF file - it has the wrong magic
bytes at the start.

ldconfig: /usr/lib/libnetsnmptrapd.so.40 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: File /usr/lib/libQt5DesignerComponents.so.5 is empty, not checked.
ldconfig: File /usr/lib/libpyside6qml.abi3.so.6.5.2 is empty, not checked.
ldconfig: /usr/lib/libnetsnmphelpers.so.40 is not an ELF file - it has the wro
ng magic bytes at the start.

ldconfig: File /usr/lib/libshiboken6.abi3.so is empty, not checked.
ldconfig: /usr/lib/libnetsnmpagent.so.40.1.0 is not an ELF file - it has the w
rong magic bytes at the start.

ldconfig: /usr/lib/libnetsnmp.so is not an ELF file - it has the wrong magic b
ytes at the start.

ldconfig: /usr/lib/libm17n-flt.so.0.4.2 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libm17n.so.0.4.2 is not an ELF file - it has the wrong magi
c bytes at the start.

ldconfig: File /usr/lib/libshiboken6.abi3.so.6.5.2 is empty, not checked.
ldconfig: File /usr/lib/libpyside6qml.abi3.so.6.5 is empty, not checked.
ldconfig: File /usr/lib/libpyside6.abi3.so.6.5 is empty, not checked.
ldconfig: File /usr/lib/libpyside6qml.abi3.so is empty, not checked.
ldconfig: /usr/lib/libm17n-gui.so.0 is not an ELF file - it has the wrong magi
c bytes at the start.

ldconfig: /usr/lib/libnetsnmp.so.40.1.0 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libnetsnmphelpers.so is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: File /usr/lib/libtest-4267710c4664eb03.so is empty, not checked.
ldconfig: File /usr/lib/libqpdf.so.29 is empty, not checked.
ldconfig: /usr/lib/libsnmp.so is not an ELF file - it has the wrong magic byte
s at the start.

ldconfig: File /usr/lib/libOkular5Core.so.11.0.0 is empty, not checked.
ldconfig: /usr/lib/libsnmp.so.40 is not an ELF file - it has the wrong magic b
ytes at the start.

ldconfig: File /usr/lib/libQt5Help.so.5.15.10 is empty, not checked.
ldconfig: /usr/lib/libm17n-flt.so is not an ELF file - it has the wrong magic
bytes at the start.

ldconfig: /usr/lib/libnetsnmpmibs.so.40.1.0 is not an ELF file - it has the wr
ong magic bytes at the start.

ldconfig: File /usr/lib/libQt5Designer.so is empty, not checked.
ldconfig: /usr/lib/libsnmp.so.40.1.0 is not an ELF file - it has the wrong mag
ic bytes at the start.

ldconfig: /usr/lib/libnetsnmpmibs.so.40 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libnetsnmpagent.so.40 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libm17n-gui.so.0.4.2 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libnetsnmphelpers.so.40.1.0 is not an ELF file - it has the
wrong magic bytes at the start.

ldconfig: File /usr/lib/libre2.so.11.0.0 is empty, not checked.
ldconfig: /usr/lib/libm17n-core.so.0 is not an ELF file - it has the wrong mag
ic bytes at the start.

ldconfig: /usr/lib/libm17n-gui.so is not an ELF file - it has the wrong magic
bytes at the start.

ldconfig: File /usr/lib/libQt5DesignerComponents.so.5.15.10 is empty, not chec
ked.
ldconfig: File /usr/lib/libre2.so.11 is empty, not checked.
ldconfig: /usr/lib/libnetsnmptrapd.so is not an ELF file - it has the wrong ma
gic bytes at the start.

ldconfig: File /usr/lib/libQt5Help.so.5.15 is empty, not checked.
ldconfig: File /usr/lib/libqpdf.so.29.6.0 is empty, not checked.
ldconfig: File /usr/lib/libshiboken6.abi3.so.6.5 is empty, not checked.
ldconfig: File /usr/lib/libQt5Help.so is empty, not checked.
ldconfig: /usr/lib/libm17n.so is not an ELF file - it has the wrong magic byte
s at the start.

ldconfig: /usr/lib/libnetsnmpagent.so is not an ELF file - it has the wrong ma
gic bytes at the start.

ldconfig: File /usr/lib/libqpdf.so is empty, not checked.
ldconfig: File /usr/lib/libQt5DesignerComponents.so.5.15 is empty, not checked
.
ldconfig: File /usr/lib/libre2.so is empty, not checked.
ldconfig: File /usr/lib/libostree-1.so.1.0.0.old is empty, not checked.
ldconfig: File /usr/lib/libOkular5Core.so.11 is empty, not checked.
ldconfig: File /usr/lib/libOkular5Core.so is empty, not checked.
ldconfig: File /usr/lib/librustc_driver-392e30d67b5926f8.so is empty, not chec
ked.
ldconfig: /usr/lib/libm17n-core.so.0.4.2 is not an ELF file - it has the wrong
magic bytes at the start.

ldconfig: /usr/lib/libm17n-flt.so.0 is not an ELF file - it has the wrong magi
c bytes at the start.

ldconfig: File /usr/lib/libQt5Designer.so.5.15.10 is empty, not checked.
ldconfig: /usr/lib/libm17n.so.0 is not an ELF file - it has the wrong magic by
tes at the start.


It should already be doing that by default. But I’m guessing that your filesystem is so badly damaged that it couldn’t do the repairs. And it must be, if you still have filesystem errors after running an fsck from the live USB.

At this point, all I can advise is that you would reformat and reinstall, and then restore your backups — which I hope you do have… :face_with_raised_eyebrow:

If you don’t have a backup, @vikram72 then backup your data now.

Before deciding for a full re-installion I would at least try to just reinstall your packages from within chroot environment by:

sudo pacman-mirrors -f && sudo pacman -Syyuu --overwrite '*'
2 Likes

It didn’t overwrite said ‘nothing to do’. Did I miss anything? I didn’t update the mirrors, so I used:

sudo pacman -Syyuu --overwrite ‘*’

Why not just copying the command? I cannot check whether you used the right ` letter etc. Updating the mirrors data upfront might be helpful in your case.

1 Like

… is for downgrading. Don’t use that. Use -Syu for normal updates and -Syyu after refreshing the mirror list.

The downgrading would only adjust the package versions with the current repo status, it’s only downgrading if the installed packages are newer than the repo version. I don’t see a case this could be an issue…

2 Likes

You are correct, but I was thinking farther ahead than that.

Many people use -Syyuu or -Syuu because they read it somewhere and they’re blindly parroting what someone else wrote instead of reading the man page to see what those options do. And then they’re making it into a habit of always using those options, which makes it dangerous. :wink: