Pacman/pamac not working from live boot after interrupted update

Update
I was able to update with pacman -Syyu and everything looked fine. The only package I had to overwrite was systemd-libs. I also did update-grub, as instructed on the original post. This had some warnings (I can run the command again if needed) but it also finished.
After rebooting, grub was completely gone, and I was met with a completely black screen while the fans were spinning up. I left it for about 5 minutes and nothing happened, also tried to log into tty to see if anything worked but it was unresponsive. I had to go into BIOS and change the boot order manually to boot back into either windows or the live manjaro boot from usb, both of which still work fine. If I choose to boot Manjaro from the BIOS I get the black screen.

What can I do to investigate? Thanks again for the help and patience.

How did you know?

Anyway, I would restore the boot loader:

Maybe I phrased it wrong out of ignorance, what I meant is that the menu prompting whether to boot Manjaro or windows wasn’t there anymore. Is there some way I can check the state of grub to provide more information?

Hi, here’s another update. I followed the steps at the link you sent, basically boot into live mode, enter su environment and then chroot with manjaro-chroot -a, then run the various commands. Everything finished properly, besides the last part, e.g. install-grub. Running this results in

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

This to me is pretty strange. Whenever I chroot, I see

==> Mounting (ManjaroLinux) [/dev/nvme0n1p7]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]

which would suggest otherwise. Also, ls /sys/firmware/efi returns a filled folder:

ls /sys/firmware/efi
config_table  efivars  esrt  fw_platform_size  fw_vendor  mok-variables  runtime  runtime-map  systab

both inside and outside chroot. I also tried rebooting into the original Manjaro from the BIOS after running the other commands and I still get a completely black unresponsive screen. Sorry to keep bothering, but how can I debug this? Thanks again for all the help!

Also just to clarify, is there a specific place from where I should be calling these commands? For this I tried both in the root and under /mnt, with the same results.

Something else I just remembered and tried which I think is worth mentioning. When the update initially crashed, I was updating with pamac update, not pacman. If I try to run it again within chroot, it fetches all the packages, but then immediately crashes as soon as the update starts:

Edit build files : [e] 
Apply transaction ? [e/y/N] y

Building docker-desktop...
[manjaro /]# 

I couldn’t find a way to make the command verbose in order to see if there is some error being reported. Should I also be updating these one by one with --overwrite?

docker-desktop is an AUR package

To update repository packages and refresh databases similar to pacman -Syyu --overwrite

pamac update --no-aur --force-refresh --overwrite

Thanks, with this the pamac update finished successfully. However, I still have the grub issue, and the system still boots to a black screen when I select manjaro from the BIOS.

Also when trying to pacman -Syu grub, I get

(2/3) Installing Grub to MBR/EFI
WARNING: EFI directory not found! Grub couldn't be installed.

even if, as I stated in one of my previous posts, the efi directory seems to be mounted properly. How can I try to fix that?

grub-install executes fine

Installing for x86_64-efi platform.
Installation finished. No error reported.

but nothing changes when booting the old system. The other commands also still fail. I also saw this post about Ventoy possibly being the issue. I’m using 1.0.99 so the error described there shouldn’t apply. I did initially boot with normal mode and only later switched to grub2, so I’m not sure if that makes a difference.

The boot order in the BIOS is fine, I’m booting from there directly into Manjaro and I get the black screen.

Did you see this?
Did you check this?
Did you fix this?

In a standard Manjaro installation, the efi directory is:
/boot/efi/EFI

here is how it looks on my system:
ls -la /boot/
total 153864
drwxr-xr-x  5 root root      4096 15. Aug 16:08 .
drwxr-xr-x 17 root root      4096 13. Mai 13:17 ..
drwx------  3 root root      4096  1. Jan 1970  efi
drwxr-xr-x  6 root root      4096 15. Aug 16:09 grub
-rw-------  1 root root 119872613 15. Aug 16:09 initramfs-6.9-x86_64-fallback.img
-rw-------  1 root root  16173276 15. Aug 16:08 initramfs-6.9-x86_64.img
-rw-r--r--  1 root root   8116224  1. Jun 02:46 intel-ucode.img
-rw-r--r--  1 root root        21 27. Jul 15:07 linux69-x86_64.kver
drwxr-xr-x  2 root root      4096 13. Mai 13:14 memtest86+
-rw-r--r--  1 root root  13357568 15. Aug 16:07 vmlinuz-6.9-x86_6
ls -la /boot/efi/
total 12
drwx------ 3 root root 4096  1. Jan 1970  .
drwxr-xr-x 5 root root 4096 15. Aug 16:08 ..
drwx------ 4 root root 4096  4. Jun 22:54 EFI
ls -la /boot/efi/EFI/
total 16
drwx------ 4 root root 4096  4. Jun 22:54 .
drwx------ 3 root root 4096  1. Jan 1970  ..
drwx------ 2 root root 4096  4. Jun 22:54 boot
drwx------ 2 root root 4096  4. Jun 22:54 Manjaro

if your system was indeed installed in EFI mode
You keep talking about BIOS - in Bios mode it is different - and no EFI partition is needed.

cat /etc/fstab
should tell you whether you should have an efi partition

Here is how to install Grub.
(not just: grub-install …)

Install-grub: a new way to keep your EFI/MBR in-sync with grub package

when updating the grub package you’re actually only update GRUB partly. This also creates some issues with your system if an older grub got installed but doesn’t match configurations and scripts. This script fixes most of our installation cases

I did see that, I was asking how to fix it because I don’t really know how :sweat_smile:
As I said earlier I’m pretty new to this so there’s a lot that I can’t interpret myself, which is why I’m asking for help.

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=2ADE-507B                            /boot/efi      vfat    umask=0077 0 2
UUID=c0382431-3b04-4e3b-82d0-8eec3d9f6e2c /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

