Skip to main content

tftp - Error loading my BCD when trying to PXE boot to Windows PE



I'm trying to set up an ubuntu server with pxelinux, so I can boot Windows PE using PXE. On the client machine, I can see that pxelinux itself works, but the next screen is this:



error







Here is what I did:



Step 1: Installed tftpd-hpa and dhcp3 on the server. The server is a fresh ubuntu server x86 virtual machine. Static IP is 192.168.26.0. Samba server is installed.



dhcpd.conf contains



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;
}


I have verified that TFTP and DHCP work.



Step 2: Downloaded pxelinux.0 from the ubuntu repository. Put it in the tftpboot directory and created pxelinux.cfg/default with these contents:



DEFAULT winpe


PROMPT 0
TIMEOUT 300

MENU TITLE PXE

LABEL winpe
MENU LABEL Windows PE
KERNEL Boot/pxeboot.0



I've tried using Wdsnbp.0 (-> Wdsnbp.com), instead of pxeboot.0 (-> pxeboot.com) made no difference.



I want to make a real menu with ubuntu options later.



Step 3: Downloaded and installed the Windows Automated Installation Kit for Windows 7 and installed it on a fresh Windows 7 x64 vm.



I followed these instructions in the WAIK.chm file that comes with the download. Short version:



Copying Files and stuff:




copype.cmd x86 c:\winpe_x86


I want to provide an x86 winpe image.



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 usage:




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 is the guid returned from the previous command.



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 reported each operation as successful. The BCD file is capitalized.



Step 4: I created some symbolic links (advice from this German source):



ln -s Boot boot

ln -s Boot/bootmgr.exe bootmgr.exe
ln -s Boot/pxeboot.n12 Boot/pxeboot.0


Unfortunately that source deals with Windows Vista and Windows PE 2.0, whereas I'm using Windows 7 and Windows PE 3.0, but those links can't harm I guess. Using pxeboot.com instead of pxeboot.n12 does not fix the problem. The only difference is that you have to press F12 to boot. A sign that the system works at least on a basic level (i.e. it can at least load pxeboot.n12 and bootmgr.exe).



I also added this remap-rule to /etc/tftp_remap.conf to avoid problems with path separators:



rg \\ /



I'm out of ideas. I recreated the BCD several times. I also tried using the BCD that you can find in the WAIK folders, no success. Googling this error unfortunately only yielded irrelevant information to me (i.e. how to repair this problem with existing Windows installations).


Answer



It turned out to be a rather embarrasing mistake.



Inside /etc/default/tftp.conf, I used the wrong syntax to point to the /etc/tft_remap.conf file. The correct file contents are these:



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"


Comments

Popular posts from this blog

linux - iDRAC6 Virtual Media native library cannot be loaded

When attempting to mount Virtual Media on a iDRAC6 IP KVM session I get the following error: I'm using Ubuntu 9.04 and: $ javaws -version Java(TM) Web Start 1.6.0_16 $ uname -a Linux aud22419-linux 2.6.28-15-generic #51-Ubuntu SMP Mon Aug 31 13:39:06 UTC 2009 x86_64 GNU/Linux $ firefox -version Mozilla Firefox 3.0.14, Copyright (c) 1998 - 2009 mozilla.org On Windows + IE it (unsurprisingly) works. I've just gotten off the phone with the Dell tech support and I was told it is known to work on Linux + Firefox, albeit Ubuntu is not supported (by Dell, that is). Has anyone out there managed to mount virtual media in the same scenario?

hp proliant - Smart Array P822 with HBA Mode?

We get an HP DL360 G8 with an Smart Array P822 controller. On that controller will come a HP StorageWorks D2700 . Does anybody know, that it is possible to run the Smart Array P822 in HBA mode? I found only information about the P410i, who can run HBA. If this is not supported, what you think about the LSI 9207-8e controller? Will this fit good in that setup? The Hardware we get is used but all original from HP. The StorageWorks has 25 x 900 GB SAS 10K disks. Because the disks are not new I would like to use only 22 for raid6, and the rest for spare (I need to see if the disk count is optimal or not for zfs). It would be nice if I'm not stick to SAS in future. As OS I would like to install debian stretch with zfs 0.71 as file system and software raid. I have see that hp has an page for debian to. I would like to use hba mode because it is recommend, that zfs know at most as possible about the disk, and I'm independent from the raid controller. For us zfs have many benefits, ...

linux - Awstats - outputting stats for merged Access_logs only producing stats for one server's log

I've been attempting this for two weeks and I've accessed countless number of sites on this issue and it seems there is something I'm not getting here and I'm at a lost. I manged to figure out how to merge logs from two servers together. (Taking care to only merge the matching domains together) The logs from the first server span from 15 Dec 2012 to 8 April 2014 The logs from the second server span from 2 Mar 2014 to 9 April 2014 I was able to successfully merge them using the logresolvemerge.pl script simply enermerating each log and > out_putting_it_to_file Looking at the two logs from each server the format seems exactly the same. The problem I'm having is producing the stats page for the logs. The command I've boiled it down to is /usr/share/awstats/tools/awstats_buildstaticpages.pl -configdir=/home/User/Documents/conf/ -config=example.com awstatsprog=/usr/share/awstats/wwwroot/cgi-bin/awstats.pl dir=/home/User/Documents/parced -month=all -year=all...