Error: unknown filesystem & Error: Smybol 'grub_calloc' not found after Windows Update on Dual Boot

I run Manjaro parallel to Windows 10 on my laptop. Yesterday I had to use Windows for the first time in month and decided (against better judgement) to let it do its updates on shutdown. When I started my laptop this morning I got the following error:

Error: unknown filesystem.
Entering rescue mode... 

I ran into this issue some years back and remembered a tutorial on youtube had helped me back then, so I typed the error in and after some research tried the following in the Grub Rescue mode:

ls
ls (hd0,gpt6)/
set prefix=(hd0,gpt6)/boot/grub
insmod normal
normal

That worked fine and I could boot into my Manjaro without any trouble. The tutorial went on to explain, that Grub needed to be updated after that, which appeared to make sense, so in Manjaro I entered the following in the console:

sudo update-grub
sudo grub-install /dev/sda
Installation finished. No error reported.

This was basically what was to be expected according to the tutorial. However, when I rebooted, I got the following error message again:

Error: unknown filesystem.
Entering recue mode...

So I tried to repeat the steps above, but when reaching insmod normal I got the new error:

Error: Smybol 'grub_calloc' not found

Since then I tried to figure out, what is wrong. Apparently, my system uses UEFI and not BIOS, which appears to be the cause of trouble.

I tried following the steps indicated in the Manjaro-Wiki for UEFI-Installation but I did not get very far with that, since I appear to have to EFI-Partitions in my table (see table printout here).

I think it should be /dev/sda2, but I apparently can not install into it, to install the bootloader again, I get the following output:

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
x86_64-efi will be installed to your platform.
Installation finished. No error occured.
[manjaro@manjaro boot]$ sudo update-grub
/usr/bin/grub-probe: grub-probe: error: failed to get canonical path of >>overlay<<.

Now I have no clue how to proceed from here. I tried various solutions presented online (e.g. this one or this one) but they either deal with other distros or not with UEFI. Any advise would be very welcome. Thanks for your time and patience.

Hello @cfvintar :wink:

That means you didn’t chroot before running this command. " >>overlay<<" is an indicator for the live session, because it uses the overlayfs. So what you have actually done is installing grub on the live session.

Hello @megavolt
thanks for the quick reply. This must have eluded me somehow. Anyway I tried manjaro-chroot to /boot, but got the following:

[manjaro@manjaro /]$ sudo manjaro-chroot /boot
mount: /boot/proc: mount point does not exist.
==> ERROR: failed to setup API filesystems in chroot /boot

Since I did not get this I looked up the help for manjaro-chroot and tried ‘mandjaro-chroot -a’, which appeared to work:

[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/sda6]
 --> mount: [/mnt]
 --> mount: [/mnt/home]
 --> mount: [/mnt/boot/efi]

Since /dev/sdb1 appears to be the USB-Live-Stick, that warning seems to be ok. I tried to install Grub again as follows:

[manjaro /]# sudo 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 /]# sudo update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
It's 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/sdb1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

This should do the trick, right?

well this is wrong… you need to mount all local directories to your live session. For example to /mnt and then run manjaro-chroot /bin/bash /mnt. So without mounting this command is useless.

yes looks good.

Unfortunately it did not help. The error is still the same.

Error: unknown filesystem.
Entering recue mode...
ls
ls (hd0,gpt6)/
set prefix=(hd0,gpt6)/boot/grub
insmod normal
Error: Smybol 'grub_calloc' not found

Could it be, that the bootloader is not in the manjaro partition?

(hd0,gpt6) should be /dev/sda6

Could you post:

sudo parted -l
lsblk -f
efibootmgr -v
cat /etc/fstab

Thanks for the replies. I asked the question at a local Linux User Group meeting yesterday and the guys there figured out, where the problem was. Right now I can boot into Manjaro from my SSD but not into Windows.

But first things first:

@megavolt

Yes I did. I think this is definitely what is causing the second part of the error (the major problem in this case). With my attempt to fix the problem I actually made it worse in this case.

[xy@xy-tp ~]$ sudo ls -R /boot | grep "/boot"
[sudo] password for xy

[quote="megavolt, post:8, topic:69605"]
`ls -R /boot`
[/quote]

