Quantcast
Channel: Veeam Support Knowledge Base
Viewing all articles
Browse latest Browse all 4362

How to Configure PXE Booting of Veeam Agent for Linux Recovery Media

$
0
0

How to Configure PXE Booting of Veeam Agent for Linux Recovery Media

KB ID: 4587
Product: Veeam Agent for Linux
Published: 2024-05-31
Last Modified: 2024-05-31
Veeam Agent for Linux Version Requirement
Starting with Veeam Agent for Linux 6.1.2, the Veeam Recovery Media is designed to be capable of use in PXE booting. (veeam-recovery iso released after 22-May-2024)

Purpose

This article documents how to configure Linux to PXE boot the Veeam Agent for Linux Recovery Media over a network.

Solution

General Guidance Disclaimer

The information provided below is intended only as general guidance. Just as there are many varied distros of Linux and different pieces of software to perform tasks within Linux, there are multiple ways to achieve the end goal of PXE booting the Veeam Agent for Linux Recovery Media using Linux. The advice provided in this article should be considered simply one method our internal team has proven to be successful. It should not be regarded as the only way or as an officially "Veeam supported" method of achieving this result.

Furthermore, Veeam Support will not assist with configuring PXE booting of the Veeam Agent for Linux recovery media. In this scenario, the sole responsibility of Veeam Software is to ensure that the recovery media can be PXE booted. The configuration and implementation of PXE booting within an environment falls to the administrator(s) of that environment.

Preboot Execution Environment (PXE) boot allows loading the Linux operating system from a network server using PXE boot loader. PXE boot loader provides preboot services to the client computer firmware and enables the client computer to download network boot programs. Depending on the firmware interface used on your client computers, you can configure PXE boot to use the following Linux boot loaders:

  • PXELINUX as part of the SYSLINUX boot loader suite for client computers with legacy BIOS.
  • SYSLINUX.EFI as part of the SYSLINUX boot loader suite for client computers with UEFI/EFI.
  • GRUB for client computers with UEFI/EFI.

To configure PXE boot for Veeam Recovery Media, you must perform the following steps:

  1. Set up the prerequisite network infrastructure.
  2. Enable PXE network boot on the TFTP server.
  3. Copy the Veeam Recovery Media ISO files to the TFTP server.
  4. Configure the NFS and DHCP servers.
  5. Create the PXE boot loader configuration.

Setting Up Prerequisite Network Infrastructure

To enable PXE boot, you must have the following network components set up in your infrastructure:

  • TFTP server.
  • HTTP or NFS server.
  • DHCP server.
You can set up TFTP,  HTTP (or NFS), and DCHP servers on the same or different physical systems. Depending on your choice of operating system and specific infrastructure requirements, setup, and configuration of the necessary network components may vary. For setup instructions, refer to the server's operating system documentation.

Enabling PXE Network Boot on TFTP Server

Enabling PXE boot that uses SYSLINUX components

If you want to use SYSLINUX components for PXE boot, you must install SYSLINUX on the TFTP server. To install SYSLINUX, use the instructions specific to the operating system of the TFTP server.

  1. Install SYSLINUX using the instructions specific to the operating system of the TFTP server.
  2. Copy the SYSLINUX files necessary for PXE boot from their default directory to a location under the TFTP root directory:

    For PXE boot for legacy BIOS
    • pxelinux.0
    • ldlinux.c32, libcom32.c32, libutil.c32, vesamenu.c32, chain.c32, mboot.c32, menu.c32
    For PXE boot using syslinux components for UEFI/EFI
    • ldlinux.e64, libutil.c32, libcom32.c32, vesamenu.c32, menu.c32
    • syslinux.efi
    • grubx64.efi,bootx64.efi
       
Enabling PXE boot that uses GRUB components

If you want to use GRUB components for PXE boot, you must make the GRUB boot loader available for boot from the TFTP server over the network.

  1. Generate the boot directory with the necessary GRUB files.

    The command for generating the network boot directory may vary depending on the Linux distribution.
    For example, in Debian 12, you must use the following command:
    grub-mknetdir --net-directory=/<TFTP root directory>
    
  2. If you want to configure PXE boot for client computers with UEFI architecture and Secure Boot enabled, copy the shimx64.efi file as shim.efi to the TFTP directory.
