我遇到了与@coversnail相同的问题:如何将Memtest86+选项添加回Grub菜单?
问题是:在GRUB中,我只能在旧的内核版本和实际的Ubuntu版本之间进行选择。没有其他选项。
我想运行memtest86+
。它已安装并位于/etc/grub.d/
,但不在GRUB本身中。我有点困惑。
我遇到了与@coversnail相同的问题:如何将Memtest86+选项添加回Grub菜单?
问题是:在GRUB中,我只能在旧的内核版本和实际的Ubuntu版本之间进行选择。没有其他选项。
我想运行memtest86+
。它已安装并位于/etc/grub.d/
,但不在GRUB本身中。我有点困惑。
sudo add-apt-repository ppa:adabbas/1stppa
sudo apt-get update
sudo apt-get install grub-customizer
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 b4d22d74-d1db-44c3-a834-e879263662f5
else
search --no-floppy --fs-uuid --set=root b4d22d74-d1db-44c3-a834-e879263662f5
fi
linux16 /boot/memtest86+.bin
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 b4d22d74-d1db-44c3-a834-e879263662f5
else
search --no-floppy --fs-uuid --set=root b4d22d74-d1db-44c3-a834-e879263662f5
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
/boot/grub
是存储Grub 2模块的位置,你会找到ext2.mod。没有ext4.mod。 - Mitch我知道这是一个旧帖子,但它仍然在搜索中出现,所以我将提供一个解决方案。
大多数发行版都提供memtest86+。它与UEFI不兼容,因为UEFI不支持16位。然而,PassMark Memtest86(5版本或更高版本)支持UEFI。
首先,获取memtest文件。下载USB启动镜像。http://memtest86.com/download.htm接下来,从镜像中提取文件。我将镜像刻录到闪存驱动器上,以便在多台计算机上安装。
第二步,安装memtest86。我在我的硬盘末尾创建了一个500MB的分区,并格式化为FAT32。然后将所有文件从闪存驱动器复制到该分区。注意:也可以安装到EFI目录中,但需要对文件进行重命名,以避免覆盖现有的引导文件。
第三步,配置grub2-efi菜单项。有很多方法可以添加一个条目,但是最安全的方法是在update-grub更新后仍然生效。使用root权限创建文件/etc/grub.d/39_memtest,并将其设置为可执行。(注意:更改文件名中的数字会改变它在grub菜单中显示的位置。请勿将其设置低于6,以确保标题和主题先运行)#!/bin/sh
echo "Adding Memtest86" >&2
exec tail -n +3 $0
menuentry "Memtest86" {
chainloader (hdx,y)/efi/boot/bootx64.efi
}
EOF
然后运行update-grub命令。现在您应该有一个可以启动Memtest86的菜单项。