: 
/boot:
/boot/efi:
/boot/efi/EFI:
/boot/efi/EFI/Boot:
/boot/efi/EFI/Manjaro:
/boot/efi/EFI/Microsoft:
/boot/efi/EFI/Microsoft/Boot:
/boot/efi/EFI/Microsoft/Boot/bg-BG:
/boot/efi/EFI/Microsoft/Boot/cs-CZ:
/boot/efi/EFI/Microsoft/Boot/da-DK:
/boot/efi/EFI/Microsoft/Boot/de-DE:
/boot/efi/EFI/Microsoft/Boot/el-GR:
/boot/efi/EFI/Microsoft/Boot/en-GB:
/boot/efi/EFI/Microsoft/Boot/en-US:
/boot/efi/EFI/Microsoft/Boot/es-ES:
/boot/efi/EFI/Microsoft/Boot/es-MX:
/boot/efi/EFI/Microsoft/Boot/et-EE:
/boot/efi/EFI/Microsoft/Boot/fi-FI:
/boot/efi/EFI/Microsoft/Boot/Fonts:
/boot/efi/EFI/Microsoft/Boot/fr-CA:
/boot/efi/EFI/Microsoft/Boot/fr-FR:
/boot/efi/EFI/Microsoft/Boot/hr-HR:
/boot/efi/EFI/Microsoft/Boot/hu-HU:
/boot/efi/EFI/Microsoft/Boot/it-IT:
/boot/efi/EFI/Microsoft/Boot/ja-JP:
/boot/efi/EFI/Microsoft/Boot/ko-KR:
/boot/efi/EFI/Microsoft/Boot/lt-LT:
/boot/efi/EFI/Microsoft/Boot/lv-LV:
/boot/efi/EFI/Microsoft/Boot/nb-NO:
/boot/efi/EFI/Microsoft/Boot/nl-NL:
/boot/efi/EFI/Microsoft/Boot/pl-PL:
/boot/efi/EFI/Microsoft/Boot/pt-BR:
/boot/efi/EFI/Microsoft/Boot/pt-PT:
/boot/efi/EFI/Microsoft/Boot/qps-ploc:
/boot/efi/EFI/Microsoft/Boot/Resources:
/boot/efi/EFI/Microsoft/Boot/Resources/de-DE:
/boot/efi/EFI/Microsoft/Boot/ro-RO:
/boot/efi/EFI/Microsoft/Boot/ru-RU:
/boot/efi/EFI/Microsoft/Boot/sk-SK:
/boot/efi/EFI/Microsoft/Boot/sl-SI:
/boot/efi/EFI/Microsoft/Boot/sr-Latn-RS:
/boot/efi/EFI/Microsoft/Boot/sv-SE:
/boot/efi/EFI/Microsoft/Boot/tr-TR:
/boot/efi/EFI/Microsoft/Boot/uk-UA:
/boot/efi/EFI/Microsoft/Boot/zh-CN:
/boot/efi/EFI/Microsoft/Boot/zh-TW:
/boot/efi/EFI/Microsoft/Recovery:
/boot/efi/grub:
/boot/efi/grub/fonts:
/boot/efi/grub/locale:
/boot/efi/grub/themes:
/boot/efi/grub/themes/starfield:
/boot/efi/grub/x86_64-efi:
/boot/grub:
/boot/grub/fonts:
/boot/grub/locale:
/boot/grub/themes:
/boot/grub/themes/starfield:
/boot/grub/x86_64-efi:
/boot/memtest86+:

The output of ls -R /boot is ridiculously long. The post get’s impossible to read from that. Is there a place for exchanging such output on the board?

@El_Brujo
Thanks for the hint. I was able to run this from the live USB as using chroot. This is exactly what we did in the end yesterday. This command gives the following output:

[xy@xy-tp ~]$ efibootmgr -v
BootCurrent: 0014
Timeout: 2 seconds
BootOrder: 0014,000C,0009,0013,0007,0008,000A,000B,000D,0012
Boot0000  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0001  Boot Menu     FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0002  Diagnostic Splash Screen      FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0003  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0004  Startup Interrupt Menu        FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0005  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0006  MEBx Hot Key  FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0007* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0008* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0009* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot000A* ATA HDD1      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot000B* ATA HDD2      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f602)
Boot000C* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot000D* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot000E* IDER BOOT CDROM       PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,1,0)
Boot000F* IDER BOOT Floppy      PciRoot(0x0)/Pci(0x16,0x2)/Ata(0,0,0)
Boot0010* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0011* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0012* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0013* Windows Boot Manager  HD(2,GPT,0653fff7-83d2-4359-9e2d-3687a8fc6520,0x40800,0x32000)/File(\EFI\ubuntu\grubx64.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0014* manjaro       HD(2,GPT,a48b78e3-505e-4be0-ab61-74889efda796,0x109000,0x32000)/File(\EFI\manjaro\grubx64.efi)

As you can see, the Boot0013 should be the Windows Boot Manager, but for some reason it sends me to a Ubuntu/grubx64.efi. This could be a remnant from an old Ubuntu-Installation, that I used to have as dual boot next to Windows, before I switched to Manjaro. It could also be an old bug in the EFI.

We fixed it quick and dirty by overwriting the Windows Boot.efi with the Grub.efi from Manjaro doing the following:

[manjaro]# ls /boot/efi
EFI  grub
[manjaro EFI]# ls /boot/efi/EFI
Boot  Manjaro Microsoft
[manjaro EFI]# ls -l Boot
total 132
-rwxr-xr-x 1 root root 135168 Dec 30  2019 bootx64.efi
[manjaro EFI]# mv Boot/bootx64.efi Boot/bootx64.efi.backup
[manjaro EFI]# cp Manjaro/grubx64.efi Boot/bootx64.efi

It doesn’t really solve the problem as such, but now I can at least work without the USB Live Stick. I think I will have to fix the Bootmanager from Windows, right?

Seems you are on a live session… you need to chroot before running these commands:

manjaro-chroot -a

But however…

This seems to be your root partition with the boot files:

And that your /home ?

/etc/fstab could say more.

Btw… you installed grub with

as BIOS, since it write this way a MBR to the disk (but GPT does not support this), therefore it comes to that error:

Because it searches like it would be on a BIOS setup.

Could you also show what is in your boot folder:

ls -R /boot | grep "/boot"
ls -R /boot
1 Like

@cfvintar Just curious if you were able to run that command.

I would add to what @megavolt said, If your laptop is actually running on UEFI mode, the best practice is to have a separate boot partition for Manjaro. It should have the boot and esp flags enabled, and should be formated as FAT32.

That way, every time Windows 10 updates your GRUB files won’t be affected as they will be on their own partition. Also, you would be able to boot Manjaro and Windows separately from the UEFI boot menu.

This is the reason why efibootmgr becomes relevant. UEFI won’t be able to boot from a Linux native (EXT) partition.

Hm. Somehow my answer got put above the question. See above.

Because you edit your post :laughing:

Anyway… If it works, good for you :wink:

If you are able to boot into Manjaro from your SSD, I would check that the line below is present on your /etc/default/grub

"GRUB_DISABLE_OS_PROBER=false"

If the line above is not present, go ahead adding it. Then, update your grub configuration with:

sudo update-grub

See if that adds an entry on GRUB’s boot menu for Windows and try booting into Windows from there.

If the above works, I recommend to delete the entry 0013 from efibootmgr

sudo efibootmgr -b 13 -B

Finally, check again that efibootmgr defaults to Manjaro (check the man page for this)

Hopefully that does the trick :+1:

The line is present.

At the Moment I don’t get the GRUB Boot Menu at al. The computer boots straight into Manjaro.

Sorry, I’m afraid I was not clear enough.

Did you update the grub configuration?
What happens if you do that?

[xy@xy-tp ~]$ sudo update-grub
[sudo] password for xy: 
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
It's output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (21.0.4) on /dev/sda6
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
done

Looks good so far. Let me reboot and see what happens.

On boot I got my normal Grub-Start-Screen again, so that looked very promising. I could boot into Manjaro without any problem, than I tried the same with Windows…

Windows went into its Recovery Mode without any option to stop that, than it showed “System changes have to be undone” or something for a while, went black and rebooted.

Afterwards I got no Grub-Screen and no OS, just the same error as before:

Error: unknown filesystem.
Entering rescue mode...

Oddly enough, this time ls only recognized one of the partitions file systems, in this case the one with my user data but not the one holding Manjaro. So for now I rebooted from the stick again.

It looks to me like some Windows Update seriously messed up the EFI or something else. Might be best to reinstall Windows. Any thoughts?

Unfortunately, such issues are likely to happen when you share the same EFI partition for both Windows and Manjaro (or any Linux distribution).

I think this is a good opportunity for reinstalling both systems to correct your partition layout. Of course, you might want to take a backup of all your data before doing that.

Personally, I prefer to install Windows first and then leave unassigned disk space for Manjaro installation.

When reinstalling Manjaro, it’s always best to do manual partitioning. Just make sure that you create a separate EFI partition for Manjaro and set up your /boot/efi mount point there.
I think Manjaro’s User Guide has a good explanation for doing this.

Good luck!

Thanks for the help and explanations. I will probably do this. I just wonder, why this worked perfectly for more than two years. I actually did install Windows first and then did a manual partition, just as you said. Well, you live and learn (hopefully).