Can't update system over chroot

yesterday i updated my kernel and after i rebooted my machine i couldn’t boot and i got this error
/boot/vmlinuz-5.2x86_64 not found
so I actually tried to boot with a different kernel but now I’m getting this error
failed to load kernel modules manjaro
followed by a list of software that my kernel failed to load

so I boot up a live manjaro iso on my USB
and mount chroot by doing manjaro-chroot -a then cd /mnt
and i whenever try to update system or kernel grub i get this error

error: failed to update multilib (invalid url for server)
error: failed to synchronize all databases
"plus a whole bunch of other lines i can't include here"

what should i do?!

1 Like

no need to do that … it serves no purpose

Make sure you have a working network connection before you enter the chroot.
Update the mirrorlist:
pacman-mirrors -c YourCountry (for instance)
run a full system update:
pacman -Syyu

Be careful - you are root when are in chroot!

 [manjaro-gnome /]# pacman-mirrors -c Australia 
::WARNING https://gitlab.manjaro.org '<urlopen error [Errno -2] Name or service not known>'
::WARNING https://wikipedia.org '<urlopen error [Errno -2] Name or service not known>'
::WARNING https://bitbucket.org '<urlopen error [Errno -2] Name or service not known>'
::INFO Internet connection appears to be down
::INFO Mirror ranking is not available
::INFO Mirror list is generated using random method
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Writing mirror list
::Australia       : https://manjaro.lucassymons.net/stable
::Australia       : https://mirror.aarnet.edu.au/pub/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
[manjaro-gnome /]# 

it says internet appears to be down however I’m sure my network is okay

also trying to run an update again

[manjaro-gnome /]# pacman -Syyu
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from manjaro.lucassymons.net : Could not resolve host: manjaro.lucassymons.net
error: failed retrieving file 'core.db' from mirror.aarnet.edu.au : Could not resolve host: mirror.aarnet.edu.au
error: failed to update core (invalid url for server)
error: failed retrieving file 'extra.db' from manjaro.lucassymons.net : Could not resolve host: manjaro.lucassymons.net
error: failed retrieving file 'extra.db' from mirror.aarnet.edu.au : Could not resolve host: mirror.aarnet.edu.au
error: failed to update extra (invalid url for server)
error: failed retrieving file 'community.db' from manjaro.lucassymons.net : Could not resolve host: manjaro.lucassymons.net
error: failed retrieving file 'community.db' from mirror.aarnet.edu.au : Could not resolve host: mirror.aarnet.edu.au
error: failed to update community (invalid url for server)
error: failed retrieving file 'multilib.db' from manjaro.lucassymons.net : Could not resolve host: manjaro.lucassymons.net
error: failed retrieving file 'multilib.db' from mirror.aarnet.edu.au : Could not resolve host: mirror.aarnet.edu.au
error: failed to update multilib (invalid url for server)
error: failed to synchronize all databases
[manjaro-gnome /]# 

Perhaps I should have said:
Make sure you have a working network connection before you run the command:
manjaro-chroot -a
If the live system you are using to chroot is not online - the chroot also will not be.

network is working fine before and after.
i did exit chroot now and tried again still the same issue

i also keep seeing (invalid url for server)

cat /etc/resolv.conf
should be the exact same in the live system as it is in the chroot
Compare them.
Somehow the network doesn’t seem to work inside the chroot environment.

What is the response you get when you type:
manjaro-chroot -a
to enter the chroot environment?

actually file wasn’t there in the chroot
so i just copied it from the live system.
and update worked thanks man.

The manjaro-chroot script should have done that, but apparently didn’t.
… easy fix, now you know where to look should it happen again
Cheers!

1 Like

Well even after the update i still get the same error on boot!


Any ideas?

Given the fact that the automatic chroot (manjaro-chroot) didn’t work as it should have
as /etc/resolv.conf wasn’t copied and thus the network inside the chroot didn’t work
I’d check whether the chroot actually was successful
and all the necessary partitions where actually mounted during the update process

compare the output of:

lsblk -f

with what has been mounted to /mnt
where your chroot resides

mount | grep mnt
(run these two commands from a separate terminal - not from within chroot)

What I see in the picture looks like a lot of failed snap packages - but I’m not sure as I don’t use them.
How did you do the update - with what tool?
pacman?
or
pamac?
and for the kernel(s)
mhwd-kernel?

I don’t think that pacman takes care of snaps - but pamac should.

At this point - if I where you - I’d not rely on the manjaro-chroot automatism, but do the chroot manually - to be sure that what needs to be done/mounted actually is done/mounted.

btw whenever i run manjaro-chroot -a

i get this

grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sda2]
→ mount: [/mnt]
[manjaro-gnome /]#

output of running lsblk -f

    NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
    loop0
         squash 4.0                                                    0   100% /run/miso/
    loop1
         squash 4.0                                                    0   100% /run/miso/
    loop2
         squash 4.0                                                    0   100% /run/miso/
    loop3
         squash 4.0                                                    0   100% /run/miso/
    sda                                                                         
    ├─sda1
    │    ntfs         Recovery
    │                       50ACBDD1ACBDB238                                    
    ├─sda2
    │    ext4   1.0         c0bf1a90-8f07-4da4-8627-60bb230b5fd9  185.2G    29% /mnt
    ├─sda3
    │    swap   1           519463b9-6559-496e-82d0-fd1ab5904582                
    ├─sda5
    │    ntfs               5870C8F370C8D940                                    
    ├─sda6
    │    ntfs               4476CD4276CD3608                                    
    └─sda7
         ntfs               028CD29C8CD28A15                                    
    sdb  iso966 Jolie MANJARO_GNOME_2021
    │                       2021-01-03-11-22-21-00                     0   100% /run/miso/
    ├─sdb1
    │    iso966 Jolie MANJARO_GNOME_2021
    │                       2021-01-03-11-22-21-00                              
    └─sdb2
         vfat   FAT12 MISO_EFI
                            784C-16A2                                           
    sr0   

output of running mount | grep mnt

mount | grep mnt                                                 ✔ 
/dev/sdb on /run/miso/bootmnt type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=default)
/dev/sda2 on /mnt type ext4 (rw,relatime)
proc on /mnt/proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /mnt/sys type sysfs (ro,nosuid,nodev,noexec,relatime)
udev on /mnt/dev type devtmpfs (rw,nosuid,relatime,size=4003252k,nr_inodes=1000813,mode=755,inode64)
devpts on /mnt/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
shm on /mnt/dev/shm type tmpfs (rw,nosuid,nodev,relatime,inode64)
run on /mnt/run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
tmp on /mnt/tmp type tmpfs (rw,nosuid,nodev,inode64)
overlay on /mnt/etc/resolv.conf type overlay (rw,relatime,lowerdir=/run/miso/sfs/livefs:/run/miso/sfs/mhwdfs:/run/miso/sfs/desktopfs:/run/miso/sfs/rootfs,upperdir=/run/miso/overlay_root/upper,workdir=/run/miso/overlay_root/work,index=off)

I updated with pacman.
and mhwd-kernel -i linux59

here’s the result of running mhwd-kernel -li

[manjaro-gnome /]# mhwd-kernel -li
Currently running: 5.9.16-1-MANJARO (linux59)
The following kernels are installed in your system:
error: could not open file /var/lib/pacman/local/papirus-icon-theme-20210201-1/desc: No such file or directory
   * linux414
   * linux510
   * linux54
   * linux59
error: could not open file /var/lib/pacman/local/papirus-icon-theme-20210201-1/desc: No such file or directory

Wow, I had this issue this very evening… booted from USB, chrooted, then searched for available kernels.

I figured I’d have a go at adding and removing kernels like this:

pacman -S linux59 && mkinitcpio -P && pacman -R linux54 && mkinitcpio -P && pacman -S linux54 && mkinitcpio -P && pacman -R linux59 && mkinitcpio -P 

Then update-grub then reboot. Selected 5.4 LTS kernel on reboot.
I’m back, did you miss me? :stuck_out_tongue:

1 Like

error: could not open file /var/lib/pacman/local/papirus-icon-theme-20210201-1/desc: No such file or directory
error: failed to prepare transaction (could not satisfy dependencies)
:: removing linux54 breaks dependency ‘linux54’ required by linux54-bbswitch
:: removing linux54 breaks dependency ‘linux54’ required by linux54-nvidia

/dev/sda2 seems to be your linux partition with everything, except swap, in it
/dev/sda3 is swap space

I updated with pacman.

And no errors?
What about that papirus-icon-theme which seems to produce a strange message?

I’d not remove anything, but perhaps reinstall each kernel
and then - because I don’t know whether
mhwd-kernel -i some_kernel
actually does this
I’d run
mkinitcpio -P

and - I was wrong and just changed this here:
run
update-grub

Actually i just changed grup options to show grup menu and avoid just default option. Then booted linux54 and it works now!
Can i stay on linux54!

1 Like

yes - use what works
as far as I know it is the current LTS version - should be good for a long time, except for security updates to it

Sounds great. Thanks a lot for you help man!

my pleasure - you did all the work :wink:

1 Like


even better news