Unable to boot - error: symbol 'grub_alloc' not found

Hi guys/girls, I’m facing the same problem with this thread: Unable to boot - error: symbol `grub_alloc’ not found though mine was triggered by an attempt of mine to unsuccessfully boot from a live USB. The live USB wouldn’t boot so I was trying all the available boot options in UEFI, legacy, UEFI with CSM, UEFI, boot priorities to no avail. After a restart with the previous “working” options set back I was welcomed with the above. I didn’t try the solution proposed there as it was not marked as the one and before trying to attempt numerous things I had in mind I thought it would be way better to ask the profis :smiley:

So before trying that with the live USB my UEFI had 2 entries to choose from, Manjaro and UEFI:OS , the system booted with Manjaro , but now it isn’t listed in the UEFI, I assume something of the above somehow deleted it?

Here are some info for you booted from a rescue USB with Manjaro, and from inside chroot -a:

[manjaro boot]# fdisk -l
Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: TOSHIBA THNSNJ25
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5AA4BE13-233B-5E47-A92E-D08D0848B3E5

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624  49285119  48234496   23G Linux filesystem
/dev/sda3   49285120 493826047 444540928  212G Linux filesystem
/dev/sda4  493826048 500118158   6292111    3G Linux swap


[manjaro boot]# lsblk -l
NAME  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda     8:0    0 238.5G  0 disk 
sda1    8:1    0   512M  0 part /boot/efi
sda2    8:2    0    23G  0 part /
sda3    8:3    0   212G  0 part /home
sda4    8:4    0     3G  0 part 
[manjaro boot]# 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=967B-DD95                            /boot/efi      vfat    umask=0077 0 2
UUID=0e80bbe4-aed2-4f8d-9585-ff0caae4b265 /              ext4    defaults,noatime 0 1
UUID=951024f3-a06a-4604-8b8a-b3532c491e4f /home          ext4    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

[manjaro boot]# efibootmgr -v
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0003,0004,0005
Boot0003* UEFI OS       HD(1,GPT,7b147200-18a6-8f45-98e1-810b0660c330,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0004* UEFI: Memorex Cool Drive B PMAP       PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/CDROM(1,0x46ef5c,0x8000)..BO
Boot0005  UEFI: Memorex Cool Drive B PMAP, Partition 1  PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(1,MBR,0x0,0x46ef5c,0x2000)..BO

The contents of /boot/*:

[manjaro boot]# ls * -R
initramfs-5.10-x86_64-fallback.img  initramfs-5.11-x86_64-fallback.img  intel-ucode.img       linux511-x86_64.kver  vmlinuz-5.11-x86_64
initramfs-5.10-x86_64.img           initramfs-5.11-x86_64.img           linux510-x86_64.kver  vmlinuz-5.10-x86_64

efi:
EFI

efi/EFI:
Manjaro  boot

efi/EFI/Manjaro:
grubx64.efi

efi/EFI/boot:
bootx64.efi

grub:
fonts  grub.cfg  grubenv  themes  x86_64-efi

grub/fonts:
unicode.pf2

grub/themes:
starfield

grub/themes/starfield:
COPYING.CC-BY-SA-3.0  boot_menu_e.png   boot_menu_s.png   dejavu_10.pf2  dejavu_bold_14.pf2  starfield.png       terminal_box_ne.png  terminal_box_sw.png
README                boot_menu_n.png   boot_menu_se.png  dejavu_12.pf2  slider_c.png        terminal_box_c.png  terminal_box_nw.png  terminal_box_w.png
blob_w.png            boot_menu_ne.png  boot_menu_sw.png  dejavu_14.pf2  slider_n.png        terminal_box_e.png  terminal_box_s.png   theme.txt
boot_menu_c.png       boot_menu_nw.png  boot_menu_w.png   dejavu_16.pf2  slider_s.png        terminal_box_n.png  terminal_box_se.png

grub/x86_64-efi:
acpi.mod              cmp.mod         ext2.mod             geli.mod                  loadenv.mod      mpi.mod              pbkdf2.mod          signature_test.mod    usbserial_ftdi.mod
adler32.mod           cmp_test.mod    extcmd.mod           gettext.mod               loopback.mod     msdospart.mod        pbkdf2_test.mod     sleep.mod             usbserial_pl2303.mod
affs.mod              command.lst     f2fs.mod             gfxmenu.mod               ls.mod           mul_test.mod         pcidump.mod         sleep_test.mod        usbserial_usbdebug.mod
afs.mod               configfile.mod  fat.mod              gfxterm.mod               lsacpi.mod       multiboot.mod        pgp.mod             smbios.mod            usbtest.mod
afsplitter.mod        core.efi        file.mod             gfxterm_background.mod    lsefi.mod        multiboot2.mod       play.mod            spkmodem.mod          verifiers.mod
ahci.mod              cpio.mod        fixvideo.mod         gfxterm_menu.mod          lsefimmap.mod    nativedisk.mod       png.mod             squash4.mod           video.lst
all_video.mod         cpio_be.mod     font.mod             gptsync.mod               lsefisystab.mod  net.mod              priority_queue.mod  strtoull_test.mod     video.mod
aout.mod              cpuid.mod       fs.lst               grub.efi                  lsmmap.mod       newc.mod             probe.mod           syslinuxcfg.mod       video_bochs.mod
appleldr.mod          crc64.mod       fshelp.mod           gzio.mod                  lspci.mod        nilfs2.mod           procfs.mod          tar.mod               video_cirrus.mod
archelp.mod           crypto.lst      functional_test.mod  halt.mod                  lssal.mod        normal.mod           progress.mod        terminal.lst          video_colors.mod
at_keyboard.mod       crypto.mod      gcry_arcfour.mod     hashsum.mod               luks.mod         ntfs.mod             raid5rec.mod        terminal.mod          video_fb.mod
ata.mod               cryptodisk.mod  gcry_blowfish.mod    hdparm.mod                luks2.mod        ntfscomp.mod         raid6rec.mod        terminfo.mod          videoinfo.mod
backtrace.mod         cs5536.mod      gcry_camellia.mod    hello.mod                 lvm.mod          odc.mod              random.mod          test.mod              videotest.mod
bfs.mod               ctz_test.mod    gcry_cast5.mod       help.mod                  lzopio.mod       offsetio.mod         rdmsr.mod           test_blockarg.mod     videotest_checksum.mod
bitmap.mod            date.mod        gcry_crc.mod         hexdump.mod               macbless.mod     ohci.mod             read.mod            testload.mod          wrmsr.mod
bitmap_scale.mod      datehook.mod    gcry_des.mod         hfs.mod                   macho.mod        part_acorn.mod       reboot.mod          testspeed.mod         xfs.mod
blocklist.mod         datetime.mod    gcry_dsa.mod         hfsplus.mod               mdraid09.mod     part_amiga.mod       regexp.mod          tftp.mod              xnu.mod
boot.mod              disk.mod        gcry_idea.mod        hfspluscomp.mod           mdraid09_be.mod  part_apple.mod       reiserfs.mod        tga.mod               xnu_uuid.mod
boottime.mod          diskfilter.mod  gcry_md4.mod         http.mod                  mdraid1x.mod     part_bsd.mod         relocator.mod       time.mod              xnu_uuid_test.mod
bsd.mod               div.mod         gcry_md5.mod         iorw.mod                  memdisk.mod      part_dfly.mod        romfs.mod           tpm.mod               xzio.mod
bswap_test.mod        div_test.mod    gcry_rfc2268.mod     iso9660.mod               memrw.mod        part_dvh.mod         scsi.mod            tr.mod                zfs.mod
btrfs.mod             dm_nv.mod       gcry_rijndael.mod    jfs.mod                   minicmd.mod      part_gpt.mod         search.mod          trig.mod              zfscrypt.mod
bufio.mod             echo.mod        gcry_rmd160.mod      jpeg.mod                  minix.mod        part_msdos.mod       search_fs_file.mod  true.mod              zfsinfo.mod
cacheinfo.mod         efi_gop.mod     gcry_rsa.mod         json.mod                  minix2.mod       part_plan.mod        search_fs_uuid.mod  udf.mod               zstd.mod
cat.mod               efi_uga.mod     gcry_seed.mod        keylayouts.mod            minix2_be.mod    part_sun.mod         search_label.mod    ufs1.mod
cbfs.mod              efifwsetup.mod  gcry_serpent.mod     keystatus.mod             minix3.mod       part_sunpc.mod       serial.mod          ufs1_be.mod
cbls.mod              efinet.mod      gcry_sha1.mod        ldm.mod                   minix3_be.mod    partmap.lst          setjmp.mod          ufs2.mod
cbmemc.mod            ehci.mod        gcry_sha256.mod      legacy_password_test.mod  minix_be.mod     parttool.lst         setjmp_test.mod     uhci.mod
cbtable.mod           elf.mod         gcry_sha512.mod      legacycfg.mod             mmap.mod         parttool.mod         setpci.mod          usb.mod
cbtime.mod            eval.mod        gcry_tiger.mod       linux.mod                 moddep.lst       password.mod         sfs.mod             usb_keyboard.mod
chain.mod             exfat.mod       gcry_twofish.mod     linux16.mod               modinfo.sh       password_pbkdf2.mod  shift_test.mod      usbms.mod
cmdline_cat_test.mod  exfctest.mod    gcry_whirlpool.mod   loadbios.mod              morse.mod        pata.mod             shim_lock.mod       usbserial_common.mod

memtest86+:
memtest.bin

syslinux:
syslinux.cfg

How should I proceed? Thanks in advance.

Probably your BIOS has reset the EFI thing when you messed with all BIOS settings. You can very easily restore Grub following this WIKI GRUB/Restore the GRUB Bootloader - Manjaro

BEFORE RESTORING GRUB, in your BIOS:

  • disable CSM
  • disable SECURE BOOT
    (on some motherboards, disabling SECURE BOOT will enable CSM, if this is the case just make sure you disable SECURE BOOT in priority)
  • switch to EFI instead of LEGACY where you see the option

tldr:
=> chroot your system from a terminal in the live USB system (and all in the same terminal once you are chrooted):
manjaro-chroot -a
=> select the Manjaro system
=> it should auto chroot your system, terminal will change some colors to RED to show you now are chrooted and admin.
=> from here reinstall Grub with following command:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
=> and update Grub:
update-grub
//EDIT: and exit the terminal/chroot before shutdown for good measure:
exit

1 Like

Thank you greatly omano, that did it! :hugs: :smiling_face_with_three_hearts:

Initially I thought something messed/renamed the UUID entries so I was reluctant to try anything (I read that in the Arch wiki) until more experienced eyes would say for sure, thanks again :slight_smile:

I think as I guessed the EFI table or whatever it is called in BIOS, was reset, it happened to me a lot (EVERY TIME I update the BIOS for instance, and it also happens in another case but I don’t recall right now what it is).

Now you know, please mark my reply as solution so it will be easier for others to see (even if I’m the only reply it is a good habit to ‘close’ the thread, list it as solved, and bring the solution in your initial post)

//EDIT you already did it :+1:

1 Like

yes, the moment I replied to you :slight_smile: Wierd that it resets it, now I have to study what’s inside those folders compared to the previous output and the logic of it, thanks.

The issue was in BIOS, not in file on the system I think.

Also if you have weird options available in Grub menu, just run sudo update-grub again from the real system to fix everything completely.

1 Like

Thx, I’ll keep that in mind :+1:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.