Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

[SOLVED] UEFI Grub install EOF error -- MX unable to UEFI boot

Post Reply
Message
Author
User avatar
derrotmax
Forum Novice
Forum  Novice
Posts: 2
Joined: Wed Jul 25, 2018 10:45 pm

[SOLVED] UEFI Grub install EOF error -- MX unable to UEFI boot

#1 Post by derrotmax » Sun Aug 05, 2018 11:06 pm

I have a roughly 1-year old Lenovo Flex 4 that I was originally dual-booting W10 and MX in BIOS mode on the original hard drive. At the beginning of last month I bought a new SSD and proceeded to joyfully replace the old hybrid setup with a fresh install of only MX on the new SSD set to boot in UEFI ( with the old hard drive no longer connected and never to return) -- a real simple setup:
sda1 - efi partition, 100mb, FAT32, boot and esp flags applied
sda2 - mx
sda3 - swap
secure boot and fast boot *off* (followed the UEFI section of the manual to a "T"), booting UEFI mode only!

I installed from a fully updated 64bit LIVE USB that was booted in UEFI mode (funny that the LIVE USB UEFI boot works just fine) -- grub was correctly set to install to the efi partition in the installer (selected "esp" and sda1). Once finished, I booted from my SSD, only to be presented with the Grub command-line. I then attempted to install Grub from the Live USB manually (like Fehlix's instructions in this post: https://forum.mxlinux.org/viewtopic.php?f=92&t=45573), and that's the first time I saw that running "update-grub" returned an EOF error, and I was again left with the Grub command-line upon boot. Just like in that post as well, I saw that the resulting grub.cfg was named "grub.cfg.new", which of course did not work, but in my case, renaming it back to grub.cfg had no effect.

Out of desperation to get back to work, I booted a Manjaro installer, split 20GB off the end of my MX partition (now sda4) as it's root partition, and then directed it to install it's own Grub to the same efi partition (sda1). Upon reboot, the Manjaro Grub install would flawlessly allow me to boot both installed OSes.

Since then, I have tried MX Boot Repair, and installing Grub from the command-line, but always end up with a non-fuctional Grub unless I use the Grub install from Manjaro to boot MX (I also tried doing the same with ZorinOS just as a test, and its Grub install was just fine and could boot MX without issue just like Manjaro). Here's the EOF error output I get when I run "update-grub" in MX:

Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/backgrounds/MXLinux/grub/MX-Gold1080P.png
Found linux image: /boot/vmlinuz-4.15.0-1-amd64
Found initrd image: /boot/initrd.img-4.15.0-1-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found Manjaro Linux (17.1.11) on /dev/sda4
/etc/grub.d/30_uefi-firmware: 34: /etc/grub.d/30_uefi-firmware: arithmetic expression: expecting EOF: " 1f & 1 "

So, what am I missing? I'd very much like to not have to depend on another distro to boot my MX install in UEFI mode!
Last edited by derrotmax on Mon Aug 06, 2018 9:40 pm, edited 1 time in total.

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 1731
Joined: Wed Apr 11, 2018 5:09 pm

Re: UEFI Grub install EOF error -- MX unable to UEFI boot

#2 Post by fehlix » Mon Aug 06, 2018 12:35 pm

derrotmax wrote:
Sun Aug 05, 2018 11:06 pm
...
Here's the EOF error output I get when I run "update-grub" in MX:
Generating grub configuration file ...
...
/etc/grub.d/30_uefi-firmware: 34: /etc/grub.d/30_uefi-firmware: arithmetic expression: expecting EOF: " 1f & 1 "

So, what am I missing? I'd very much like to not have to depend on another distro to boot my MX install in UEFI mode!
This part of the grub-menu generation through update-grub, tries to add a menuentry for booting into UEFI "System setup".
This menu-entry is not realy needed, as you can access UEFI "System Setup" usualy through keyboard-shortcut during UEFI-bootup stage.
To avoid this error, just disable this part by changing the permission like this as adminstrator:
on the

Code: Select all

chmod -x /etc/grub.d/30_uefi-firmware
after that do run update-grub again.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
derrotmax
Forum Novice
Forum  Novice
Posts: 2
Joined: Wed Jul 25, 2018 10:45 pm

Re: UEFI Grub install EOF error -- MX unable to UEFI boot

#3 Post by derrotmax » Mon Aug 06, 2018 9:40 pm

Perfect! That took care of it, thank you very much!

Post Reply

Return to “Installation”