fog pxe/iPxe boot win 7 wimboot CD/DVD missing issue

  • Ok, so I have seen several topics or threads on this. However, I still can not get past the spot of supposedly needing a driver or that windows install is missing the CD/DVD drive. I can wimboot just fine(or seems to) as I can get to the Install windows button. I can also get the NIC to work and map a drive back to the sources directory. However, when I run setup.exe from sources I still get that CD/DVD drive error that looks like a driver is missing.


    My adv fog pxe wimboot script…

    kernel http://${fog-ip}/fog/service/ipxe/Win7/wimboot pause gui
    #initrd http://${fog-ip}/fog/service/ipxe/Win7/x32/bootmgr                    bootmgr
    initrd http://${fog-ip}/fog/service/ipxe/Win7/x32/boot/bcd                    bcd
    initrd http://${fog-ip}/fog/service/ipxe/Win7/x32/boot/boot.sdi             boot.sdi 
    initrd http://${fog-ip}/fog/service/ipxe/Win7/x32/sources/boot.wim      boot.wim
    imgstat || echo "ERROR at IMGSTAT"; sleep 3
    prompt || echo "ERROR at PROMPT"; sleep 3
    boot || echo "ERROR AT BOOT"; sleep 3;goto MENU

    Since I found this script I modified it for my locations. the last 3 lines may or may not be doing anything useful but were left there. At least since it boots I don’t know that the echos and sleeps actually do anything.

    When I get booted to the winpe setup I shift-f10 to get the cmd prompt.
    On the laptop I use drvload to enable to NIC.
    run wpeinit
    Once I get an IP I map a drive back to sources.
    cd as needed and run setup.exe
    usually nothing happens. So I click through and get the error screen.
    I rerun setup.exe and quickly close the initial setup.
    New setup appears with same error results.

    So, what is actually missing? Am i missing a step? Do the NIc drivers have to be loaded/injected into the boot.wim file? Or can they be loaded manually if needed and still should work? Also I can only get to the new setup.exe after clicking through the initial setup that pops up. Is that part of the problem? Do i have to automate it with a script? I have read not to click on that first setup but thats the only way to see the new setup screen. I know, it sounds confusing. I understand from looking into it that this stems from missing setup info/files. But I dont know what is missing. I made the boot.wim file following instructions using the dism/imagex tools from MS. I can try and re-make it(again) but the files work from a usb drive. Or at least that’s the reference I used. A working win 7 bootable usb install.

    I am testing on DELL optiplex PCs and a dell mini laptop.
    Fog using 1.2.0 on Linux mint 17.3(ubuntu version 14.x)
    Fog runs OK
    Trying Win 7 currently
    Would like to add Win 10 but hear thats problematic for differenct reasons

    I understand that this isn’t a fog issue or that it’s not what it was intended for. But if anyone can give some ideas or clues on whats going on(or not going on as it may be) that would be awesome and appreciated.

    I’ll update with any needed info, however like many I come from windows. So you may have to help me with linux details.

    It’s just frustrating to be so close and follow the info out there and still not work. And not know why.


  • Moderator

    @echo off
    rem The fileserver IP
    rem Share on the fileserver.
    rem Username for the share
    set SHAREUSER=root
    rem Password for the share
    set SHAREPASS=root
    rem amd64 or x86
    set ARCH=amd64
    rem Path to hold working files. Needs about 500MB of free space.
    set PEPATH="c:\winpe_%ARCH%"
    rem ##########################################################
    rem     Don't edit anything below here
    rem ##########################################################
    echo Creating the PE image
    call copype.cmd %ARCH% %PEPATH% > NUL
    echo Mounting the image
    dism /Mount-Wim /WimFile:%PEPATH%\media\sources\boot.wim /index:1 /MountDir:%PEPATH%\mount /quiet
    echo Adding commands to the startup script in PE
    echo. >> %PEPATH%\mount\windows\system32\startnet.cmd
    echo ping %FILESERVER% >> %PEPATH%\mount\windows\system32\startnet.cmd
    echo net use z: \\%FILESERVER%\%SHARE% %SHAREPASS% /u:%FILESERVER%\%SHAREUSER% >> %PEPATH%\mount\windows\system32\startnet.cmd
    echo z: >> %PEPATH%\mount\windows\system32\startnet.cmd
    echo z:\64.bat >> %PEPATH%\mount\windows\system32\startnet.cmd
    echo Creating the pxeboot directory
    mkdir %PEPATH%\pxeboot > NUL
    mkdir %PEPATH%\pxeboot\Fonts > NUL
    copy /y %PEPATH%\mount\windows\boot\Fonts\*.* %PEPATH%\pxeboot\Fonts\ > NUL
    copy /y "%WinPERoot%\%ARCH%\Media\Boot\boot.sdi" %PEPATH%\pxeboot\ > NUL
    copy /y "%WinPERoot%\%ARCH%\Media\Boot\BCD" %PEPATH%\pxeboot\ > NUL
    echo Unmounting the image
    dism /unmount-Wim /MountDir:%PEPATH%\mount /Commit /quiet
    echo Optimizing the image
    imagex /EXPORT %PEPATH%\media\sources\boot.wim 1 %PEPATH%\pxeboot\boot.wim > NUL
    echo All the files you need for your PXE server are in: %PEPATH%\pxeboot\

    I use that batch file to easily create WinPE media for different Windows versions. It does require the imaging tools of the Windows Kits though, but I’m guessing most people will have that installed already.

    You can add and remove certain commands as needed of course, for eg adding drivers using dism and such.

  • @george1421
    Just wanted to add some more notes after using/trying this setup in another location.
    You may encounter rights issues and errors if nothing is changed. I opened up the File Browser as root to copy and paste files for Win setup along with other tools.

    You very likely may need to use chown and chmod to give proper access to your files. By default on my testing the user and group was set to root:root. I did NOT use root as my user when mapping my drive for pxe setup. So I needed to change.

    so you may need to try:

    #to change who owns the folder or files
    sudo chown -R jdoe:root /location/of/folder
    # use a "*" wildcard to do all items at named location or at 
    # current location
    sudo chown -R jdoe:root /location/of/files/*
    sudo chown -R jdoe:root *
    # you can use ls -l to check
    #for ref:
    #to change the actual rights, as in read/write/execute...
    sudo chmod 774 /location/of/folder/or files  (or again use a *)
    #again use ls -l to check
    # 774 will give user and group full rights. the 4 gives guest read only.  Not sure that full rights are needed but used to test and didn't reduce as of yet to know if just read or anything less will work.
    for ref:

    To recap my trials…
    At first I forgot to change user and mapped drive wouldn’t work. After changing user I would get access denied to setup.exe. After making sure I had rights to setup.exe, I got a winsetup.dll error. Saying it was corrupted or missing(Something like that I forget the actual wording now).

    I ended up recopying to be sure but ended up being a rights issue to the whole sources directory.

    Just wanted anyone else reading to know what you might run into. While I dont yet consider myself an expert here, I will be glad to answer questions if something is not clear. My knowledge has come from trial and errors, and then finally asking questions.
    thanks to all who have helped answer or wrote other related topics to get me/us here.

    Hope this helps someone.


  • Moderator

    @KnightRaven Oh cool tip!! Will test and include for sure. Thank you.

  • @george1421
    Another potential tip… When booting into winpe this way, it asks you to press a key to boot from cd/etc. You can delete(or rename as i did) the bootfix.bin file in the ISO/boot directory. When saving and creating the bootable iso it will be able to boot without prompting.

  • Moderator

    @KnightRaven said:

    It may be worth noting so there is no confusion(especialy in a more detailed tutorial) that the actual WinPE from the AIK appears to be needed. As opposed to using a boot.wim from regualr install media. It must point to a location that no longer exists(like USB/CD drives) causing setup to think it doesnt exist. Although an educated one, that is a completely wild guess.

    Yes this is what I was saying (at least in my head) all along. You can not use the boot.wim from the install CD, but from WAIK instead. Maybe I need to put the required software in the tutorial too.

    From the hardware / driver standpoint. The Dell driver pack is pretty good. That covers all of the dell line, which use common network and drive components. So it should work with the majority of other vendor’s devices. Now you may run into a one off situation. You can either remount the boot.wim you created and inject the driver or my preference is to rebuilt the boot.wim from the winpe.wim every time. We found that every time you mount and unmount the boot.wim it increases in size. Even if you open it and then close it right away without doing anything. So to keep the boot.wim the smallest possible recreate it each time you need to add drivers. If you create a batch script its easy to roll a new boot.wim file for each version.

    Thank you for the feedback.

  • @george1421
    So for that update. Yes HP has a winPE driver pack. Several depending on version needed. I tried booting the HP laptop with out injecting and it worked. So I may have just gotten lucky and the same drivers existed. Whatever the case I’m not complaining.

    It may be worth noting so there is no confusion(especialy in a more detailed tutorial) that the actual WinPE from the AIK appears to be needed. As opposed to using a boot.wim from regualr install media. It must point to a location that no longer exists(like USB/CD drives) causing setup to think it doesnt exist. Although an educated one, that is a completely wild guess.

    At any rate, rather it be drivers or a hard coded location of sorts, there is a difference in the WinPE boot environment and regular/Full boot environment.

    I’d be glad to offer help from my experiences if you write a tutorial. I was thinking of doing the same but my thoughts/writings can get off track sometimes.

    I really do appreciate your time and efforts.

  • Moderator

    @KnightRaven Hey glad you got it worked out. I think HP had a similar WinPE driver pack. The one from dell does contain the drivers for all dell models. I would suspect that it will work 80% of the time for the hp systems too, since an intel or realtek nic is a nic no matter whos box it is in.

    I doubt its the wim/iso difference. I just use the iso because it is self contained (don’t need to mess with all of the ancillary files), plus I can burn it to cdrom, usb, pxe boot, or load it via esxi. So one image will work in all forms. Please report back on your successes and what you had to do to make the HP kit work. I think I’ll take the results from this tread and convert it to a tutorial. I know other have tried to do this too, I just didn’t have the time to work out the process before.

  • @george1421
    So I took the time and tested. IT Worked! I don’t know if the difference is running the driver pack you listed(injecting it). Or running it as an ISO as opposed to the individual files. But at least I have a working concept. I have to go back and edit my startup cmd file. I didn’t put the full user context(<pcname\userid>) when mapping my share.

    I don’t know if its an added driver or the fact that this time the default setup never ran. Just the one from the share.

    The next trick will be seeing if I can get it to work on an HP laptop. If it’s a driver issue that is.
    I am excited that there is a working model to go from though.
    Thank you very much for all of y’alls time!


  • Moderator

    @KnightRaven Just for info, the winpe iso I created was about 270MB in size. So 1GB of RAM memory should be enough for both the winpe ram disk and the setup installer to run.

  • @george1421
    good to know it was tested all the way through and worked. So I will remake may boot.wim file and sources, and make a bootable .iso from it and see what happens.

    The current ISOs I have are too big. The PCs need more ram to support the full bootable ISOs as opposed to the win_pe versions.

    Thanks for testing. I will report back when I get a chance to try it out.

  • Moderator

    @KnightRaven Success!!

    OK I executed the plan I outlined and created the ISO. I build the iso on my Win7 MDT server so it used WAIK 6 (I think). It is what ever version of waik for Win7. I tried initially to create it on our Win10 MDT server and the file paths were too different. Everything was there but I decided to do on Win7 WAIK just to stick to the plan. Once I had the ISO image I moved it to the FOG server into the /var/www/html/fog/iso folder. I checked to make sure the file was world readable in linux. In the FOG management gui (1.2.0 trunk build) I went to the fog configuration and added a new ipxe boot menu with these properties.

    Menu Item: winpe7a
    Description: WinPE tester
    initrd http://<ip_addr_fog_server>/fog/iso/winpe_amd64.iso
    chain memdisk iso raw
    Menu Show with: All Hosts

    On my windows file server (pointed to in the startnet.cmd file (net use z: \<server_name><share_name> /user:<uid> <pass>) I created a share and copied the entire content of the Win7 Pro DVD into that directory. I then made the directory permissions everyone:read and the share everyone:read.

    Finally I pxe booted my test VM and selected the “WinPE tester” menu. The vm booted into winpe, connected to the z: drive and ran the setup program. I clicked through the setup program until it install the windows files and then began extracting the files. That is where I stopped the VM and aborted the test because it was working.

  • @george1421
    Awesome. I’ve ran through some of this before but I will do it over again and see if it helps. Maybe I missed something before. Thanks for the refresher. I hope to try it tomorrow.

  • Moderator

    @KnightRaven I was able to access our document managment system and pull the bits out I needed to create a process out of my instructions. I should be able to test this later tonight.

    copype amd64 C:\winPE_amd64
    copy "C:\Program Files\Windows AIK\Tools\PETools\amd64\winpe.wim" C:\winpe_amd64\ISO\Sources\Boot.wim
    copy "C:\Program Files\Windows AIK\Tools\amd64\Imagex.exe" C:\winpe_amd64\ISO\
    # Download
    # Extract to c:\winpe
    mkdir c:\img
    imagex /mountrw C:\winPE_amd64\ISO\sources\boot.wim  1 c:\img
    # Inject the x64 drivers from the extracted Dell cab file
    DISM /Image:c:\img /Add-Driver /Driver:c:\winpe\x64 /Recurse /ForceUnsigned
    notepad  C:\img\windows\system32\startnet.cmd
      @echo off
      echo Setting up WinPE
      echo Warming up the network interface
      net use z: \\<server_name>\<share_name> /user:<uid> <pass>
    # This command unmounts the wim. If you want the wim alone its this directory C:\winPE_amd64\ISO\sources\boot.wim  
    DISM /Unmount-WIM /MountDir:c:\img /commit
    # This will covert the wim into a bootable iso image. 
    oscdimg -n -bC:\winpe_amd64\ C:\winpe_amd64\ISO C:\winpe_amd64\winpe_amd64.iso```

  • @Wayne-Workman
    I do map a drive and run setup from the share with same results. Could it be that it is still looking at a different location? Could it be looking for the original usb location or some such? Or does it use the current path? Does the new mapped drive need to be a part of the PATH statement in winpe?

  • @KnightRaven Also, it may be that your WIM file isn’t pointing to the Windows 7 disk files. You need those hosted on a share.

    You actually have to start the setup.exe file by connecting to the share and executing it from there. In the setup I built, I did those bits from the command prompt that the WinPE environment gave me.

  • @Wayne-Workman
    I can try that. I have tried browsing the usual setup drivers and not getting very far.

    But the HDD is seen by winpe. At least when I browse files it shows up. But maybe there is something missing. The mini laptop does not have a cd/DVD but the desktop I tried on did with same results. Just ruling out that it was looking for a physical DVD drive.
    I’ll try loading HDD drivers but I’m not optimistic about that.


  • If this is not solved yet (didn’t read the whole thread), to me, looks like you simply need to load HDD drivers.

    Way 1:
    So, go to the manufacturer’s website, download HDD drivers, extract them if need be, plug them into the computer at this point and browse to those files and load the HDD driver.

    Way 2:
    Rebuild the WIM to include the HDD drivers.

    Also, you may wanna check this out: This is what I followed, and it’s dated. I did every step and it did work, but it is way more involved than that document says. A lot of stuff is left to assuming you know. Google is your friend.

    @george1421 I have installed Win10 over PXE before, and used the fog server to do it. It was complicated to setup and I’d rather never do it again to be totally honest.

  • @KnightRaven So my bootable USB has wds files as well. So at least I know its the same setup info.

  • @george1421 Well I used the AIK/dism/imagex tools to modify or inject some drivers to the boot.wim. Just not the laptop I am testing. But the desktop does the same thing. I appreciate your assistance but don’t work to hard at it. This is just a test and see if I can get it done myself. nothing critical for the most part.

    As I am looking in the sources directory I am seeing wds files. Not sure if that is normal or not. I may be remembering something wrong or maybe copied extra files from another spot. It was awhile ago when I first tried this then got on to assigned duties.
    I may just recreate the files\setup when I get time this week.

    thanks again.

Log in to reply