Vmlinuz not found; pacman host not resolved despite having network access

It all started with a failed update and pacman spewing several variants of “Could not resolve host: mirror.12c.abc”. I go online to try finding a solution only for my mouse to stop responding. In fact, none of my usb ports were active. Seeing the pile of issues I decided to restart.

Big mistake.

Upon booting again, I’m greeted with a message informing me that vmlinuz-linux is missing and that a kernel is required. I figured that meant reinstalling the linux kernel, so I booted using a live disk, mounted the appropriate partition to a rescue directory, chrooted and typed in pacman -S linux. Was greeted failed download and several variants of “Could not resolve host” errors. Pinging any sight gave me “Temporary failure in name resolution.” Using reflector to change mirrors gave the same result. I exited chroot, disabled ipv6, then reentered chroot. Still no dice.

So after more googling I find another solution : rebuilding grub.conf. Thing is there’s no grub.conf, no grub.cfg, and grub-probe fails to find the canonical path of my boot directory.

Now what?

It’s actually sudo pacman -S linux linux-headers
after that sudo grub-mkconfig -o /boot/grub/grub.cfg

Can you ping ping archlinux.org or 95.217.163.246 or other mirrors that you’re using?
It might be a dns problem (try 1.1.1.1 or 8.8.8.8), or your provider is filtering those mirrors, or else.

If it’s a dns problem type echo 'nameserver 1.1.1.1 | sudo tee -a /etc/resolv.conf (you can change dns to 8.8.8.8 or 8.8.4.4 to use the google ones) inside the chroot environment, if it doesn’t work copy /etc/resolv.conf from the main system inside the chroot enviroment, with the proper path

EDIT : mkinitcpio -p linux re-creates the vmlinuz

Maybe their mirror list also needs to be updated?
Looks like they tried this already.

I ran all commands as root (sudo su) to avoid typing sudo over and over.
pacman -S linux linux-header failed as before.

I got results from some of the urls:

— 95.217.163.246 ping statistics —
10 packets transmitted, 9 received, 10% packet loss, time 9016ms
rtt min/avg/max/mdev = 169.237/216.063/263.637/30.027 ms

— 1.1.1.1 ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 22.313/35.082/93.916/26.329 ms

— 8.8.8.8 ping statistics —
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 26.156/28.091/30.071/1.239

archlinux.org , arch.mirror.square-r00t.net, mirror.lty.me , arch.mirror.constant.com , mirror.hackingand.coffee , and every other mirror I tried returned

ping: xxx.xxx.xxx: Temporary failure in name resolution.

To make sure I pinged the same urls on a separate machine running Windows. Besides arch.mirror.square-r00t.net they all connected successfully, so that rules out my provider blocking them.

I also tried your suggestion to copy /etc/resolv.conf. It worked at first, then I go tthe following error:

install: cannot stat '/dev/stdin': No such file or directory
error: command failed to execute correctly
(4/4) Check if user should be informed about rebooting after certain system package upgrades.

Ran ls /dev while in chroot and there’s just a null. Seems like mounting /dev on /rescue/dev is not working either.

You have a really really high latency/ping lol.
anyway what does pacman -Q linux linux-headers output?

Also for chroot try to use this https://wiki.archlinux.org/title/chroot#Using_arch-chroot
if it’s endeavouros iso or some other arch based that you’re using

1 Like

It is difficult to say what the exact cause is - could you check if your system is using systemd-resolved

systemctl status systemd-resolved

If your system uses this service then your /etc/resolv.conf should be a symlink to /run/systemd/resolve/stub-resolv.conf as per Arch Wiki

You can use a physical /etc/resolv.conf but from your comment it seems there is another party modifying resolver. Best thing you can do is to backtrack your changes with relation to network connectivity - especially vpn services.

@Dev0ut Jesh, and that’s considered high speed in my area :sweat_smile:

Got the following from querying pacman:

linux 5.11.14.arch1-1
linux-headers 5.11.14.arch1-1

So the kernel is there, but for some reason grub can’t access it.

@Root Got the following:
systemd-resolved.service - Network Name Resolution
Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-08-19 04:01:47 UTC; 12h ago
Docs: man:systemd-resolved.service(8)
man:org.freedesktop.resolve1(5)
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 475 (systemd-resolve)
Status: “Processing requests…”
Tasks: 1 (limit: 11800)
Memory: 6.7M
CPU: 4.042s
CGroup: /system.slice/systemd-resolved.service
└─475 /usr/lib/systemd/systemd-resolved

Aug 19 04:01:47 archiso systemd[1]: Starting Network Name Resolution…
Aug 19 04:01:47 archiso systemd-resolved[475]: Positive Trust Anchors:
Aug 19 04:01:47 archiso systemd-resolved[475]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Aug 19 04:01:47 archiso systemd-resolved[475]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in->
Aug 19 04:01:47 archiso systemd-resolved[475]: Using system hostname ‘archiso’.
Aug 19 04:01:47 archiso systemd[1]: Started Network Name Resolution.
Aug 19 04:02:10 archiso systemd-resolved[475]: Switching to fallback DNS server 1.1.1.1.
Aug 19 04:05:22 archiso systemd-resolved[475]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 192.168.0.1.

I don’t think I made any changes network-wise beyond connecting to my router via gui. Don’t use a vpn either.

Looks like it was “ages” ago ( according to Arch’s Rolling Calendar) that you updated your system. Linux 5.11 was EOL in May or thereabout. Things can break if a system hasn’t been updated for such a long time. Perhaps there might be a fix but wait for the arrival of the boys with big guns to troubleshoot it for you.

Try to sudo mkinitcpio -p linux and sudo grub-mkconfig -o /boot/grub/grub.cfg in chroot, after that try to boot your system

1 Like

grub-mkconfig ran fine. mkinincpio on the other hand…

/usr/bin/mkinitcpio: line 268: /etc/mkinitcpio.d/linux.preset: No such file or directory
==> ERROR: Failed to load preset: /etc/mkinitcpio.d/linux.preset'

So I tried copying the one from the livedisk and…

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'

Generally means either linux isn’t installed (or never was) or isn’t installed correctly.

Reinstall it, or mkinitcpio -P to trigger for all installed kernels.

Whatever “failed” in the first place could be causing other issues, so you might still want to consider reinstalling given how old the system was you’re updating.

4 Likes

Given that it appears to be a live iso you are providing the info from and given the multitude of attempts you have made to solve this - you appear to be running in circles - the infamous xy problem.

Bite the bullet and reinstall the system - after a proper backup of important documents and files.

Welp, it’s a good thing I back up everything on a regular basis. Thanks everyone for trying.