Grub installation error 1

I have tried several times the installation process, without success, grub is installed but at the boot no entry are showed, only the command prompt. Some suggestion?

The bootloader could not be installed. The installation command

grub-mkconfig -o /boot/grub/grub.cfg
returned error code 1.

Installation log: https://termbin.com/ejuz

Can you show the generated file /boot/grub/grub.cfg on the installed system?

cat /boot/grub/grub.cfg | eos-sendlog

The log is incomplete. You may have hit a limit of termbin.com. Can you reupload it with eos-sendlog?

Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-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.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
Found EndeavourOS Linux (rolling) on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
2022-07-26 - 13:02:52 [2]: WARNING: [PYTHON JOB]: "Command 'grub-mkconfig -o /boot/grub/grub.cfg' returned non-zero exit status 1." 
2022-07-26 - 13:02:52 [6]: [PYTHON JOB]: "stdout:Generating grub configuration file ...\nFound theme: /boot/grub/themes/EndeavourOS/theme.txt\nFound linux image: /boot/vmlinuz-linux\nFound initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img\nFound fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img\nWarning: os-prober will be executed to detect other bootable partitions.\nIts output will be used to detect bootable binaries on them and create new boot entries.\ngrub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.\nFound EndeavourOS Linux (rolling) on /dev/sda3\nAdding boot menu entry for UEFI Firmware Settings ...\nerror: syntax error.\nerror: Incorrect command.\nerror: syntax error.\nSyntax error at line 184\nSyntax errors are detected in generated GRUB config file.\nEnsure that there are no errors in /etc/default/grub\nand /etc/grub.d/* files or please file a bug report with\n/boot/grub/grub.cfg.new file attached."

You could also provide the following info:

sudo parted -l
efibootmg -v
1 Like

Where i can find the calamares log after the installation?

Don’t worry, log is complete, my browser couldn’t load the bottom part for some reason.

The file on the installed system is renamed automatically grub.cfg.new

https://clbin.com/UzDYB

sudo parted -l
efibootmg -v

https://clbin.com/YYgHX
https://clbin.com/BicpR

The system is a dual boot, working correctly, before this new installation, the previous installation of eos was working great

sudo parted -l

Model: ATA CT1000MX500SSD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name        Flags
 1      1049kB  842GB   842GB   ntfs         LENOVO      msftdata
 3      842GB   892GB   50.0GB  ext4         root
 2      892GB   1000GB  108GB   ntfs         Windows 10  msftdata




Model: Generic Flash Disk (scsi)
Disk /dev/sdb: 8053MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size   Type     File system  Flags
 2      1833MB  1940MB  107MB  primary  fat16        esp


Model: SAMSUNG MZVLW128HEGR-000L2 (nvme)
Disk /dev/nvme0n1: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name  Flags
 1      2097kB  317MB  315MB  fat32              boot, esp
 2      317MB   128GB  128GB               root

Where are you trying to install?
You have two disks. Please give a bit more details about where you are installing the system and the mode of installation.

efibootmgr -v

BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0002,2001,0001,2002,0000,2003
Boot0000* EFI Hard Drive (SAMSUNG MZVLW128HEGR-000L2)	PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-BB-71-03-47-98)/HD(1,GPT,7360cb44-e038-3649-adb2-8a53ce387e52,0x1000,0x96000)RC
Boot0001* endeavouros-3921	HD(1,GPT,7360cb44-e038-3649-adb2-8a53ce387e52,0x1000,0x96000)/File(\EFI\endeavouros-3921\grubx64.efi)
Boot0002* endeavouros-7233	HD(1,GPT,5c93e115-fa4d-b140-9232-297fa8b077cd,0x1000,0x96000)/File(\EFI\endeavouros-7233\grubx64.efi)
Boot0003  EFI Network 0 for IPv6 (54-E1-AD-F6-75-0F) 	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(54e1adf6750f,0)/IPv6([::]:<->[::]:,0,0)RC
Boot0005* EFI USB Device (Generic Flash Disk)	PciRoot(0x0)/Pci(0x14,0x0)/USB(2,0)/HD(1,MBR,0xab3ab792,0x369fc0,0x33000)RC
Boot0006  EFI Network 0 for IPv4 (54-E1-AD-F6-75-0F) 	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(54e1adf6750f,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC

You have two EFI boot entries. Which installation are they for? On what disk? Are they functional?

And also, please post:

sudo blkid

Ok, i have two disk, i’m trying to install eos on the ssd

Disk /dev/nvme0n1: 128GB

In the other disk i have a different installation of eos, currently not working because the efs is been overwritten, but i have a previous backup. Alongside of the eos installation i have windows 10. The ssd is entirely dedicated to this new eos installation. The two grub entry are both not working at the moment. The installation mode is the complete wipe of the ssd and the creation of two partition, automatically the installer create the efs partition and the system partition (btrfs encrypted).

1 Like
/dev/nvme0n1p1: LABEL_FATBOOT="NO_LABEL" LABEL="NO_LABEL" UUID="51F3-AAE2" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="5c93e115-fa4d-b140-9232-297fa8b077cd"
/dev/nvme0n1p2: UUID="e50e0e79-1563-4338-92bb-7f2c107129b3" TYPE="crypto_LUKS" PARTLABEL="root" PARTUUID="9935f37e-cbdd-a74b-8e70-026beb272e95"
/dev/sda1: LABEL="LENOVO" BLOCK_SIZE="512" UUID="01D6C3DDE4B76020" TYPE="ntfs" PARTLABEL="LENOVO" PARTUUID="2ac6c22e-9af1-46ff-9d19-784cf5811c01"
/dev/sda3: UUID="c59dd15a-40dd-47c1-b034-b21238b24941" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="e02e4763-dcb9-ce41-870b-7e95f095a3cc"
/dev/sda2: BLOCK_SIZE="512" UUID="A23AD27E3AD24F43" TYPE="ntfs" PARTLABEL="Windows 10" PARTUUID="f8851df6-0ec2-418c-aec4-2437275cd5c1"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="ARCHISO_EFI" LABEL="ARCHISO_EFI" UUID="C7B3-C190" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="ab3ab792-02"
/dev/sdb1: BLOCK_SIZE="2048" UUID="2022-06-22-22-47-55-00" LABEL="EOS_202206" TYPE="iso9660" PARTUUID="ab3ab792-01"
/dev/loop0: TYPE="squashfs"
/dev/mapper/luks-e50e0e79-1563-4338-92bb-7f2c107129b3: UUID="abd37c0b-0c25-4fb9-b1af-dddd3fc81a10" UUID_SUB="58c05875-9e90-42f9-b2b9-ce31794b9ffa" BLOCK_SIZE="4096" TYPE="btrfs"
1 Like

You could try reinstalling the bootloader from the Live session and see if it will work.

Boot up the Live USB, launch a terminal and remove first those two non functioning EFI boot entries using efibootmgr:

sudo efibootmgr --bootnum 0001 --delete-bootnum
sudo efibootmgr --bootnum 0002 --delete-bootnum

Now launch Gparted and unlock your encrypted partition.

Next you would need to chroot into your installed system. Please follow the guide below for how to do it for a system installed on btrfs:

https://discovery.endeavouros.com/system-rescue/arch-chroot-for-efi-uefi-systems/2021/03/

Once you have successfully chrooted into the system, reinstall the bootloader and regenerate the grub.cfg:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS-grub

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

When done, type exit to quit chroot.

Not sure if it is needed to relock the partition but I guess it wouldn’t hurt to do it before a reboot.

Cross your fingers and hope for the best :wink:

:crossed_fingers:t5:

1 Like
[liveuser@eos-2022.06.23 ~] $ sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
mount: /mnt: unknown filesystem type 'crypto_LUKS'.
       dmesg(1) may have more information after failed mount system call.

I have already decrypted the partition with gparted

EDITED: Ok the encrypted section is after the mount session in the guide, i think need to be first

1 Like
Adding boot menu entry for UEFI Firmware Settings ...
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.

I’m currently checking the error in the grub config

1 Like

That is the exact same error message as in your installation log you posted before. Not sure at this moment what it is about.

Yeah you are right, same strange behaviour

1 Like

@BezierCurve

You could try rebuilding the Grub environment from scratch.

While in chroot, do the following:

1. mv /etc/default/grub /etc/default/grub.old

2. mv /etc/grub.d /etc/grub.d.old

3. rm /boot/grub/grubenv

4. grub-editenv /boot/grub/grubenv create

5. pacman -S grub

6. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS-new

7. grub-mkconfig -o /boot/grub/grub.cfg
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 184
Syntax errors are detected in generated GRUB config file.

Looking at the grub.cfg you posted before:

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
	menuentry 'EndeavourOS (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--c59dd15a-40dd-47c1-b034-b21238b24941' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  c59dd15a-40dd-47c1-b034-b21238b24941
		else
		  search --no-floppy --fs-uuid --set=root c59dd15a-40dd-47c1-b034-b21238b24941
		fi
		linux /boot/vmlinuz-linux root=UUID=c59dd15a-40dd-47c1-b034-b21238b24941 rw quiet splash vt.global_cursor_default=0 loglevel=2 rd.systemd.show_status=false rd.udev.log-priority=3 sysrq_always_enabled=1
		initrd /boot/intel-ucode.img /boot/intel-ucode.img /boot/initramfs-linux.img}
	}
	menuentry 'EndeavourOS, on linux (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--c59dd15a-40dd-47c1-b034-b21238b24941' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  c59dd15a-40dd-47c1-b034-b21238b24941
		else
		  search --no-floppy --fs-uuid --set=root c59dd15a-40dd-47c1-b034-b21238b24941
		fi
		linux /boot/vmlinuz-linux root=UUID=c59dd15a-40dd-47c1-b034-b21238b24941 rw quiet splash vt.global_cursor_default=0 loglevel=2 rd.systemd.show_status=false rd.udev.log-priority=3 sysrq_always_enabled=1
		initrd /boot/intel-ucode.img /boot/intel-ucode.img /boot/initramfs-linux.img }
	}
	menuentry 'EndeavourOS, on linux (fallback initramfs) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--c59dd15a-40dd-47c1-b034-b21238b24941' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  c59dd15a-40dd-47c1-b034-b21238b24941
		else
		  search --no-floppy --fs-uuid --set=root c59dd15a-40dd-47c1-b034-b21238b24941
		fi
		linux /boot/vmlinuz-linux root=UUID=c59dd15a-40dd-47c1-b034-b21238b24941 rw quiet splash vt.global_cursor_default=0 loglevel=2 rd.systemd.show_status=false rd.udev.log-priority=3 sysrq_always_enabled=1
		initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img }
	}

The curled brackets at the end of the initrd lines shouldn’t be there.
I guess that is what:

Syntax errors are detected in generated GRUB config file.

is trying to say.

I would disable/remove os-prober for the moment and execute the commands I posted in my previous post.

2 Likes

Also, ucode is printed twice, possibly from the same bug.
It could be some package update changed something and (assuming) a custom hooked patch needs redesign/fix.

We are expecting a fix for some long waited issues to arrive, which were dealed with patches downstream. It might have arrived.?

1 Like