我试图用pxelinux设置一个ubuntu服务器,所以我可以使用PXE启动Windows PE。 在客户端机器上,我可以看到pxelinux本身工作,但下一个屏幕是这样的:

这是我做的:
步骤1:在服务器上安装tftpd-hpa和dhcp3 。 该服务器是一个新鲜的Ubuntu的服务器x86虚拟机。 静态IP是192.168.26.0 。 Samba服务器已安装。
dhcpd.conf包含
subnet 192.168.26.0 netmask 255.255.255.0 { range 192.168.26.10 192.168.26.40; filename "pxelinux.0"; next-server 192.168.26.0; }
我已经validationTFTP和DHCP的工作。
第2步:从ubuntu存储库下载pxelinux.0 。 把它放在tftpboot目录pxelinux.cfg/default用下面的内容创buildpxelinux.cfg/default :
DEFAULT winpe PROMPT 0 TIMEOUT 300 MENU TITLE PXE LABEL winpe MENU LABEL Windows PE KERNEL Boot/pxeboot.0
我试过使用Wdsnbp.0( – > Wdsnbp.com),而不是pxeboot.0( – > pxeboot.com)没有任何区别。
我想以后用ubuntu选项做一个真正的菜单。
步骤3:下载并安装适用于Windows 7的Windows自动安装工具包,并将其安装在全新的Windows 7 x64 vm上。
我遵循下载的WAIK.chm文件中的这些说明。 简洁版本:
复制文件和东西:
copype.cmd x86 c:\winpe_x86
我想提供一个x86 winpe映像。
imagex /mountrw C:\winre_x86\winpe.wim 1 C:\winpe_x86\mount net use y: \\192.168.26.0\TFTPRoot y: md Boot cd \temp\Windows\Boot\PXE copy c:\winpe_x86\mount\Windows\Boot\PXE\*.* y:\Boot copy c:\Program Files\WAIK\Tools\PETools\x86\boot\boot.sdi y:\Boot Imagex /unmount C:\winpe_x86\mount copy c:\winpe_x86\winpe.wim y:\Boot\boot.wim
BCDEdit用法:
Bcdedit -createstore c:\BCD Bcdedit -store c:\BCD -create {ramdiskoptions} /d “Ramdisk options” Bcdedit -store c:\BCD -set {ramdiskoptions} ramdisksdidevice boot Bcdedit -store c:\BCD -set {ramdiskoptions} ramdisksdipath \boot\boot.sdi Bcdedit -store c:\BCD -create /d “MyWinPE Boot Image” /application osloader
guid1是从前一个命令返回的guid。
Bcdedit -store c:\BCD -set {guid1} systemroot \Windows Bcdedit -store c:\BCD -set {guid1} detecthal Yes Bcdedit -store c:\BCD -set {guid1} winpe Yes Bcdedit -store c:\BCD -set {guid1} osdevice ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions} Bcdedit -store c:\BCD -set {guid1} device ramdisk=[boot]\Boot\boot.wim,{ramdiskoptions} Bcdedit -store c:\BCD -create {bootmgr} /d “Windows BootManager” /inherit {dbgsettings} Bcdedit -store c:\BCD -set {bootmgr} timeout 30 Bcdedit -store c:\BCD -displayorder {guid1} copy c:\BCD \\server\TFTPRoot\Boot
BCDEdit报告每个操作都是成功的。 BCD文件是大写的。
第四步:我创build了一些符号链接(来自德国的build议):
ln -s Boot boot ln -s Boot/bootmgr.exe bootmgr.exe ln -s Boot/pxeboot.n12 Boot/pxeboot.0
不幸的是,这个源代码涉及Windows Vista和Windows PE 2.0,而我正在使用Windows 7和Windows PE 3.0,但这些链接不会损害我的猜测。 使用pxeboot.com而不是pxeboot.n12不能解决问题。 唯一的区别是你必须按F12启动。 系统至less在基本级别上运行的一个标志(即至less可以加载pxeboot.n12和bootmgr.exe )。
我还将这个重映射规则添加到/etc/tftp_remap.conf以避免path分隔符的问题:
rg \\ /
我没有想法。 我重新创build了几次BCD。 我也尝试使用可以在WAIK文件夹中find的BCD,但没有成功。 不幸的是,这个错误使用Googlesearch只能产生不相关的信息(即如何用现有的Windows安装来修复这个问题)。
原来是一个相当尴尬的错误。
在/etc/default/tftp.conf ,我使用了错误的语法来指向/etc/tft_remap.conf文件。 正确的文件内容是这些:
TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -l -v -m /etc/tftp-remap.conf "