I'm attempting to get a Windows Preinstallation Environment to boot over PXE from a Linux server. The end goal will be to install Windows but that's pretty easy once I can get WinPE to start up (I've got the samba share with the windows OS disk etc.). I'm using ESXi and attempting to get a VM to PXE boot the winPE but also have access to a physical machine for testing. I followed the steps on a few tutorials (http://www.tecmint.com/configure-pxe-server-to-install-windows-on-centos/ mainly) and I've reached an interesting place:

If I attempt to PXE boot the winPE on either the VM or a physical machine I get the error:

CDBOOT: Cannot boot from CD - Code 5

However, if I mount the winpe iso on the VM's disk drive it works fine (I reach the winpe and can install windows). From what I've read of the "Cannot boot from CD - Code 5" error it is most commonly associated with BIOS firmware/hardware incompatibilities, but were that true the iso shouldn't work when mounted either.

In my ./pxelinux.cfg/default I have:

MENU LABEL Windows 7
 LINUX memdisk
 INITRD windows/winpe_amd64.iso
 APPEND iso raw

I've tried both with and without appending raw with the same result. I have already copied the memdisk binary to the tftproot. The iso seems to be found when PXE booting because the iso is being read in some capacity, the ISO is placed inside the tftproot at windows/winpe_amd64.iso.

Anyone have any insight on why the PXE boot would behave differently from mounting the ISO on the drive, and any ideas on how to resolve the problem with booting the iso?

3 Answers 3


When you "mount" winpe_amd64.iso on a VM and boot from it the ISO sees itself booting from a CD/DVD drive (either real or virtual). When you boot winpe_amd64.iso from memdisk the ISO sees an "emulated" (created by memdisk) disk environment.

APPEND iso raw

Some Windows ISO's need the 'raw' option on some PCs.

It is possible to map and boot from some CD/DVD images using MEMDISK. No-emulation, floppy emulation and hard disk emulation ISO's are supported.

The "map" process is implemented using INT 13h - any disk emulation will remain accessible from an OS that uses compatible mode disk access, e.g. DOS and Windows 9x. The emulation via INT 13h can't however, be accessed from an OS which uses protected mode drivers (Windows NT/2000/XP/2003/Vista/2008/7, Linux, FreeBSD) once the protected mode kernel drivers take control. If the OS contains drivers for accessing this mapped ISO, or knows how to find the ISO on the disk, there is no booting problem of course.

INT 13h access: Not all images will complete the boot process!

Windows NT/2000/XP/2003/Vista/2008/7 (NT based)

These Windows versions use INT 13h access only in the start of the booting process (loading only the necessary drivers). Once the protected mode drivers are functional to access the disks, Windows can't see the memory mapped drives created by MEMDISK (CD/DVD, hard disk and floppy disk images) and it will fail to complete the boot process.

Source: http://www.syslinux.org/wiki/index.php/MEMDISK

Bottom line: memdisk is a last resource alternative. pretty unreliable. avoid it.

In your case I'd try PXE booting into pxeboot.n12 (NBP) wich later calls bootmgr.exe, bcd, boot.sdi, and finally your Boot.wim file. This is pretty much the WDS way to PXE a Windows PE envirnment.


pxeboot.n12 can be found within Boot.wim on any Windows DVD/ISO.

Specifically from the error you get you can also be facing this kind problem. https://superuser.com/questions/28123/when-installing-windows-7-cdboot-error-5-appears-cannot-boot-from-cd-why

  • but the winpe comes even before windows installation, I would think it to be able to boot if MEMDISK could even get to the start of windows installation. The way to install linux after loading winpe is to mount a network drive in the winpe that contains the windows install media and launch setup.exe. There are also many tutorials that suggest that MEMDISK can boot winpe isos, not sure that they would be so common if it was simply impossible, that said.. Can a linux PXE server launch pxeboot.12? And also where would I find this file? I do not have a WDS.
    – Centimane
    Commented Jul 24, 2015 at 11:11
  • Windoes PE is "itself" a small "Windows", it loads like Windows, it uses Windows protected mode drivers, etc. what the memdisk guys say about Windows is also valid for PE. Memedisk approach as I've said before is not reliable; as they say, some PCs need the parameter "raw", while others don't, while others miserable fail. That's it. pxeboot.n12 is an "NBP" that is requested and run by the booting PXE client, it doesn't matter if the PXE server is Linux or Windows. pxeboot.n12 can be found on any Windows DVD/ISO.
    – Pat
    Commented Jul 24, 2015 at 11:59
  • Strange, I have an official windows install disk but it does not have pxeboot.n12 on it: find ./ | grep pxe returns nothing
    – Centimane
    Commented Jul 24, 2015 at 12:12
  • it is within Boot.wim
    – Pat
    Commented Jul 24, 2015 at 12:13
  • ah, I'll mount that and take a look for it
    – Centimane
    Commented Jul 24, 2015 at 12:17

The issue I experienced was a result of a bad FTP-get, which caused the WinPE ISO I had to truly be unbootable like the error said (tested trying to boot the CD in a VM). Leaving the question in case someone finds it useful.


As Pat's answer so nicely explains, WinPE (which is windows) will fail to know about the "CD" once INT13 calls no longer are available during the boot process.

A more modern solution to this problem would be to use iPXE and wimboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .