5

They seem to serve the same purpose which is the ability to boot a Client/Machine as long as its connected to a Network and thus has a NIC.

What is the difference between the two with respect to how they work ?

Is there a clear advantage of using WOL (Wake On LAN) over PXE (Preboot eXecution Environment) or vice versa ?

Also both WOL & PXE as OS Agnostic right ?

  • 2
    What is the difference between plugging a cable into your computer, and booting from a usb stick...? – PlasmaHH Jan 29 '15 at 13:05
  • 2
    This question shows some lack of attention and research. Even the tag windows doesn't fit here! Wake on Lan is just that: wake the computer over lan! PXE is a technique to execute a whole operating system saved on a remote server. It's different from VNC access. VNC access only allows you to see the screen and use the computer. PXE is the entire disk content being saved on the server and your local machine makes the processing and display on the screen. Like a diskless system. – Ismael Miguel Jan 29 '15 at 16:29
21

You cannot compare them like that. WoL is used to power on and PXE is used for booting (to load an OS from a remote server), so WoL happens before PXE.

  • 2
    Okay I was confused. So If I wish to power-on a Machine remotely I just use WoL. Then PXE is used for rebooting (restarting) a machine remotely that is already powered on ? – Dhiwakar Ravikumar Jan 29 '15 at 6:44
  • 3
    @DhiwakarRavikumar, no, PXE allows you to boot an OS which is stored on a remote server. – heavyd Jan 29 '15 at 6:48
  • 2
    Got it :) Using PXE, I can choose the OS which a given Client must boot. The OS Image must be stored on some server. BUT To Power On this Machine in the first place I must use WoL – Dhiwakar Ravikumar Jan 29 '15 at 7:01
  • @DhiwakarRavikumar NO! NO NO NO! You don't need Wake on Lan to power that machine. You need to press the power button yourself. You MAY use Wake on Lan for that machine, but it is almost useless. Anything you can do on that remote machine, you can do directly on the PXE server with the images. – Ismael Miguel Jan 29 '15 at 16:35
  • 2
    @DhiwakarRavikumar They are separate things but they may be used in conjunction with each other. If your PC is setup to boot via PXE automatically and is powered off you can turn it on remotely with WoL. Or physically walk to it and push the power button. If your PC is not set to boot automatically via PXE and you power it on remotely (with WoL), the PC will sit and wait for your input. – Chris76786777 Jan 29 '15 at 18:07
21

Wake On LAN (WoL):
Wake On LAN (WoL) is a feature that allows a computer to be powered on. Computers that are "powered off" might actually use up a little bit of electricity, and be able to perform some very minor functions. As I recall, older computers would sometimes use a separate (set of) wire(s) that connected to the network card. These might have been made for providing some tiny amount of power or data communication. It may seem like the computer is using no electricity because it is quiet because no fans are being used, but a tiny amount of electricity can be made available for some of the cards.

