LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-02-2017, 01:40 PM   #1
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Rep: Reputation: 0
memtest86 EFI Grub Installation


I am trying to get memtest86 running without having to use a boot key/disc. I want to run it from my hard drive. I have copied the Passmark memtest86 EFI directory to /boot/efi/EFI/memtest86 and it contains BOOTX64.EFI.

I added the following to my /etc/grub.d/40-custom file:

Code:
menuentry 'PassMark MemTest86 (x64)' {
    set root=(hd0,gpt2) 
    chainloader (${root})/EFI/memtest86/BOOTX64.EFI
}
And it is showing the entry in my grub menu correctly. However, when I try to boot it is not finding the entry. I am using LVM with LUKS encryption. I'm not sure if that is the problem, but any help to get this working is very appreciated.
 
Old 06-02-2017, 03:15 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 37
You need to put it in /boot for it to work.
 
Old 06-02-2017, 07:28 PM   #3
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
It is in /boot/efi/EFI/memtest86, is that not correct?
 
Old 06-03-2017, 07:40 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,388

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
It is in /boot/efi/EFI/memtest86, is that not correct?
That is not what the menuentry in your original post is indicating. If it is in /boot/efi/EFI, you should have that. Seems a little odd to have a chainload entry for memtest?
 
Old 06-03-2017, 09:26 AM   #5
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I updated the /etc/grub.d/40-custom file to:

Code:
menuentry 'PassMark MemTest86 (x64)' {
    set root=(hd0,gpt2) 
    chainloader (${root})/boot/efi/EFI/memtest86/BOOTX64.EFI
}
It is still not working. Saying BOOTX64.EFI is not found. What should I do instead of chainloader? I really want to get this working. I would just use memtest86+ that ships with Ubuntu, but it does not work with UEFI.
 
Old 06-03-2017, 06:45 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
I don't think chainloader is the correct tool. I think you need BOOTX64 in a kernel line. Sometimes it seems like things should work a certain way. But I've learned not to fight it too much.

Last edited by AwesomeMachine; 06-03-2017 at 06:47 PM.
 
Old 06-04-2017, 09:46 AM   #7
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Can you explain how to add BOOTX64 in a kernel line?
 
Old 06-04-2017, 04:58 PM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Look at any old kernel line and instead of the name of the kernel put /path/BOOTX64.EFI. You don't need the initrd line. You'll need to work a bit to make it persistent.
 
Old 06-04-2017, 05:45 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,388

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
You indicate that the memtest and "BOOTX64.EFI" are in the path: /boot/efi/EFI so try the entry below on the kernel line instead of the chainloader entry:

Quote:
linux /boot/efi/EFI/memtest86
I don't use EFI so I don't know if you need the BOOTX64.EFI at the end? You said you made the change in the 40_custom file. Did you update grub with the grub-mkconfig command as that is necessary when making a change to that file. You could simply edit grub.cfg and then not have to update grub but simply reboot as you are only testing. If an entry works, then put it in 40_custom and update grub.

Are you sure the file in question is BOOTX64.EFI and not bootx64.efi. Makes a difference I expect.
If your boot/efi partition is sda2 as shown above, what's sda1?
 
Old 06-05-2017, 09:40 AM   #10
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I tried loading using `linux` instead of `chainloader` and it is still not finding the file.

Quote:
If your boot/efi partition is sda2 as shown above, what's sda1?
Code:
/dev/sda2                            473M  199M  250M  45% /boot
/dev/sda1                            511M   16M  496M   4% /boot/efi
Code:
!#$ ls /boot/efi/EFI/memtest86/BOOTX64.EFI 
/boot/efi/EFI/memtest86/BOOTX64.EFI
also

Code:
!#$ ls /boot/efi/EFI/memtest86/
BENCHMAR  BOOTIA32.EFI  BOOTX64.EFI  MT86.PNG  UNIFONT.BIN


I feel like I am not referencing the root directory properly possibly. I have tried with and without in many combinations, such as the following:

Code:
set root=(hd0,gpt2)
linux (${root})/boot/efi/EFI/memtest86/BOOTX64.EFI
or

Code:
set root=(hd0,gpt2)
linux (${root})/EFI/memtest86/BOOTX64.EFI
or

Code:
linux /boot/efi/EFI/memtest86/BOOTX64.EFI
or

Code:
linux /boot/efi/EFI/memtest86/
Should I rename BOOTX64.EFI to bootx64.efi? Should I set root to GPT1, to reference a different path for root? Is root a global variable in these examples or just with local scope, for when (${root}) is referenced in the loader statement? Thank you for helping out with this.
 
Old 06-05-2017, 11:52 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,388

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
/dev/sda1 511M 16M 496M 4% /boot/efi
That shows your efi partition is actually sda1. I'd try changing the "set root" line to the entry below to test:

Quote:
set root=(hd0,gpt1)
Quote:
Should I rename BOOTX64.EFI to bootx64.efi?
No, your ls output clearly shows the file name is upper case. Doy you get a file not found error message or some other error? I don't know why you have two /boot partitions, one with the EFI files and one with whatever is in it but then I don't use EFI or LVM so I'm not sure what you should see?

You might post the output (run as root) of gdisk -l to show all partitions and someone familiar with LVM and EFI might have a suggestion.
 
Old 06-05-2017, 07:04 PM   #12
AceTech
LQ Newbie
 
Registered: Dec 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I think it is finding the BOOTX64.EFI file now. Im getting the following error though:

Code:
Error: Invalid magic number.
I'm not sure what this error means and tried googling it and could not find any information to determine what it is.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move grub to efi partition dpeterson3 Linux - Software 1 05-04-2015 06:16 PM
Elementary Luna 'grub-efi package' Installation Failure AmsterDan Linux - Newbie 3 01-17-2015 10:00 PM
How to boot Slackware using Grub EFI arubin Slackware 3 11-04-2012 06:30 AM
EFI Compliant Grub raj010 Linux - Newbie 1 12-29-2010 04:05 PM
Are Memtest86 and Memtest86+ best for checking memory MQMan Linux - Hardware 4 09-14-2007 10:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration