我知道有关此事的多个问题,但这个问题似乎有所不同。这是我们的 PXE 启动服务器提供的 Grub 配置:
net_ls_addr
sleep -i 5
set retcode=$?
clear
if [ $retcode == 1 ]; then
quit
fi
if [ $retcode == 0 ]; then
quit
fi
if [ $retcode == 3 ]; then
terminal_output gfxterm
set gfxmode="800x600;640x480;auto"
set theme=theme.txt
fi
menuentry 'Install Custom CentOS 7 Linux x86_64 (CC7)' {
insmod progress
clear
#set net_default_server=linuxsofturl
echo -n 'loading kernel ...'
linuxefi (http)/aims/boot/CC7_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/7/os/x86_64/
clear
echo -n 'loading initrd ...'
initrdefi (http)/aims/boot/CC7_X86_64/initrd
}
如前所述,这会导致“您需要首先加载内核”。到目前为止,它运行良好。为了添加更多背景,直到两周前以下菜单项仍然有效:
menuentry 'Install CentOS 8 Linux x86_64 (C8)' {
insmod progress
clear
echo -n 'loading kernel ...'
linuxefi /aims/boot/C8_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/8/BaseOS/x86_64/os/ inst.addrepo=CUSTOM,http://linuxsofturl/centos/8/CUSTOM/x86_64/ inst.addrepo=locmap,http://linuxsofturl/internal/repos/potd8-stable/x86_64/os/ ks=http://linuxsofturl/linux/centos8/default.ks
clear
echo -n 'loading initrd ...'
initrdefi /aims/boot/C8_X86_64/initrd
}
menuentry 'Install Custom CentOS 7 Linux x86_64 (CC7)' {
insmod progress
clear
#set net_default_server=linuxsofturl
echo -n 'loading kernel ...'
linuxefi (http)/aims/boot/CC7_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/7/os/x86_64/
clear
echo -n 'loading initrd ...'
initrdefi (http)/aims/boot/CC7_X86_64/initrd
}
menuentry 'Install Scientific Linux Custom 6 x86_64 (SLC6)' {
insmod progress
clear
echo -n 'loading kernel ...'
linux (http)/aims/boot/SLC6X_X86_64/vmlinuz ip=dhcp repo=http://linuxsofturl/slc6X/x86_64/
clear
echo -n 'loading initrd ...'
initrd (http)/aims/boot/SLC6X_X86_64/initrd
}
menuentry 'Install RHEL 8.2 x86_64 (license required)' {
insmod progress
clear
echo -n 'loading kernel ...'
linux (http)/aims/boot/RHEL_8_2_X86_64/vmlinuz ip=dhcp repo=http://linuxsofturl/enterprise/rhel/server/8/8.2/x86_64/
clear
echo -n 'loading initrd ...'
initrd (http)/aims/boot/RHEL_8_2_X86_64/initrd
}
似乎使用linux
+ (http) 或linuxefi
不使用 HTTP 协议(因此它将使用 TFTP,这会很慢)似乎可以解决问题,但到目前为止这一直有效是有原因的。
编辑:作为旁注,这是 TFTP 服务器的日志输出,请注意部分内容 206 HTTP 错误:
2020-09-14T15:06:36.618691+02:00 aimstest01 httpd: 128.142.32.27 - - [14/Sep/2020:15:06:36 +0200] "GET /aims/boot/CC7_X86_64/vmlinuz HTTP/1.1" 200 6762688 114153 "-" "GRUB 2.02~beta2"
2020-09-14T15:07:11.137769+02:00 aimstest01 httpd: 128.142.32.27 - - [14/Sep/2020:15:06:37 +0200] "GET /aims/boot/CC7_X86_64/vmlinuz HTTP/1.1" 206 6762688 34080353 "-" "GRUB 2.02~beta2"
答案1
使用 HTTP 作为协议意味着如果 KeepAliveTimeout 长于 Grub 的超时,内核下载将超时,并因上述错误而失败。减少 Apache 配置上的此值即可解决问题。