If the network card was using Wake On LAN, then it would check incoming Ethernet frames for a particular pattern. If that pattern was seen, then WoL would send a message to the system (perhaps to the intelligent ATX power supply, or the motherboard's WoL pins?) to have the system "wake up" more fully. The system would then power on. Once the computer powers on, the computer will do what the computer always does whenever it powers on: the computer will boot.

To make all that happen, you need another computer on the network to send a magic Wake-on-LAN frame that will be recognized by the computer that supports WoL.

Pre-eXecution Environment (PXE):
PXE (which I have heard pronounced as "PiXiE", by multiple people) is related to how the computer boots. Instead of booting from code on the hard drive, or booting code from a CD, the PXE process can be what is used for booting up the computer. This process searches a network for code to boot. If the PXE client (which is commonly built into the circuitry/chips on the computer that is booting) can locate a PXE server, then the PXE client will download code from the PXE server. After downloading code from the PXE server, the PXE client will run that code. The entire PXE process may use some other protocols, like DHCP and TFTP.

Contrasting WoL and PXE:
With WoL, the computer then boots up normally. "Normally" might involve PXE, or it might not. The BIOS might just boot straight to the hard drive. So, WoL and PXE don't have to be related at all. WoL just means "power on". What does the computer do when it powers on? It boots. WoL "wakes" the computer up, and that's all WoL does. Using WoL does not mean that PXE will be used.

PXE affects how the computer boots. PXE can be used when the system boots up with WoL, or when the system turns on because someone pressed the power button to turn on the computer, or possibly because software told the computer to perform a "cold"-style (full) restart. So, using PXE does not imply that WoL was used to turn the system on.

You could use WoL and then PXE, so both are used. Or just one could be used. They don't do the same thing. They are both related to the overall gigantic process of a system starting, and both involve network cards, but the similarities basically end there. They aren't really related to each other.

OS Requirements (WoL):
Regarding the other question: Yes. WoL is generally OS-agnostic, because no operating system is running, because the much of the computer is powered off. (Generally including fans, and I presume that the CPU and main system RAM might also be lacking power. That would prevent an operating system from being active.)

OS Requirements (PXE):
When I've typically seen the option to use PXE, that option was built into the BIOS. I presume that add-on cards can use PXE when the BIOS checks if any add-on cards have an "option ROM" (similar to how an add-on card which is a RAID controller can allow the user to enter a RAID management tool before any operating system is loaded from a disk). PXE can download an operating system; you can even have the server provide different boot images so that the computer can download a different operating system each time it boots. The operating system that PXE boots up will be whatever code is on the image that gets downloaded.

Note that some operating systems might work better with PXE than others. They may support being able to start up with a minimal amount of data, and then use the network to locate even more data. Other operating systems may be based on a design that might expect to see all of the critical data sitting on a physical disk. So, different operating systems may support the PXE experience with different degrees of ease. Before dedicate yourself to a specific idea that relies on PXE to start up a specific operating system, take a moment to read about how easy it is to use that operating system with PXE. Enough people have enjoyed dabbling with PXE that such information is probably relatively easy to find.

  • 2
    Careful with the comment about where the PXE client is stored... If you have an on-board NIC then there will probably be a small chip that has the NIC functionality and PXE ROM stored on it. If you have a PCI NIC then this card will have the ROM on it in most cases. The BIOS just needs to know if there is a device with PXE capability, it then hands off to the device. I say this because when the NIC ROM kicks in you often see the NIC manufacturer "Intel Pre-boot eXecution Execution..." etc. – Kinnectus Jan 29 '15 at 8:06
  • 9
    This should be the accepeted answer. – mjs Jan 29 '15 at 14:17
  • @Big Chris : Thank you. I've seen some BIOSs have the option to boot to PXE. It would have been better if I didn't say that PXE is in the BIOS, because the PXE process could (and, as I think about it, probably does) use code that is stored somewhere else. I've made some changes to re-phrase that (and made some more minor additions to some details in the answer). Thanks for helping to keep info accurate. mjs : I certainly wouldn't object. This has been my most popular answer to date. That surprised me. I guess lots of people have wondered about these technologies. – TOOGAM Jan 29 '15 at 18:01
  • @TOOGAM: Not quite, in my case it's a mixture of "How could one even ask this question?" and "This is a very patient and complete answer, respect!" – orithena Jan 30 '15 at 10:10
0

Wol: Wake-on-LAN (WoL) is an Ethernet computer networking standard that allows a computer to be turned on or awakened by a network message. (wikipedia)

PXE: is a Pre-boot Execution Environment; it is not technically an independent "protocol", it is an environment that uses protocols like DHCP and TFTP, created to allow a PC to retrieve its booting code from a network instead of a HDD.

Virtually all the PCs today have a BIOS option that allows to boot from the network. When this option is enabled the PXE firmware included in the NIC (Network interface Card), takes control at boot time.

  1. First the PXE firmware performs a DHCP request identifying the booting PC as a PXE client.

  2. A DHCP server will be to able answer minimally offering an IP address and MASK, a "PXE enabled" DHCP server will additionally offer the IP address of a TFTP server and the name of a file to retrieve and boot.

  3. The PXE client then accepts its IP and retrieves this file (NBP = Network boot program) from the TFTP server and boots from it.

  4. This NBP has code that uses the API (Application Program Interface) offered by the BIOS PXE firmware. This API includes functions that allow the NBP to retrieve more files from the net using a somehow limited network driver also included in the PXE firmware.

  5. The files retrieved now can install a new more powerful net driver and continue booting a whole OS (i.e. Linux live Distro) or an OS install procedure (i.e. Windows install).

From this moment on the PXE firmware rests and PXE is not used anymore. PXE does not boot (or install) the whole OS, it only boots a small NBP, later other components continue the booting job but NOT USING the PXE environment.

A WoL instance can very well precede a PXE session. They are complementary, non-overlapping technologies.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.