OT: Working on script to add Memtest86+ version 6.20 to Fedora boot menu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The latest broken setup is for
149856 Jul 22  2022 /boot/memtest86+-5.31
There is a bugzilla working on adding 6.x but has been a work in progress for some time.
The 5.31 only installs for non-UEFI and doesn't actually work. (At least for me) memtest-setup doesn't run on UEFI setups..
I've found that the 6.0, 6.10, and now 6.20 versions do work with Fedora 36 and Fedora 37 if manually setup..
Does not work if Secure Boot is turned on, since files don't the the Micro$oft blessed signatures.
My script works for my machines, but have just basic setups. Don't know if code could be added check for situations were it wouldn't work.
Script gets the latest version of memtest files from site, and copies them to /boot directory and creates a /etc/grub.d/20_memtest86+ file that would require grub2-mkconfig to be run to create the boot menu option.
This is my 6th version of script. Perhaps someone with more knowledge would have suggestions to make it better or say if it is just better to wait for an official update? I just like having memtest available.
My script getmemtest6.sh
#!/usr/bin/bash
clear
mkdir /tmp/memtest
cd    /tmp/memtest
rm index.html -f
wget https://memtest.org/
f=$(grep -m1 binaries.zip <index.html | cut -f2 -d\")
rm index.html -f
wget -nc https://memtest.org/$f
echo $f
zip=$(echo $f | cut -f4 -d/)
unzip -u $zip
boot=$(find / -maxdepth 2 -iname loader | sed 's_/loader__')
echo $boot
cp memtest64.* $boot -p -v
ver=$(echo $zip | cut -b10-13);
{
printf "# \x21/bin/sh\nexec tail -n +3 \$0\n# This file provides an easy way to add custom menu entries.  Simply type the\n";
printf "# menu entries you want to add after this comment.  Be careful not to change\n# the 'exec tail' line above.\n" ;
printf "menuentry 'Memtest Legacy' {\n echo 'Loading memtest $ver for BIOS BOOT SYSTEM'\n linux /memtest64.bin\n}" ;
printf "\nmenuentry 'Memtest UEFI' {\n echo 'Loading memtest $ver for UEFI BOOT SYSTEM'\n linux /memtest64.efi\n}\n";  } >/etc/grub.d/20_memtest86+
chmod 755 /etc/grub.d/20_memtest86+
 
Script creates /tmp/memtest to handle files.
uses wget to get the latest index.htm file from site.
finds the latest line with binaries.zip
Then downloads that file and unzips it.
Was talk of different possible boot directory locations??
So have an option to locate it?? Might just be better to hard code /boot?
Have it copy the two memtest64 files to /boot.
144344 May  7 17:06 /boot/memtest64.bin
145408 May  7 17:06 /boot/memtest64.efi
There are 32 bit versions also.
Pull the version from file, and then manually create /etc/grub.d/20_memtest86+ very basic file.
In my G4L project that uses grub4dos, had to use memtest64.bin if booting from regular grub4dos and memtest64.efi if booting from grub4dos-efi.
Otherwise gets errors with other file.
grub2 seems to handle either version of file?
But make the 20_memtest86+ to have option for both?
Script doesn't run the grub2-mkconfig file like the old Fedora process with memtest-setup would then just say it needs to be run.
Perhaps memtest isn't important to many. Once had a new $8000 HP server that had weird issues, and memtest found a problem that only happened at test8.
Vendor then replace ram. Recently had a machine that had worked fine for many years with 4 4G sticks. But was having random issues. memtest failed with all 4 modules. After testing. Found that all 4 memmory sticks passed all test if run individual. Turned out the 3rd slot has something wrong. So machine passes all these with slots 0,1, and 3 populated.
Thanks for any suggestions..
+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)    
 mailto:mikes@xxxxxxxx                           
 mailto:msetzerii@xxxxxxxxx
 Guam - Where America's Day Begins                       
 G4L Disk Imaging Project maintainer
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux