PXE - Preboot eXecution Environment

PXE (Preboot eXecution Environment) boot is a method that allows a computer to boot from a network interface, rather than a local storage device. Here's how it works for BIOS and EFI systems:

BIOS-based systems:

  1. The network interface card (NIC) initializes.
  2. The NIC broadcasts a DHCP request.
  3. A DHCP server responds with IP configuration and PXE boot server information.
  4. The client downloads a small network bootstrap program (NBP).
  5. The NBP downloads additional files needed to boot the OS.

EFI-based systems:

  1. The process is similar, but uses the UEFI firmware instead of BIOS.
  2. The EFI boot manager checks for a bootable network card.
  3. If found, it runs the UEFI network stack and proceeds with PXE.
  4. The system downloads an EFI-compatible NBP.
  5. The NBP then loads the OS or boot manager.

Key differences:

  • UEFI PXE boot supports more protocols (HTTP, iSCSI) in addition to TFTP.
  • UEFI can boot directly from network-attached storage.
  • UEFI PXE provides more secure boot options.

BIOS-based PXE boot with Linux:

  1. NIC initialization: The computer's BIOS detects the network card during POST (Power-On Self-Test). The BIOS checks if PXE is enabled for the NIC and initializes it.
  2. DHCP request: The NIC broadcasts a DHCPDISCOVER message on the network. This message includes PXE-specific options to indicate it's a PXE client.
  3. DHCP server response: A DHCP server responds with a DHCPOFFER message. This includes standard network configuration (IP address, subnet mask, gateway). It also provides PXE-specific information: IP address of the TFTP server Filename of the network bootstrap program (NBP)
  4. Downloading the NBP: The client uses TFTP to download the NBP from the specified server. For Linux, this is typically PXELINUX (part of the SYSLINUX project). PXELINUX is a small bootloader designed for network booting.
  5. Booting the OS: PXELINUX loads its configuration file (usually pxelinux.cfg/default). Based on this config, it downloads additional files: Linux kernel (e.g., vmlinuz) Initial RAM disk (initrd or initramfs) PXELINUX then boots the Linux kernel, passing any specified parameters. The kernel initializes, mounts the initrd, and continues the boot process.

EFI-based PXE boot with Linux:

  1. EFI boot manager initialization: The UEFI firmware initializes and runs the EFI boot manager. The boot manager checks for bootable devices, including network cards.
  2. UEFI network stack: If a bootable network card is found, the UEFI firmware loads its built-in network stack. This stack includes support for various protocols (IPv4, IPv6, TCP, HTTP).
  3. DHCP and server discovery: Similar to BIOS PXE, the system broadcasts a DHCPDISCOVER message. A DHCP server responds with network configuration and boot server info.
  4. Downloading the NBP: The EFI firmware downloads an EFI-compatible NBP. For Linux, this is often GRUB2 with EFI support. GRUB2 can be downloaded via TFTP or HTTP (an advantage over BIOS PXE).
  5. Booting the OS: GRUB2 loads its configuration file (grub.cfg). It then downloads the Linux kernel and initrd. GRUB2 can use more protocols (e.g., HTTP, iSCSI) to fetch these files. The bootloader executes the Linux kernel, passing control to it. The kernel initializes, mounts the initrd, and continues booting.

Key differences in the Linux boot process:

  1. Bootloader: BIOS systems typically use PXELINUX, while EFI systems often use GRUB2.
  2. Protocols: EFI PXE boot can use HTTP and other protocols, potentially speeding up the boot process.
  3. Security: UEFI Secure Boot can verify the bootloader and kernel signatures, providing enhanced security.
  4. Flexibility: EFI PXE boot can directly boot from network-attached storage, which isn't possible with BIOS PXE.


要查看或添加评论,请登录

Vigneshwaran Ravichandran的更多文章

  • #RHEL - RHCE prepare guide

    #RHEL - RHCE prepare guide

    ## Ansible basics RHCE paper prior to Ansible introduction was fairly easy to do. With introduction of Ansible, we have…

  • Puppet Module - Network Module for EL9

    Puppet Module - Network Module for EL9

    I realized that there is no puppet module to manage networking, especially for RedHat Enterprise Linux 9. Since RHEL 9…

  • Kubernetes

    Kubernetes

    ### Kubernetes Overview At the highest level, Kubernetes is two things: - A cluster for running applications - An…

  • Using puppet for PXE BOOT

    Using puppet for PXE BOOT

    First we need to install Oracle Linux 9.4 and make sure it is updated.

  • Zabbix Container setup

    Zabbix Container setup

    This article explores the way to setup Zabbix in containers. You are required to have some knowledge in Docker/Podman.

  • PXE Boot Server with Ansible

    PXE Boot Server with Ansible

    Following should be your Ansible working directory. You don't necessarily need ansible.

  • PXE BOOT WINDOWS 2022 via EFI

    PXE BOOT WINDOWS 2022 via EFI

    # PXE BOOT WINDOWS 2022 via EFI This article explores the opportunity of booting PXE BOOT Windows 2022 DC Edition via…

  • FreeBSD based Hypervisor

    FreeBSD based Hypervisor

    This article is more less like a personal thought cum technical jump-start to have a hypervisor working. Most of the…

  • #AnsibleSeries - Inventory & Basics

    #AnsibleSeries - Inventory & Basics

    Today I am going to talk about Ansible. Using puppet for a while now makes me appreciate how these tools help simplify…

  • LUKS & NBDE (Network Bound Disk Encryption)

    LUKS & NBDE (Network Bound Disk Encryption)

    I got a request to write this article. I was studying in vain for an exam and one of the topics I hit 100% mark is the…

社区洞察

其他会员也浏览了