-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: add new memtest86+
to recovery options via systemd-boot
#291
Comments
I think it'd just require making a debian package for it which installs to that path and adds an entry.conf for it. Shouldn't require much or any change to the installer. |
Is there a way to make it so a Debian package won't install on non-UEFI systems? I know there's a lot of of people (myself included) who are still running Pop!OS on BIOS hardware. That was part of why I thought that doing it as part of the installer might be a better idea. Also, that wouldn't allow us to add it as a boot option to the installer ISO, right? |
The installer would only make it available for new installs. A package could make it available to all systems in an update. The debian package could use a postinst script to copy the EFI binary to the EFI directory and set up the entry for it (if it even requires a boot conf), and a postrm script could remove it. The script could do nothing on a system without an EFI partition mounted. |
If you think that's the better solution, I'll look into how I can create a Debian package for this instead of adding it to the Pop!OS installer setup. |
I think it would be better to have the Support would be able to request install of the deb package again if the memory test is not found in the With this design, would the Pop!OS ISO have the entry as well? |
I don't think that it would, but something like that could be added separately. |
I feel like having the package remain as part of the resulting install would be important because then it could be updated with a new EFI binary as part of your normal The Pop!OS ISO would need to have it added to the opening menu, I think? On UEFI systems it shows the "Try or Install Pop_OS" screen, which only has the one menu option at the moment. Adding a second one ("Test System Memory" perhaps) would be a matter of adding the menu option to |
I'm working on a proof-of-concept for this (with a package name named
This is not a unique problem. as there's a Raspbian hack to get around the same problem and a Ubuntu issue about this is almost ten years old, etc. If anyone here has any ideas about the proper way to work around this problem? I'm looking into options but they're all a bit hacky. Or would this be something better handled by the same tools that maintain the recovery partition? |
Perhaps the package shouldn't be placing files in the EFI partition directly, but through a postinst / postrm script. |
That was in fact my thought. Right now they're being placed using a
If they're instead placed via a |
Yes there wouldn't be a symlink issue to worry about. All the packages that add files to the EFI partition (kernelstub, grub) make the EFI installation a separate part of the package installation. kernelstub gets run with initramfs updates which copies kernels over and generates configs. There could be an initramfs hook that installs the files if they're missing, if not done directly by the postinst. |
The package would install the files to somewhere in This seems like a good way to move forward, and I'll try to find the least hacky way to get the |
I've got a prototype in place that installs, uninstalls, upgrades, etc: https://github.com/cwsystem76/pop-diagnostics Rather than moving this repo to the |
Summarizing some Slack discussion here:
|
Name of the update script would be |
I was thinking |
The latest commit now has
A future version of this script will add an "options" verb to let |
The "options" feature has been added to
will write a custom configuration file that will not use the new USB keyboard drivers, and will instead rely on the UEFI firmware to initialize the keyboard in legacy mode. |
The current Beta 2 build doesn't work with the latest Coreboot firmware on my oryp6, but the dev build from nightly source does. One of a few reasons to hold off on any public release until it's out of beta and we've done a lot more testing. [edit] This problem has been resolved. |
The open-source memtest86+ (http://memtest.org/, distinct from the commercial memtest86 owned by PassMark at https://www.memtest86.com/) is under active development again. V6 is going to go into beta testing later this April, and it includes new features to make it useful once more, such as UEFI support, DDR5 testing, and more. But the most interesting feature that I'm seeing is that it compiles EFI executables by default, which work as expected when added to the
/boot/efi
partition.This would allow us to add the new
memtest86+
to our default Pop!OS installs, as another boot option that users can choose along with the recovery partition. I feel like this would be very useful for troubleshooting purposes, and could be a proof-of-concept for adding other hardware troubleshooting tools to the EFI partition. Thememtest.efi
file is 135k and should not cause any space issues on/boot/efi
.The following commands will build the new
memtest86+
(v6 alpha) to include both an ISO you can burn to a USB stick and amemtest.efi
file (although additional packages may be required,xorriso
was the only additional one I had to install myself):Then copy
memtest.efi
to/boot/efi/EFI/memtest/memtest.efi
, and create/boot/efi/loader/entries/memtest.conf
that contains the following:This works in a UEFI VM and on my


oryp6
. See the following photos:You can also add it to the firmware's boot device listing via
efibootmgr
, but I feel like the more important thing is having it in thesystemd-boot
menu, since that's where our users go to choose the recovery partition, and the command to open up that menu is universal across hardware (i.e. hold down the spacebar).And if there's also a way to add this to the installer ISO, as an option in the initial boot menu, that would make this useful for folks at the factory who are doing installation and testing, as well as for people trying to install Pop!OS and can't because they have a hardware problem. I don't know if that would be done with an EFI file or with something else, like the floppy image.
I've been told that it was determined that we can't do this kind of thing with the commercial
memtest86
from PassMark, but this project appears to be fully GPL2 (https://github.com/memtest86plus/memtest86plus/blob/main/LICENSE) so there shouldn't be any insurmountable licensing issues.Caveats:
memtest86+
v6 is still in an alpha state, with a beta in late April 2022, so while testing might be worth doing right now, we probably shouldn't actually add this to the shipping product until later. Maybe the beta will be stable enough to start shipping it, maybe not.Also, we would clearly need to test this on a wide variety of hardware, especially our desktop PC line (Thelio and Meerkat) because
memtest86+
has a new keyboard detection system (as outlined on the GitHub page) which may not reliably detect external USB keyboards on all systems just yet, or may require booting with CSM and/or legacy modes enabled.I'm not sure how difficult this would be to add to our installer, but I feel like the best option here would be to treat it like the recovery partition, since it also will only be present on UEFI systems. Pop!OS could also possibly update the EFI executable independent of the OS, using the same mechanism used to update the recovery partition.
You can supposedly change the order of the options in the
systemd-boot
menu with asort-key
option in the configuration file (see https://systemd.io/BOOT_LOADER_SPECIFICATION/), but I couldn't get it to work. I think it needs to have asort-key
in all of the configuration files under/boot/efi/loader/entries/
for this to work correctly, but I didn't mess with the ones automatically generated by Pop!OS to test this.Finally, even if the EFI executable doesn't turn out to be feasible to include in Pop!OS, we should be happy that there's once again going to be a fully open-source memtest that we can refer users to, that won't nag them to install a "Pro" version.
The text was updated successfully, but these errors were encountered: