EFI bootloader for 32-bit UEFI

Report Bugs, Issues and non- package Requests
Message
Author
User avatar
RyoidenshiAokigahara
Posts: 1
Joined: Thu Mar 22, 2018 1:23 am

EFI bootloader for 32-bit UEFI

#1 Post by RyoidenshiAokigahara »

Good time of day.
Firstly about device:
Lenovo Ideapad 100S, it has 64-bit Intel Atom (Z3735F) with 1.33Ghz, 2Gb RAM and 64Gb SSD.
Also there is preinstalled Windows 10.
Some prehistory:
The problem is with UEFI - it's 32-bit. I've tried many distros, mot most of them doesn't have even the bootia32.efi or have "old" kernel which doesn't work with my wifi, touchpad, and etc.
The one which was sucessfully installed on my laptop was the Parrot Security distro - it was installed and unpacked(or created, i don't know what's correct what distro does) the 32-bit EFI file into my EFI partition. While searching for a grub-customizer in Synaptic I found that there's also installed a grub-efi-ia32 package. But Parrot takes too much free space and it's sandbox give some problems to me (i'm novice in linux), that's why I deleted Parrot and started for search of another distro

Current problem:
Recently I've found MX Linux, checked ISO for a bootia32.efi and after succes I've tried to install for a 32-bit version. After booting into live I've clicked the "Install" shortcut and then MX said that I need to turn on the BIOS Legacy mode and I will be unable to install 32-bit MX until I do that. But I have no possibility to do that! All that's possible to change in my "bios" is just state of Secure Boot :lipsrsealed:
So after this fail I've decided to check for a 64-bit of MX. It were successfully installed without any warning messages about UEFI/BIOS. I'm agree to reboot after installation finished... and got "System boot failed" message from UEFI when tried to boot the MX. Later I've used the VisualBCD in Windows to check the content of EFI partition and found that MX installed just 64-bit EFI bootloader for me, but this one doesn't supported by my CPU.
Currently I have an AIO Boot tool on USB that allow me to boot system from a partition, so now I need to plug in my USB, boot from USB, choose the "boot from hard drive", choose the partition and just then I start the MX (and USB can be unpluged).
I've booted MX Linux in this way, remembered about grub-efi-ia32 package and installed it. This package replaced the already installed 64-bit GRUB and MX Boot Repair tool. But nothing changed :frown: Nothing new in EFI partition so I'm still unable to boot MX Linux without my USB with AIO Boot.

Also I've tried to check the 32-bit rEFInd, but it doesn't even see the 64-bit EFI bootloaders.

Is there anyway to solve this problem or I can just wait for updates of MX where may will be added the 32bit grub?
P.S: I'm a novice in linux, so please sorry for stupid actions/questions and etc. :frown:

User avatar
Gain
Posts: 8
Joined: Tue Oct 23, 2018 2:11 am

Re: EFI bootloader for 32-bit UEFI

#2 Post by Gain »

I just run into the same issue today. Are there any work around available?

User avatar
uhtred
Posts: 1
Joined: Thu May 23, 2019 2:32 pm

Re: EFI bootloader for 32-bit UEFI

#3 Post by uhtred »

I found this page very helpful https://itsfoss.com/check-uefi-or-bios/
Have a good read especially the Linux part. Hope it helps

User avatar
fehlix
Developer
Posts: 10370
Joined: Wed Apr 11, 2018 5:09 pm

Re: EFI bootloader for 32-bit UEFI

#4 Post by fehlix »

RyoidenshiAokigahara wrote: Thu Mar 22, 2018 2:13 am Lenovo Ideapad 100S, it has 64-bit Intel Atom (Z3735F) with 1.33Ghz, 2Gb RAM and 64Gb SSD.
Is there anyway to solve this problem or I can just wait for updates of MX where may will be added the 32bit grub?
I would probably use latest MX-183RC1, as it is better prepared for this case:
You can get it from here:
https://sourceforge.net/projects/mx-lin ... s/Testing

How to install 32bit GRUB EFI bootloader on 64bit installed MX Linux:
Boot from MX LiveUSB
chroot-rescue into the installed system by running:

Code: Select all

sudo chroot-rescue-scan
select the listed installed system.
mount all partitions needed including the ESP/EFI partition with:

Code: Select all

mount -a
Install 32-bit GRUB EFI bootloader:

Code: Select all

grub-install  --force-extra-removable --target=i386-efi --efi-directory=/boot/efi --bootloader-id=MX18.3 --recheck 
That's it.
If you have installed with MX182.. iso,
you would need to do some extra steps like mounting manual the ESP partition and installing chroot-rescue
:puppy:
EDIT: pre MX18.3 you need to manual mount ESP-partition to /boot/efi within the chrooted system
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

rek769
Posts: 7
Joined: Wed Jul 10, 2019 12:49 pm

Re: EFI bootloader for 32-bit UEFI

#5 Post by rek769 »

I have the same issue with a new Lenovo Thinkpad. When I chrooted into the installed system from a live boot an error was thrown after executing the commands (provided by fehlix) which said the /boot/efi directory was not found. System was installed in this case by allowing MX installer to use the entire hard drive to install.

Trying to boot from the installed system afterwards gives me the following (just like before):
alloc magic is broken at 0x2da11520: 16d844c Aborted. Press any key to exit.

Been trying to get MX installed on this machine since yesterday. 64-bit versions also give me similar issues. Would like to use a 32-bit system anyway since the client needs Firefox 52ESR for JAVA support.

Install has been tried with GPT and MBR tables. With GPT I have created the 100Mb efi partion and set appropriate flags. System install does not show this partition (usually sda1) as available for boot (but does show it available for SWAP). The oly option I have for boot is "root". I surmise this could be the crux of the problem...

MBR places grub on sda but still wont boot.

I've followed instructions here for both 32 and 64 bit attempts:
https://mxlinux.org/wiki/system/uefi/

(FWIW, PCLinuxOS installed with no issues but I much prefer MX Linux for my clients who are generally Linux newbies.)

...any help greatly appreciated.

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: EFI bootloader for 32-bit UEFI

#6 Post by Head_on_a_Stick »

rek769 wrote: Wed Jul 10, 2019 1:02 pm With GPT I have created the 100Mb efi partion and set appropriate flags.
Which flags did you set, exactly?

Can we please see the output of this command from the live system:

Code: Select all

parted --list
Are you sure the laptop has 32-bit UEFI firmware? I'm pretty sure all new Lenovo laptops have 64-bit firmware.
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 10370
Joined: Wed Apr 11, 2018 5:09 pm

Re: EFI bootloader for 32-bit UEFI

#7 Post by fehlix »

rek769 wrote: Wed Jul 10, 2019 1:02 pm I have the same issue with a new Lenovo Thinkpad. When I chrooted into the installed system from a live boot an error was thrown after executing the commands (provided by fehlix) which said the /boot/efi directory was not found. System was installed in this case by allowing MX installer to use the entire hard drive to install.
Please use latest MX Linux ISO and during LiveBoot do update to latest mx-installer:

Code: Select all

sudo apt update
and

Code: Select all

sudo apt install mx-installer
This will make sure the generated /etc/fstab file will contain an entry for /boot/efi, so the mount -a will
mount properly when chroot'ed.
In addition, do post "Quick System Info" found in the menu. Just hit paste to insert the already copied system info text in to a new post.
Thanks
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

rek769
Posts: 7
Joined: Wed Jul 10, 2019 12:49 pm

Re: EFI bootloader for 32-bit UEFI

#8 Post by rek769 »

I used boot and esp flags.

Your comment about the 64-bit UEFI firmware must be correct. I just re-installed the 64-bit version with a proper EFI partition (esp and boot flags...like usual) and it worked!

So, next problem is how to get a 32-bit Firefox to work...

User avatar
fehlix
Developer
Posts: 10370
Joined: Wed Apr 11, 2018 5:09 pm

How to install 32bit MX Linux on a 64bit UEFI system

#9 Post by fehlix »

What we actually have is this:
You want to have a 32bit MX Linux 386 ISO installed onto System with 64bit UEFI Firmware.
And you got this message when you start the installer:
32bitOS64bitUEFI-Error-Bug.png
"You are running 32bit OS started in 64bit UEFI mode, the
system will not be able to boot unless you select Legacy Boot or
similar ar restart....."
And when you look onto the MX wiki you read again this:
"32-bit installation requires UEFI with Legacy BIOS"
Now what? Can we do somthing about it?

Yes, we can! Actually, this is not valid any longer. You can install 32-bit MX-Linux onto a System with 64bit UEFI firmware. So in this sense is a limitation by the MX installer itself, which is not needed (an installer bug).

Quick Fix:
How to install 32bit MX Linux on a 64bit UEFI system

When booted life update und install the required 64bit-efi libs:

Code: Select all

sudo apt update

Code: Select all

sudo apt install grub-efi-amd64-bin
als perhaps install the also latest installer:

Code: Select all

sudo apt install mx-installer
When the installer shows the "wrong" above warning, do proceed,
do manual add partitions for ESP (fat32), root, swap. Mark ESP-partition with boot+esp flag.
EDIT: Do create a new GPT partition table before adding partitions.
Install and do select without GRUB, as the installer will not allow you to install into UEFI mode.
when finished don't reboot yet,
run
chroot-rescue-scan into the installed system.
mount the esp-partiotin (e.g. /dev/sda1):

Code: Select all

mkdir /boot/efi
mount -t vfat /dev/sda1 /boot/efi
and install GRUB 64bit for the 32bit MX Linux:

Code: Select all

grub-install  --no-nvram --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX --recheck 
If that works and you got no error.
rerun this with also populating the UEFI-bootmenu (efivars)

Code: Select all

grub-install  --force-extra-removable --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX --recheck 
If you got on error about missing x86_64-efi modules, then you might need also reinstall again the missing 64bit:

Code: Select all

apt update

Code: Select all

apt install grub-efi-amd64-bin
After having installed the 64bit grub-efi do create the boot menu with:

Code: Select all

update-grub
Exit the chroot, and reboot.
:puppy:
EDIT: adjusted the description of the issue
You do not have the required permissions to view the files attached to this post.
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
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: EFI bootloader for 32-bit UEFI

#10 Post by Head_on_a_Stick »

rek769 wrote: Wed Jul 10, 2019 3:14 pm So, next problem is how to get a 32-bit Firefox to work...
Why do you need 32-bit Firefox? MX supports multiarch, if that's what you mean, see the Debian guide:

https://wiki.debian.org/Multiarch/HOWTO

@fehlix: the OP says they have now installed the 64-bit version of MX.
mod note: Signature removed, please read the forum rules

Post Reply

Return to “Bugs and Non-Package Requests Forum”