从 U 盘启动 memtest86

booting memtest86 from USB stick

我想使用 syslinux 从我的 USB 记忆棒启动 memtest86

我已经安装了软件包 memtest86memtest86+ 并将 .bin 文件复制到我的 U 盘。

我已将条目添加到 syslinux.cfg:

LABEL memtest
    MENU LABEL Memtest86
    KERNEL memtest86.bin

LABEL memtest+
    MENU LABEL Memtest86+
    KERNEL memtest86+.bin

但这不起作用。当我启动时,我的屏幕上不断打印输出:

0104
0104
0104
...

如何从 U 盘启动 memtest86

长话短说:

  • 请将 KERNEL 命令替换为 LINUX
  • 将您的 memtest86.bin 重命名为 memtest86 或其他名称。

来自syslinux wiki

KERNEL file

Select the file SYSLINUX will boot. The "kernel" doesn't have to be a Linux kernel, it can be a boot sector or a COMBOOT file.

Because neither Linux kernel boot sector images, nor COMBOOT files have reliable magic numbers, Syslinux will look at the file extension. The following extensions are recognized (case insensitive):

none or other - Linux kernel image

.bin - CD boot sector

...

使用这些关键字之一而不是 KERNEL 会强制文件类型,而不管文件名:

LINUX 图片

您可以使用它,而不是使用 KERNEL 文件来引导 linux 内核映像。

...

因此您的 memtest86 内核被错误地识别为引导扇区映像。

this blog post也有类似的报道:

When trying to boot Memtest86 I see "0104" repeating forever. What's wrong?

You probably called the kernel "memtest86.bin". If the file extension is ".bin", PXELinux will try to load the file as a MBR instead of a kernel file. Rename the file and change the configuration, everything will work fine then.