What happens if you boot from PXE and not from an HDD?

291 viewsOtherTechnology

Hi! Booting from a PXE means that you’re bypassing an HDD and booting from a network (NIC)? So what happens if you do this instead of just a hard drive?

In: Technology

6 Answers

Anonymous 0 Comments

When a PC is turned on or restarted, it runs instructions provided by the manufacturer, on a chip on the motherboard (BIOS).

At some point, it needs to switch from the instructions provided by the manufacturer in the BIOS, to instructions that are provided by the user.

Usually, these user-provided instructions will be an OS [1]. Usually, the OS will be Windows or Linux [2]. Usually, they will be loaded from the first hard drive in the system [3].

When you boot from PXE, the instructions are loaded from the network.

Normally, when connecting to a network, a computer uses a protocol called DHCP to say “Hi, I’m new! Can someone please give me an IP address?” For this to work properly, you need *exactly one computer* on your network set up to answer these kinds of requests. That computer is called a DHCP server. (In home networks, often the DHCP server is the router provided by your ISP.)

With PXE, the computer will use DHCP to say “Hi, I’m new! Can someone please give me an IP address, and also tell me where I can download an OS with TFTP?” For this to work, you need to set up a computer to allow other computers to download OS’s with TFTP, (this is called a TFTP server). And then you need to configure your DHCP server to answer to the question “Where can I download an OS with TFTP?” with the IP address of the TFTP server you just set up.

Why would you use PXE? Well if you have 1000 employees in different offices in multiple buildings, or 1000 servers in a datacenter, it takes a lot of time to go around working on each computer individually. If you just set up PXE, you only need to touch each individual computer once, when you first unbox it. Then you can just do a bit of setup in your DHCP / TFTP server to completely change out the OS for all 1,000 computers whenever you want [4].

You can also set up the OS to store user files (and perhaps parts of the OS itself) on a network drive. With a PC set up with PXE and an OS configured with a network drive, the PC doesn’t need any hard disk at all! This saves money and eliminates a potential point of failure.

[1] The user-provided instructions don’t have to be an OS. You can run any program you want. Your program does need to be set up differently to run without an OS (“bare metal”): With no OS, a program will need to “talk” directly to the keyboard / disk / network / screen.

[2] The OS doesn’t have to be Windows or Linux. A bunch of less popular PC operating systems exist: FreeBSD, DOS, SerenityOS, Redox, OS/2, Plan 9…

[3] They don’t have to be loaded from the first hard drive. They could be loaded from a different hard drive, a floppy disk, a CD/DVD drive (El Torito), a USB disk, an SD card, or over a network (PXE).

[4] Those DHCP requests include a MAC address. (That’s how the DHCP server knows who to reply to.) You can set up the DHCP or TFTP server to give each computer a different OS (or a differently configured OS) based on their MAC address. So you don’t have to change all 1000 computers’ OS’s at once: You could change the OS for a subset of the computers, or one specific computer.

You are viewing 1 out of 6 answers, click here to view all answers.