Broke my Manjaro … did a stoopid thing! Need help!!

I forgot updates where installing and rebooted to fix a frozen window. Yes, I know … stoopid.

Now when I boot I get past the Grub countdown page and get the error:


error: premature end of file /boot/vmlinuz-4.14-x86_64.
error: you need to load the kernel first.

Press any key to continue.


Following the instructions I found here (OS problem: "premature end of file /boot/vmlinuz-4.14-x86_64") from eugen-b, I booted using my USB, chrooted and ran the commands.

I initially got an error when running manjaro-chroot-a but managed to fix it. I think it was a mounting issue.

But I still get errors when running mkinitcpio -P:


==> ERROR: invalid kernel specified: ‘/boot/vmlinuz-4.14-x86_64’


Same error with boot/vmlinuz-4.14-x86_64-fallback.

I also tried pacman -Syyu as mentioned further down that page. It gave me an error saying something like RESOURCE not found. Sorry, I didn’t get a screenshot so I’m trying to remember. But suffice it to say, it didn’t update anything.

Anything else I can do other than saving my dot files, wiping the drive and reinstalling?

Thanks.

We are probably going to need the exact error message to help you.

It is definitely possible to fix your system but if you are in a state where pacman doesn't work it may be quicker and easier to reinstall. Knowing the specific error message you received could help us determine that.

I’ll try to recreate and get a screenshot. I know pics are not the best choice. Any tips (other than typing) to show it?

Use web browser from the live USB to login to the site and copy paste it directly.

copy paste taking to long to figure out so I'll type the error:

:: Synchronizing package databases...
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
error: failed to update core (error invoking external downloader)
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
error: failed to update extra (error invoking external downloader)
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
error: failed to update community (error invoking external downloader)
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
/usr/bin/wget: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directory
error: failed to update multilib (error invoking external downloader)
error: failed to synchronize all databases

It looks like nettle has been updated but not wget.

You may be able to install the older version of nettle from your cache.

Try this:

ls /var/cache/pacman/pkg/nettle*  

Then install the second to most recent version with pacman -U, like this:

sudo pacman -U /var/cache/pacman/pkg/nettle-3.4.1-1-x86_64.pkg.tar.xz

EDIT: This has to be done from within the manjaro-chroot

1 Like

ls ... gave me:

/var/cache/pacman/pkg/nettle-3.4.1-1-x86_64.pkg.tar.zx /var/cache/pacman/pkg/nettle-3.5.1-1-x86_64.pkg.tar.xz

trying the sudo ... line now

If that works, try updating again.

It gave me the following error:

warning: database file for 'core' does not exist (use '-Sy' to download)

Same error for 'extra', 'community', 'multilib'. Then says error: 'var/...' : could not find or read package

Are you sure you were in the manjaro-chroot still?

Pretty sure. Once I did manjaro-chroot -a in terminal, it gave me a read terminal prompt saying [manjaro-i3 /]#

Still have it.

Sorry, just reread my comment. Should be a RED terminal prompt.

OK, well you don't have a pacman database that is concerning.

Try this:

pacman -Syy
pacman -U /var/cache/pacman/pkg/nettle-3.4.1-1-x86_64.pkg.tar.xz
pacman -Syu

pacman -Syy gave me the same error as I typed above (/usr/bin/wget ... libnettle.so.6)
pacman -U ,etc gave me warnings on core, etc. then a warning about downgrading package nettle then appeared to install nettle 3.4.1-1
pacman -Syu then gave me the error as with pacman -Syy but with libnettle.so.7

OK, there is likely some other package that depends on the newer version of nettle.

You can either go through your pacman log from the partial update and manually downgrade packages until it works again or you can reinstall. It just depends on your pain tolerance.

Ok. Thanks. I'll see what the pacman log looks like and decide. Probably just reinstall. Sounds less painful and my stupidity is already beyond my pain threshold!

Appreciate your help.

2 Likes

@Flaturtha have a look at timeshift, it is a life saver.

1 Like

Once I get set up again, I will!

Did you change anything in your /etc/pacman.conf, notably uncommenting one of the XferCommand lines?

Because pacman doesn't need wget to download the databases.
It can be used as an external downloader, but this is not the default.

I did, yes. The line that reads: XferCommand = /usr/bin/wget --passive-ftp -c -0 %o %u

Should it be commented out?