Important
Veeam Recovery Media is based on Debian 12. You must take the shimx64.efi file from any system on Debian 12 that has Secure Boot enabled.

Copying Veeam Recovery Media ISO Files to TFTP Server

  1. Create the directory structure under the default TFTP root directory for storing ISO files.
    For example: /<TFTP root directory>/images/{image1,image2}
  2. Change permissions of the TFTP root directory to allow read, write, and execute operations.
  3. Copy the Veeam Recovery Media ISO files to the designated directory.

    The procedure of copying Veeam Recovery Media ISO files to the TFTP server depends on the protocol you will use to export the ISO files to the client computer:
    • For HTTP with a link to the ISO file, copy the Veeam Recovery Media .iso file to the designated directory.
    • For HTTP with a link to the squashfs file or for NFS, unpack the Veeam Recovery Media .iso file and copy its contents to the designated directory.

Configuring NFS and DHCP Server Settings

  1. Add the TFTP root directory to the NFS exports file.
  2. In the DHCP configuration file, define the options for PXE boot clients:
    • In the next-server option, you must specify the IP address of the TFTP server.
    • In the filename option, depending on the architecture and boot method, specify the following boot program names:
      • pxelinux.0 — For BIOS clients.
      • syslinux.efi — For UEFI/EFI clients using SYSLINUX components.
      • core.efi (or bootx64.efi) — For UEFI/EFI clients using GRUB with Secure Boot disabled.
      • shim.efi — For UEFI/EFI clients using GRUB with Secure Boot enabled.

Consider the following example of specifying PXE boot options in DHCP configuration:

# Define PXE options for pxelinux and grub
option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
option architecture-type code 93 = unsigned integer 16;
subnet 10.10.10.0 netmask 255.255.255.0 {
option routers 10.10.10.1;
range 10.10.10.10 10.10.10.20;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
# For BIOS clients
if option architecture-type = 00:00 {
next-server <TFTP server IP>;
filename "<...>/pxelinux.0";
}
# For UEFI/EFI clients using syslinux components
else if option architecture-type = 00:07 {
next-server <TFTP server IP>;
filename "<...>/syslinux.efi";
}
# For UEFI/EFI clients using GRUB - no Secure Boot enabled
if option architecture-type = 00:07 {
next-server <TFTP server IP>;
filename "<...>/core.efi";
}
# For UEFI/EFI clients using GRUB - Secure Boot enabled
if option architecture-type = 00:07 {
next-server <TFTP server IP>;
filename "<...>/shim.efi";
}
}
}

Creating PXE Configuration File

Depending on the client computer architecture, create a configuration file for the boot loader.

Configuring PXE Boot for BIOS-Based Client Computers

To create a configuration file for the PXELINUX boot loader, do the following:

  1. In the TFTP root directory, create the pxelinux.cfg directory.
  2. In the pxelinux.cfg directory, create a file and name it default.
  3. In the default configuration file, specify the following settings for the PXE boot:
    • LABEL — specify an internal name for a boot setup.
    • MENU LABEL — specify a name for the boot setup that will be displayed in the boot menu on the client computer.
    • KERNEL — specify the path to the vmlinuz file.

      Note: If you want to use a custom Veeam Recovery Media for bare metal recovery, you must specify the path to the vmlinuz file for the kernel of the operating system installed on the protected computer.
    • APPEND — specify additional settings depending on the protocol you will use to export files for PXE boot:
      • initrd — specify the path to the initrd file.
      • boot — specify the following value: veeam-live
      For NFS export
      • netboot — specify the following value: nfs
      • root — specify the following value: /dev/nfs
      • nfsroot — specify the path to the folder with the ISO files in the following format: TFTP SERVER IP:/PATH TO FOLDER
      For HTTP link to ISO
      • httpfs — specify the HTTP link to the Veeam Recovery Media ISO file on the TFTP server.
      For HTTP link to squashfs
      • httpfs — specify the HTTP link to the .squashfs file from the Veeam Recovery Media ISO files on the TFTP server.

Consider the following example of a configuration file:

default menu.c32
prompt 0
timeout 100

# Setup for NFS export
LABEL recoveryMedia-6.1.2.1781
MENU LABEL Boot recovery media 6.1.2.1781-nfs
KERNEL kernels/val6/vmlinuz-6.6.13+bpo-amd64
APPEND initrd=kernels/val6/initrd.img-6.6.13+bpo-amd64 netboot=nfs root=/dev/nfs nfsroot=10.10.10.2:/srv/tftp/images/iso6121731/ boot=veeam-live

# Setup for HTML link to Veeam Recovery Media ISO file
LABEL recoveryMedia-6.1.2.1781
MENU LABEL Boot recovery media 6.1.2.1781-http-iso
KERNEL kernels/val6/vmlinuz-6.6.13+bpo-amd64
APPEND initrd=kernels/val6/initrd.img-6.6.13+bpo-amd64 httpfs=http://10.10.10.2/images/veeam-recovery-amd64-6.1.2.1781.iso boot=veeam-live

# Setup for HTML link to Veeam Recovery Media squashfs file
LABEL recoveryMedia-6.1.2.1745-squashfs
MENU LABEL Boot recovery media 6.1.2.1745-http-squashfs
KERNEL kernels/val6/vmlinuz-6.6.13+bpo-amd64
APPEND initrd=kernels/val6/initrd.img-6.6.13+bpo-amd64 httpfs=http://10.10.10.2/images/filesystem.squashfs boot=veeam-live
Configuring PXE Boot for EFI-Based Client Computers

To create a configuration file for the GRUB boot loader, do the following:

  1. In the TFTP root directory, create a configuration file named grub.cfg
  2. In the configuration file, add the menuentry setting with the boot setup name that will be displayed in the boot menu on the client computer.
  3. Specify the following parameters for the menuentry setting:
    • linuxefi with the following options specified depending on the protocol you will use to export ISO files to the client computer.
      • path to the vmlinuz file on the TFTP server.

        Note: If you want to use a custom Veeam Recovery Media for bare metal recovery, you must specify the path to the vmlinuz file for the kernel of the operating system installed on the protected computer.
      • ip — specify the following value: dhcp
      • boot — specify the following value: veeam-live
      For NFS export
      • netboot — specify the following value: nfs
      • root — specify the following value: /dev/nfs
      • nfsroot — specify the path to the folder with the ISO files in the following format: TFTP SERVER IP:/PATH TO FOLDER
      For HTTP link to ISO
      • httpfs — specify the HTTP link to the Veeam Recovery Media ISO file on the TFTP server.
      For HTTP link to squashfs
      • httpfs — specify the HTTP link to the .squashfs file from the Veeam Recovery Media ISO files on the TFTP server.
    • initrdefi — specify the path to the initrd file.

Consider the following example of a configuration file:

set default=0
set timeout=5

insmod font
insmod gfxterm
insmod all_video
insmod png
terminal_output gfxterm

menuentry 'Veeam recovery 6.1.2 nfs' --class veeam --class gnu-linux --class os {
linuxefi /boot/val6/vmlinuz-6.6.13+bpo-amd64 netboot=nfs root=/dev/nfs nfsroot=10.10.10.2:/srv/tftp/images/iso70040/ boot=veeam-live
initrdefi /boot/val6/initrd.img-6.6.13+bpo-amd64
}

menuentry 'Veeam recovery 6.1.2 http' --class veeam --class gnu-linux --class os {
linuxefi /boot/val6/vmlinuz-6.6.13+bpo-amd64 ip=dhcp httpfs=http://10.10.10.2/images/veeam-recovery-amd64-6.1.2.1781.iso boot=veeam-live
initrdefi /boot/val6/initrd.img-6.6.13+bpo-amd64
}
menuentry 'Veeam recovery 6.1.2 http squashfs' --class veeam --class gnu-linux --class os {
linuxefi /boot/val6/vmlinuz-6.6.13+bpo-amd64 ip=dhcp httpfs=http://10.10.10.2/images/filesystem.squashfs boot=veeam-live
initrdefi /boot/val6/initrd.img-6.6.13+bpo-amd64
}
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Viewing all articles
Browse latest Browse all 4362

Trending Articles