You are not logged in.

#1 2022-11-22 17:21:35

matthies
Member
Registered: 2022-11-22
Posts: 11

[SOLVED] Grub error after config change (grub_debug_malloc not found)

Hey, 

I recently wanted to automatically skip the GRUB menu when booting. I searched around a little, and found a few solutions, unfortunately the first did not work for me, and when trying another one. When trying one of those, at boot I was greeted with "Welcome to GRUB", then the  system instantly rebooted, and then booted into BIOS.
I found people with a similar issue, the solutions often had simply been:
boot into live usb (i used endeavourOS for that (arch based)
mount linux file system and efi partition ( on /mnt and /mnt/boot respectively) a few also said efi needed to be mounted at /mnt/boot/efi, however that mount point did not exist on my system (also tried just to mkdir efi)
arch-chroot to your file system (/mnt)
regenerate the grub config file using 'grub-mkconfig -o /boot/grub/grub.cfg'
reinstall grub using 'grub-install' with some arguments (differed from version to version)
reboot and everything should be fine

some versions also told me to mount the efi partition while being in chroot, to /boot/EFI
at some point, I unfortunately don't remember which action caused it, I rebooted and was greeted with the grub error message: error: symbol `grub_debug_malloc´ not found.
then I am thrown into a grub_rescue console.
This is the state I am currently at.

I also tried reverting the changes I made in /etc/default/grub , and then generating a new grub config file and reinstalling grub, but that didn't help either.

I obviously backed up my data, so in worst case I could just reinstall arch, but I want to avoid that as I'd have to setup everything again, just due to GRUB being broken.

If you have any clue or advice, please let me know, also let me know if you need any further information about my system, I'll be happy to provide that as long as I can access it.

Kind regards and thanks in advance,
matthies

Last edited by matthies (2022-12-17 10:39:00)

Offline

#2 2022-11-22 17:26:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,107

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

How, exactly, did you reinstall grub? Why in the world would you find random tutorials on how to do that instead of just reading the grub wiki page?

Offline

#3 2022-11-22 17:27:18

d.ALT
Member
Registered: 2019-05-10
Posts: 943

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

First "block":
1. Boot into the ArchLinux Live environment
2. Mount root partition of the installed ArchLinux:

# mount /dev/ROOTPARTITION

3. Grab outputs:

# lsblk -f
# cat /MOUNTPOINT/OF/ROOTPARTITION/etc/fstab
# cat /MOUNTPOINT/OF/ROOTPARTITION/etc/default/grub

4. Post here above outputs


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#4 2022-11-22 17:54:20

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

lsblk -f

NAME        FSTYPE   FSVER            LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                                     0   100% /run/archiso/airootfs
sda         iso9660  Joliet Extension EOS_202209  2022-09-10-10-51-40-00                              
├─sda1      iso9660  Joliet Extension EOS_202209  2022-09-10-10-51-40-00                     0   100% /run/archiso/bootmnt
└─sda2      vfat     FAT16            ARCHISO_EFI C8C0-D262                                           
nvme0n1                                                                                               
├─nvme0n1p1 swap     1                            4d967eec-8402-4f16-b917-c496e63d22ab                
├─nvme0n1p2 vfat     FAT32                        4A8B-3FC7                                           
└─nvme0n1p3 ext4     1.0                          aea591d8-a5b7-468c-96b4-09cd1a6d9526  401.7G     8% /mnt

cat /mnt/etc/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=aea591d8-a5b7-468c-96b4-09cd1a6d9526	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p2
UUID=4A8B-3FC7      	/efi      	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p1
UUID=4d967eec-8402-4f16-b917-c496e63d22ab	none      	swap      	defaults  	0 0

cat /mnt/etc/default/grub:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
#GRUB_TIMEOUT_STYLE='countdown'

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

Offline

#5 2022-11-22 17:56:56

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

Scimmia wrote:

How, exactly, did you reinstall grub? Why in the world would you find random tutorials on how to do that instead of just reading the grub wiki page?


(mount and live boot as listed above)

sudo grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --recheck

I can actually not give a better answer than my own stupidity to the second question.

Offline

#6 2022-11-22 19:23:16

d.ALT
Member
Registered: 2019-05-10
Posts: 943

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

matthies wrote:

lsblk -f

NAME        FSTYPE   FSVER            LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                                     0   100% /run/archiso/airootfs
sda         iso9660  Joliet Extension EOS_202209  2022-09-10-10-51-40-00                              
├─sda1      iso9660  Joliet Extension EOS_202209  2022-09-10-10-51-40-00                     0   100% /run/archiso/bootmnt
└─sda2      vfat     FAT16            ARCHISO_EFI C8C0-D262                                           
nvme0n1                                                                                               
├─nvme0n1p1 swap     1                            4d967eec-8402-4f16-b917-c496e63d22ab                
├─nvme0n1p2 vfat     FAT32                        4A8B-3FC7                                           
└─nvme0n1p3 ext4     1.0                          aea591d8-a5b7-468c-96b4-09cd1a6d9526  401.7G     8% /mnt

cat /mnt/etc/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=aea591d8-a5b7-468c-96b4-09cd1a6d9526	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p2
UUID=4A8B-3FC7      	/efi      	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p1
UUID=4d967eec-8402-4f16-b917-c496e63d22ab	none      	swap      	defaults  	0 0

You have 3 partitions: ROOT (/), ESP (/efi), SWAP (swap).
In your setup there is NO /boot partition, it's simply a directory which "lives" inside the ROOT partition (/).

So... From the ArchLinux Live environment you'll need to mount the ROOT partition /dev/nvme0n1p3 into /mnt.
After that, mount the ESP /dev/nvme0n1p2 into /mnt/efi.

Then chroot into the installed ArchLinux and re-install grub, re-generate its NVRAM entry, re-generate its .cfg file.

# arch-chroot /mnt

CHROOT> # pacman -S grub
CHROOT> # grub-install --target=x86_64-efi --efi-directory=efi --bootloader-id=GRUB
CHROOT> # grub-mkconfig -o /boot/grub/grub.cfg
CHROOT> # exit

# umount -R /mnt
# reboot

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#7 2022-11-22 21:23:29

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

Unfortunately, I still get the same 'grub_debug_malloc not found' error message when booting.
Outputs of 'lsblk -f', 'cat /mnt/etc/fstab' and 'cat /mnt/etc/default/grub' remain the same.

I also noticed my Arch not being listed at all when using 'efibootmgr' (or do I just not see it as it's displayed otherwise?):

BootCurrent: 001C
Timeout: 0 seconds
BootOrder: 0016,0017,0018,0019,001C,001D,001B,001A
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0015  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0016* USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0017* USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0018* NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot0019* NVMe1	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a401)
Boot001A  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35400)
Boot001B  Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot001C* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot001D* PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot001E  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)

Offline

#8 2022-11-22 23:24:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,107

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

If lsblk remains the same, you didn't mount your ESP.

Offline

#9 2022-11-24 19:00:55

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

For the outputs of lslblk -f (and cat /mnt/etc/fstab, cat /mnt/etc/default/grub) I only mounted the root partition, not the EFI partition (as d.ALT described above).
This now is my lsblk -f with the root partition and  ESP (/dev/nvme0n1p2) mounted to /mnt/efi:

NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /run/archiso/airootfs
sda  iso966 Jolie EOS_202209
                        2022-09-10-10-51-40-00                              
├─sda1
│    iso966 Jolie EOS_202209
│                       2022-09-10-10-51-40-00                     0   100% /run/archiso/bootmnt
└─sda2
     vfat   FAT16 ARCHISO_EFI
                        C8C0-D262                                           
nvme0n1
                                                                            
├─nvme0n1p1
│    swap   1           4d967eec-8402-4f16-b917-c496e63d22ab                
├─nvme0n1p2
│    vfat   FAT32       4A8B-3FC7                            1007.7M     1% /mnt/efi
└─nvme0n1p3
     ext4   1.0         aea591d8-a5b7-468c-96b4-09cd1a6d9526  401.5G     8% /mnt

cat /mnt/etc/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=aea591d8-a5b7-468c-96b4-09cd1a6d9526	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p2
UUID=4A8B-3FC7      	/efi      	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro0 2

# /dev/nvme0n1p1
UUID=4d967eec-8402-4f16-b917-c496e63d22ab	none      	swap      	defaults  	0 0

Offline

#10 2022-11-24 19:33:48

kermit63
Member
Registered: 2018-07-04
Posts: 257

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

matthies wrote:

I only mounted the root partition, not the EFI partition (as d.ALT described above).

d_ALT wrote:

So... From the ArchLinux Live environment you'll need to mount the ROOT partition /dev/nvme0n1p3 into /mnt.
After that, mount the ESP /dev/nvme0n1p2 into /mnt/efi.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#11 2022-11-24 20:25:20

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

kermit63 wrote:
matthies wrote:

I only mounted the root partition, not the EFI partition (as d.ALT described above).

d_ALT wrote:

So... From the ArchLinux Live environment you'll need to mount the ROOT partition /dev/nvme0n1p3 into /mnt.
After that, mount the ESP /dev/nvme0n1p2 into /mnt/efi.

I mounted the partition in order to reinstall grub etc, but not to grab the outputs.

d.ALT wrote:

First "block":
1. Boot into the ArchLinux Live environment
2. Mount root partition of the installed ArchLinux:

# mount /dev/ROOTPARTITION

3. Grab outputs:

# lsblk -f
# cat /MOUNTPOINT/OF/ROOTPARTITION/etc/fstab
# cat /MOUNTPOINT/OF/ROOTPARTITION/etc/default/grub

4. Post here above outputs

Offline

#12 2022-12-15 23:05:09

radishfabio
Member
Registered: 2011-04-26
Posts: 15

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

I solved following the wiki: https://wiki.archlinux.org/title/GRUB/Tips_and_tricks
I used this commands from recovery disk (root user):

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

Offline

#13 2022-12-17 10:16:32

matthies
Member
Registered: 2022-11-22
Posts: 11

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

radishfabio wrote:

I solved following the wiki: https://wiki.archlinux.org/title/GRUB/Tips_and_tricks
I used this commands from recovery disk (root user):

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

Thank you sooooo much! That solved it!
Toooo glad I can use my Laptop again!

Offline

#14 2022-12-27 15:47:46

radishfabio
Member
Registered: 2011-04-26
Posts: 15

Re: [SOLVED] Grub error after config change (grub_debug_malloc not found)

matthies wrote:
radishfabio wrote:

I solved following the wiki: https://wiki.archlinux.org/title/GRUB/Tips_and_tricks
I used this commands from recovery disk (root user):

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

Thank you sooooo much! That solved it!
Toooo glad I can use my Laptop again!

I'm very happy to have helped you, well done

Offline

Board footer

Powered by FluxBB