터미널을 열고 실행 해보십시오
sudo chmod +x /etc/grub.d/20_memtest86+
sudo update-grub
그것이 있는지 확인하십시오
grep memtest /boot/grub/grub.cfg
내가 사용하지 않도록 설정 한 것과 동일하게 수행
hob@hob-HP-dx5150-MT:~$ cat /boot/grub/grub.cfg |grep memtest
hob@hob-HP-dx5150-MT:~$ sudo chmod +x /etc/grub.d/20_memtest86+
[sudo] password for hob:
hob@hob-HP-dx5150-MT:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 11.10 (11.10) on /dev/sda6
Found Trisquel 5.5 (5.5) on /dev/sda8
Found Ubuntu 12.04 LTS (12.04) on /dev/sda9
done
hob@hob-HP-dx5150-MT:~$ cat /boot/grub/grub.cfg |grep memtest
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
### END /etc/grub.d/20_memtest86+ ###
터미널에 nano를 사용하여 파일이 없으면 파일을 만들 수 있습니다.
sudo nano /etc/grub.d/20_memtest86+
또는 GUI 편집기
gksudo gedit /etc/grub.d/20_memtest86+
그것을 채우십시오
#!/bin/sh
set -e
if [ -f /usr/lib/grub/grub-mkconfig_lib ]; then
. /usr/lib/grub/grub-mkconfig_lib
LX=linux16
elif [ -f /usr/lib/grub/update-grub_lib ]; then
. /usr/lib/grub/update-grub_lib
LX=linux
else
# no grub file, so we notify and exit gracefully
echo "Cannot find grub config file, exiting." >&2
exit 0
fi
# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
/dev/loop/*|/dev/loop[0-9]) exit 0 ;;
esac
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
if test -e /boot/memtest86+.bin ; then
MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
echo "Found memtest86+ image: $MEMTESTPATH" >&2
cat << EOF
menuentry "Memory test (memtest86+)" {
EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
$LX $MEMTESTPATH
}
menuentry "Memory test (memtest86+, serial console 115200)" {
EOF
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
$LX $MEMTESTPATH console=ttyS0,115200n8
}
EOF
fi
#if test -e /boot/memtest86+_multiboot.bin ; then
# MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+_multiboot.bin" )
# echo "Found memtest86+ multiboot image: $MEMTESTPATH" >&2
# cat << EOF
#menuentry "Memory test (memtest86+, experimental multiboot)" {
#EOF
# printf '%s\n' "${prepare_boot_cache}"
# cat << EOF
# multiboot $MEMTESTPATH
#}
#menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
#EOF
# printf '%s\n' "${prepare_boot_cache}"
# cat << EOF
# multiboot $MEMTESTPATH console=ttyS0,115200n8
#}
#EOF
#fi
나중에 chmod + x 명령을 실행하십시오.
그래도 누락 된 것에 대해 약간 걱정할 것입니다-grub.d에 다른 모든 것이 있습니까?
ls /etc/grub.d/
00_header 10_linux.bak 20_memtest86+ 41_custom
05_debian_theme 10_linux.dpkg-old 30_os-prober README
10_linux 20_linux_xen 40_custom