I did follow the steps you sent to reinstall GRUB as stated earlier, and I get stuck at pacman -Syu grub specifically because it fails due to the same error.
I also tried install-grub, and it fails due to the same error.

create the directory would be my answer - if it indeed isn’t there
check first
It likely failed because you didn’t use the full command - just: install-grub won’t do the job
you have the reference in my last post
the link to the wiki explaining how to install grub as well

Everything seems to be there:

outputs
ls -la /boot/
total 1365106
drwxr-xr-x  5 root root      4096 Aug 20 17:51 .
drwxr-xr-x 17 root root      4096 Aug 20 17:43 ..
drwxr-xr-x  4 root root      2048 Jan  1  1970 efi
drwxr-xr-x  6 root root      4096 Aug 20 17:52 grub
-rw-------  1 root root 146360307 Aug 20 17:50 initramfs-5.15-x86_64-fallback.img
-rw-------  1 root root 105149603 Aug 20 17:49 initramfs-5.15-x86_64.img
-rw-------  1 root root 162070553 Aug 20 17:50 initramfs-6.1-x86_64-fallback.img
-rw-------  1 root root 108029932 Aug 20 17:50 initramfs-6.1-x86_64.img
-rw-------  1 root root 161174559 Aug 20 17:51 initramfs-6.6-x86_64-fallback.img
-rw-------  1 root root 109542948 Aug 20 17:50 initramfs-6.6-x86_64.img
-rw-------  1 root root 113055727 Aug 20 17:51 initramfs-6.8-x86_64-fallback.img
-rw-------  1 root root  59744761 Aug 20 17:51 initramfs-6.8-x86_64.img
-rw-------  1 root root 208223119 Aug 20 17:51 initramfs-6.9-x86_64-fallback.img
-rw-------  1 root root 154196905 Aug 20 17:51 initramfs-6.9-x86_64.img
-rw-r--r--  1 root root   8126464 Aug 15 16:05 intel-ucode.img
-rw-r--r--  1 root root        23 Aug  7 17:38 linux515-x86_64.kver
-rw-r--r--  1 root root        22 Aug 14 18:50 linux61-x86_64.kver
-rw-r--r--  1 root root        21 Aug 14 18:50 linux66-x86_64.kver
-rw-r--r--  1 root root        21 Jun 10 11:13 linux68-x86_64.kver
-rw-r--r--  1 root root        21 Aug  7 17:38 linux69-x86_64.kver
drwxr-xr-x  2 root root      4096 Aug 20 17:45 memtest86+
-rw-r--r--  1 root root  10916352 Aug 20 17:49 vmlinuz-5.15-x86_64
-rw-r--r--  1 root root  11715072 Aug 20 17:49 vmlinuz-6.1-x86_64
-rw-r--r--  1 root root  13025792 Aug 20 17:49 vmlinuz-6.6-x86_64
-rw-r--r--  1 root root  13070848 Jun 10 22:07 vmlinuz-6.8-x86_64
-rw-r--r--  1 root root  13357568 Aug 20 17:49 vmlinuz-6.9-x86_64
ls -la /boot/efi 
total 10
drwxr-xr-x 4 root root 2048 Jan  1  1970  .
drwxr-xr-x 5 root root 4096 Aug 20 17:51  ..
drwxr-xr-x 6 root root 2048 Aug 20 16:32  EFI
drwxr-xr-x 2 root root 2048 Apr 23  2022 'System Volume Information'
ls -la /boot/efi/EFI
total 12
drwxr-xr-x 6 root root 2048 Aug 20 16:32 .
drwxr-xr-x 4 root root 2048 Jan  1  1970 ..
drwxr-xr-x 2 root root 2048 Apr 23  2022 Boot
drwxr-xr-x 2 root root 2048 May 12  2022 Manjaro
drwxr-xr-x 4 root root 2048 Apr 23  2022 Microsoft
drwxr-xr-x 6 root root 2048 Aug 20 16:32 dell

re-read my last post - I added to it

Yes. As I said earlier, pacman -Syu grub fails, which is where I stopped. If I continue, grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy finishes properly, and then I get

grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.9-x86_64.img
Found initrd fallback image: /boot/initramfs-6.9-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.8-x86_64.img
Found initrd fallback image: /boot/initramfs-6.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-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.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
Adding boot menu entry for UEFI Firmware Settings ...
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

Root filesystem isn’t btrfs I’m assuming this is not good? :sweat_smile:

You did?
Did not see that - it seems to be installed though.

The command you apparently used is definitely not correct:

That is not the proper command to install in an EFI system.
Read the wiki - link is there.

My bad - that was a misclick on my part. With grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck and later grub-mkconfig -o /boot/grub/grub.cfg I get fundamentally the same output:

[manjaro /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.
[manjaro /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.9-x86_64.img
Found initrd fallback image: /boot/initramfs-6.9-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.8-x86_64.img
Found initrd fallback image: /boot/initramfs-6.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.6-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.6-x86_64.img
Found initrd fallback image: /boot/initramfs-6.6-x86_64-fallback.img
Found linux image: /boot/vmlinuz-6.1-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-6.1-x86_64.img
Found initrd fallback image: /boot/initramfs-6.1-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-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.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
/etc/udev/udev.conf:9: Unknown key 'event_timeout', ignoring.
Adding boot menu entry for UEFI Firmware Settings ...
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

It looks o.k. to me.

Thanks! I can confirm that after rebooting now the system loads fine. I appreciate all the help and for bearing with me :smiley: