Can't update GRUB

Hi, there!

I feel like I am in deep trouble.

Once in a while i do “pacman -Syu” in order to update the system. I know… This should be done more often. Maybe daily.

And then everything has broken… all applications closed, and then I restarted my pc. Once it boot up I encountered the message:

"error: file `/timeshift-btrfs/snapshots/2023-12-10_01-25-13/@boot/vmlinuz-6.1-x86_64’ not found.
Loading Microcode & initramfs: amd-ucode.img initramfs-6.1-x86_64-fallback.img …
error: you need to load the kernel first. "

And then… Yes! I freaked out.

Loaded my LiveCD(or pendrive?) and did mount the efi partition(/dev/sda5), the root partition(/dev/nvme0n1p3), chrooted and tried:

update-grub

and also:

sudo grub-install --target=x86_64-efi --efi-directory=/boot /dev/sda

which game me: “Installing for x86_64-efi platform.
grub-install: error: failed to get canonical path of `overlay’.”

then i have tried also to do pacman -Syu:

pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
error: failed retrieving file 'multilib.db' from osmirror.org : Could not resolve host: osmirror.org
warning: too many errors from osmirror.org, skipping for the remainder of this transaction
error: failed retrieving file 'core.db' from osmirror.org : Could not resolve host: osmirror.org
error: failed retrieving file 'extra.db' from osmirror.org : Could not resolve host: osmirror.org
error: failed retrieving file 'community.db' from osmirror.org : Could not resolve host: osmirror.org
error: failed retrieving file 'multilib.db' from kibo.remi.lu : Could not resolve host: kibo.remi.lu
warning: too many errors from kibo.remi.lu, skipping for the remainder of this transaction
error: failed retrieving file 'core.db' from kibo.remi.lu : Could not resolve host: kibo.remi.lu
error: failed retrieving file 'extra.db' from kibo.remi.lu : Could not resolve host: kibo.remi.lu
error: failed retrieving file 'community.db' from kibo.remi.lu : Could not resolve host: kibo.remi.lu
:: Starting full system upgrade...
 there is nothing to do

Well, I dont what to do. Also worth mentioning the root partition is in BTRFS instead of ext4

# refresh the mirrors
sudo pacman-mirrors --geoip
sudo pacman -Syyuu

Thanks for the response!

after doing what you told me, i encountered this:

(1/3) Creating Timeshift snapshot before upgrade...
timeshift: error while loading shared libraries: libicuuc.so.73: cannot open shared object file: No such file or directory
Unable to run timeshift-autosnap! Please close Timeshift and try again. Script will now exit...
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

Another thing I have realized…
once I am chrooted into my /dev/nvme0n1p3 partition, i cant see all my files in the directories which i expected…

don’t know if I have corrupted/lost my data

Hi @pvpmartins,

Welp, you’ve already admitted to being a Bad Boy:

No. Just keep your eye on the Announcements for the Stable Updates.

I don’t know, ether. But it your data is encrypted, then, well, then don’t follow me any further. If it wasn’t read on.

The error you gave:

…makes me think you need to use pacman-static.

And:

The pinned comment and the PKGBUILD provides a way to directly download the binary, which can be used to reinstall pacman or to upgrade the entire system in case of partial upgrades.

So get that, and re-run the update to properly sync your system.

Sorry for the massive output:

[manjaro-gnome .ssh]#   sudo pacman-static -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (205) folks-0.15.7-1  freerdp-2:2.11.4-1  frei0r-plugins-2.3.2-2
               fwupd-1.9.11-1  geary-1:44.1-2  git-lfs-3.4.1-1  gjs-2:1.78.2-1
               gnome-maps-45.3-1  gnome-settings-daemon-45.1-1
               gnome-shell-1:45.3-1  gnome-shell-extension-dash-to-panel-60-1
               gnome-shell-extension-gtk4-desktop-icons-ng-1:70-1
               go-2:1.21.6-1  grub-2.12-3  gspell-1.12.2-2
               gst-editing-services-1.22.8-2  gst-libav-1.22.8-2
               gst-plugin-gtk-1.22.8-2  gst-plugins-bad-1.22.8-2
               gst-plugins-base-1.22.8-2  gst-plugins-good-1.22.8-2
               gst-plugins-ugly-1.22.8-2  gst-python-1.22.8-2
               gvfs-afc-1.52.2-1  gvfs-goa-1.52.2-1  gvfs-google-1.52.2-1
               gvfs-gphoto2-1.52.2-1  gvfs-mtp-1.52.2-1  gvfs-nfs-1.52.2-1
               gvfs-smb-1.52.2-1  imagemagick-7.1.1.26-1  inetutils-2.5-1
               intellij-idea-community-edition-4:2023.3.2-1  iproute2-6.7.0-1
               iputils-20231222-2  ipython-8.20.0-1  iw-6.7-1  jq-1.7.1-1
               js115-115.6.0-1  kauth5-5.113.0-1  kcoreaddons5-5.113.0-1
               kitemmodels5-5.113.0-1  kwindowsystem5-5.113.0-1
               lib32-icu-74.2-1  lib32-krb5-1.21.2-1  lib32-libdrm-2.4.119-1
               lib32-libxml2-2.12.3-1  lib32-mesa-1:23.3.3-1
               lib32-mesa-vdpau-1:23.3.3-1  lib32-openssl-1:3.2.0-1
               lib32-systemd-255.2-1  lib32-vulkan-icd-loader-1.3.274-1
               lib32-vulkan-intel-1:23.3.3-1  lib32-vulkan-radeon-1:23.3.3-1
               lib32-xcb-util-keysyms-0.4.1-1  libbpf-1.3.0-1  libbsd-0.11.8-1
               libcdr-0.1.7-7  libde265-1.0.15-1  libe-book-0.1.3-15
               libebml-1.4.5-1  libedataserverui4-3.50.3-1
               libexttextcat-3.4.7-1  libfdk-aac-2.0.3-1  libgedit-amtk-5.8.0-2
               libgnome-games-support-1.8.2-3  libheif-1.17.6-1
               libjcat-0.2.0-1  libluv-1.47.0_0-1  libmediainfo-23.11-2
               libmspub-0.1.4-15  libnbd-1.18.1-3  libqxp-0.0.2-11
               libreoffice-still-7.5.9-2  libsynctex-2023.66984-17
               libtraceevent-1:1.8.1-1  libva-mesa-driver-1:23.3.3-1
               libvisio-0.1.7-10  libwbclient-4.19.4-1  libzmf-0.0.2-15
               licenses-20231215-1  linux-firmware-20231211.f2e52a1c-1
               linux-firmware-whence-20231211.f2e52a1c-1  linux61-6.1.71-1
               linux61-headers-6.1.71-1  lmdb-0.9.31-1  lshw-B.02.20-1
               luajit-2.1.1702233742-1
               manjaro-gnome-extension-settings-20231213-3
               manjaro-gnome-settings-20240110-1  manjaro-release-23.1.3-1
               manjaro-settings-manager-0.5.7-21
               manjaro-settings-manager-notifier-0.5.7-21  memtest86+-7.00-1
               memtest86+-efi-7.00-1  mesa-vdpau-1:23.3.3-1
               mhwd-nvidia-545.29.06-2  miniupnpc-2.2.6-1  mkinitcpio-37.1-2
               mutter-45.3-1.0  ndctl-77-1  neovim-0.9.5-1  net-snmp-5.9.1-9
               netpbm-10.86.40-1  nodejs-21.5.0-1  oath-toolkit-2.6.10-1
               openresolv-3.13.2-2  osinfo-db-20231215-1  pacman-6.0.2-16
               pamac-gnome-integration-11.7.1-1  pamac-gtk-11.7.1-1
               passim-0.1.5-1  perl-http-cookies-6.11-1  php-8.2.14-1
               plymouth-22.02.122-16.2  poppler-24.01.0-1
               poppler-glib-24.01.0-1  postgresql-libs-16.1-4  ppp-2.5.0-3
               protobuf-c-1.5.0-1  python-aiosignal-1.3.1-5
               python-cssselect2-0.7.0-3  python-fastjsonschema-2.19.1-1
               python-filelock-3.13.1-1  python-frozenlist-1.4.1-1
               python-jaraco.text-3.12.0-1  python-pexpect-4.9.0-1
               python-pillow-10.2.0-1  python-pip-23.3.2-1
               python-prompt_toolkit-3.0.43-1  python-pydantic-2.5.3-1
               python-pydantic-core-1:2.14.6-1  python-regex-2023.12.25-1
               python-setuptools-1:69.0.3-1  python-traitlets-5.14.1-1
               python-trove-classifiers-2024.1.8-1
               python-typing_extensions-4.9.0-1  python-wcwidth-0.2.12-1
               python-wheel-0.42.0-1  python-yarl-1.9.4-1
               qemu-audio-spice-8.2.0-2  qemu-base-8.2.0-2
               qemu-block-curl-8.2.0-2  qemu-block-dmg-8.2.0-2
               qemu-block-nfs-8.2.0-2  qemu-block-ssh-8.2.0-2
               qemu-chardev-spice-8.2.0-2  qemu-common-8.2.0-2
               qemu-hw-display-qxl-8.2.0-2  qemu-hw-display-virtio-gpu-8.2.0-2
               qemu-hw-display-virtio-gpu-gl-8.2.0-2
               qemu-hw-display-virtio-gpu-pci-8.2.0-2
               qemu-hw-display-virtio-gpu-pci-gl-8.2.0-2
               qemu-hw-display-virtio-vga-8.2.0-2
               qemu-hw-display-virtio-vga-gl-8.2.0-2
               qemu-hw-s390x-virtio-gpu-ccw-8.2.0-2  qemu-hw-usb-host-8.2.0-2
               qemu-hw-usb-redirect-8.2.0-2  qemu-hw-usb-smartcard-8.2.0-2
               qemu-img-8.2.0-2  qemu-pr-helper-8.2.0-2
               qemu-system-x86-8.2.0-2  qemu-system-x86-firmware-8.2.0-2
               qemu-tools-8.2.0-2  qemu-ui-curses-8.2.0-2
               qemu-ui-opengl-8.2.0-2  qemu-ui-spice-app-8.2.0-2
               qemu-ui-spice-core-8.2.0-2  qpdf-11.7.0-1
               qt5-base-5.15.12+kde+r147-1  qt5-svg-5.15.12+kde+r6-1
               qt5-translations-5.15.12-1  qt5-x11extras-5.15.12-1
               qt6-base-6.6.1-3  ranger-1.9.3+719+g136416c7-1  raptor-2.0.16-4
               rygel-1:0.42.5-1  smbclient-4.19.4-1  sof-firmware-2023.12-1
               spectre-meltdown-checker-0.46+23+g0f2edb1-1  strongswan-5.9.13-1
               sudo-1.9.15.p5-1  systemd-sysvcompat-255.2-2  tepl-1:6.8.0-2
               timeshift-24.01.1-1  tinyxml2-10.0.0-1  tracker3-miners-3.6.2-2
               transmission-cli-4.0.5-1  virtiofsd-1.9.0-2  vlc-3.0.20-4
               vte-common-0.74.2-1  vte3-0.74.2-1  vulkan-headers-1:1.3.274-1
               vulkan-intel-1:23.3.3-1  vulkan-radeon-1:23.3.3-1
               webkit2gtk-2.42.4-1  webkitgtk-6.0-2.42.4-1  xapp-2.8.2-1
               xfsprogs-6.5.0-2  xmlsec-1.2.39-1  xorg-server-21.1.10-1
               xorg-server-common-21.1.10-1  xorg-xwayland-23.2.3-1
               zsh-syntax-highlighting-0.8.0-1  zxing-cpp-2.2.1-1

Total Installed Size:  4526.57 MiB
Net Upgrade Size:      -423.58 MiB

:: Proceed with installation? [Y/n] 
(205/205) checking keys in keyring                 [######################] 100%
(205/205) checking package integrity               [######################] 100%
(205/205) loading package files                    [######################] 100%
(205/205) checking for file conflicts              [######################] 100%
(205/205) checking available disk space            [######################] 100%
:: Running pre-transaction hooks...
(1/3) Creating Timeshift snapshot before upgrade...
timeshift: error while loading shared libraries: libicuuc.so.73: cannot open shared object file: No such file or directory
Unable to run timeshift-autosnap! Please close Timeshift and try again. Script will now exit...
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

I think you’ll need to remove the timeshift hook from /etc/pacman.d/hooks/:

mv /etc/pacman.d/hooks /etc/pacman.d/hooks.backup

Disable autosnap for the upgrade:

File: /etc/timeshift-autosnap.conf

skipAutosnap=true

That problem is the result of a partially upgrade.

1 Like

I don’t use BTRFS; nor do I know much about it.

However, I do know that BTRFS has sub-volumes that also need to be mounted in a chroot environment. If you failed to mount those, perhaps that’s the reason your files/directories were so elusive.

Cheers.

1 Like
  • Did you rollback with timeshift before ?
    This is no “normal” error message!
  • Do you have a special btrfs-subvolume layout ?
  • Did you try to rollback (to the point before the update) this time ?

(I do not use timeshift, but snapper) :footprints:

Yes, I have tried!

Yes! I have mounted like this:

mount -o subvol=@ /dev/nvme0n1p3 /mnt

Try with elevated privileges:

sudo mount -o subvol=@ /dev/nvme0n1p3 /mnt

(in a chroot environment you should already be root.)

And that’s where I bow out. Good luck.

Yes, that’s actually what I did.

Nice, pacman was able to install its packages (pacman -Syu).
Then, I tried

update-grub

and this is the output

update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
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.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
No snapshots found.
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Unmount /tmp/grub-btrfs.IdsPi2mhiv .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

This is also just an incorrect path.
You likely meant to point at /boot/efi

PS.
I didnt really read anything else except to check this was not mentioned.

PPS.
The install-grub script was created to avoid mistakes of this nature.

All I did in order to chroot was:

sudo mount -o subvol=@ /dev/nvme0n1p3 /mnt
manjaro-chroot /mnt /bin/bash

then I ran, with “skipAutosnap=true” as @megavolt told me:

pacman -Syu

everything updates fine but grub does not seem to work:

install-grub
WARNING: EFI directory not found! Grub couldn't be installed.

worth mentioning my EFI partition is on /dev/sda6, a different disk than nvme0n1p3

As @cscs pointed out, the EFI directory in the command is wrong. It should be “--efi-directory=/boot/efi”.

And you have to mount that too in the chroot.

Does your machine happen to be a Tuxedo, with Manjaro pre-installed?

It seems that Tuxedo installs using non-standard paths; specifically, --efi-directory=/boot points directly to $ESP/EFI; and bootloader-id=GRUB replaces bootloader-id=manjaro, resulting in a boot path of $ESP/EFI/GRUB (/boot/EFI/GRUB/grubx64.efi).

I expect this is convenient for Tuxedo when churning out multiple pre-installed distributions, however, this revelation has been an apparent contributor to at least one member’s grief in recent weeks, when attempting to update Grub.

2 Likes

I would recommend make your life easy as possible and simply download install-grub… a new script created by Philm.