Hi there, Dell Latitude 3540 laptop user with Manjaro XFCE installed. No EFI or multiboot. Here is how I fixed this system after the latest update froze during an app upgrade (kdenlive), requiring a power-off, which left it unable to boot. Hopefully this can help someone else. USB drive was sdb1 and 2, hard disk was sda1 and 2.
Initially at reboot:
grub-probe: error: cannot find a GRUB drive for /dev/sda1 Check your device.map. grub-probe: error: cannot find a GRUB drive for /dev/sda2 Check your device.map.
This was the result when trying to start any of the installed kernels.
As for what happened; the /boot/*.img and vmlinuz files were missing due to the interrupted update. (Dev note: Seems to me, a better fail-safe approach would be to not delete them, build new alongside them, and only move them when the update was finished.) Anyways perhaps
update-grub could be run to rebuild these images. But how to do that if the system can’t boot? Researching, seems like we need to chroot into sda1 from an external boot, and go from there.
I put the latest Manjaro XFCE on USB, booted that, and tried what I could find from here and elsewhere:
[manjaro@manjaro ~]$ manjaro-chroot -a 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/sda1] --> mount: [/mnt] [manjaro /]#
This chroot is different than others, perhaps due to the OS being a native, non-UEFI install with no other drives, partitions, or OSes installed. In any case, it did mount /sda1, and in this new prompt, we were directly in the sda1 filesystem. So going to / now was the root of the sda1 disk.
Ok now we’re cooking. Tried the first obvious thing:
[manjaro /]# os-prober 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/sdb2. Check your device.map.
Okay, well this is a red-herring because I don’t care about sdb (USB); the hard disk is sda.
Researching further I tried:
[manjaro /]# grub-mkconfig > /boot/grub/grub.conf Generating grub configuration file ... Found theme: /usr/share/grub/themes/manjaro/theme.txt 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. 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/sdb2. Check your device.map. Adding boot menu entry for UEFI Firmware Settings ... Found memtest86+ image: /boot/memtest86+/memtest.bin done
This was not what I’d hoped to see; it only found sdb again. The laptop was rebooted to see if this did anything useful, but only
UEFI Firmware Settings (useless for me) and
Memory Tester [memtest86+) were available.
grub-mkconfig, so if this wouldn’t rebuild the files, then this result is expected.
Failing this, I realized that the upgrade would have to be completed to rebuild those files. Booted from USB again,
manjaro-chroot -a back into sda1, and tried
pacman -Syu which reported it was unable to lock the database. Okay, kind-of expected since an ongoing update was interrupted, so it’s database was still locked. In extreme cases it may be necessary to delete the pacman lock file. So,
mv /var/lib/pacman/db.lck /var/lib/pacman/db.lck.old and try again:
pacman -Syu now wanted to perform the remainder of the GB-size upgrade, yes!
During the upgrade, it complained about the offending package (kdenlive) again but did complete this time, and it rebuilt the missing .img files. That package, for whatever reason, will have to be reinstalled later. It also noted several times that certain tasks were skipped due to the chroot.
exit the chroot, reboot, remove USB, and presto, things are working again.
Incidentally, doing a
pacman -Syu or octopi or whatever now, will show that there is nothing else that needs done (aside from reinstalling any offending packages.) I had the impression that some sort of follow-up should be necessary due to the skipped steps, but it seems to think everything is fine. Still, I did a fresh
update-grub just to be sure:
[me@mylaptop ~]$ sudo update-grub [sudo] password for me: Generating grub configuration file ... Found theme: /usr/share/grub/themes/manjaro/theme.txt Found linux image: /boot/vmlinuz-5.16-x86_64 Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.16-x86_64.img Found initrd fallback image: /boot/initramfs-5.16-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. Found memtest86+ image: /boot/memtest86+/memtest.bin done
Hope this is helpful. Thoughts welcome.