From b102a8048738fd4b20292322e6ab3bb2d3941023 Mon Sep 17 00:00:00 2001 From: Robert Dahlem Date: Tue, 5 Dec 2023 16:22:42 +0100 Subject: [PATCH 1/2] Support for downloading kernel and initrd by http --- usr/share/rear/conf/default.conf | 18 ++++++++++++++++++ usr/share/rear/lib/bootloader-functions.sh | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf index e9492eb536..2aad4bd6c8 100644 --- a/usr/share/rear/conf/default.conf +++ b/usr/share/rear/conf/default.conf @@ -1358,6 +1358,24 @@ PXE_REMOVE_OLD_LINKS= # https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/chap-installation-server-setup.html#sect-network-boot-setup-ppc-grub2 PXE_CONFIG_GRUB_STYLE= # +# Support for downloading kernel and initrd by http, thus making downloads faster. +# First, you have to use lpxeconfig.0 instead of pxeconfig.0, the former supports http downloads. +# It's compatible, just replace pxeconfig.0 in your TFTP directory or set bootfile-name to +# lpxeconfig.0 in your DHCP server. +# Obviously, OUTPUT needs to be set to PXE. +# PXE_CONFIG_URL must be set and point to your pxelinux.cfg directory using nfs or any other mountable scheme. +# PXE_TFTP_URL must be set and point to your web server root directory using nfs or any other mountable scheme. +# PXE_CONFIG_GRUB_STYLE must NOT be set to yes. +# When setting PXE_SCHEME, use something like "http://my.web.server/" and mind the trailing slash! +# It must point to the same directory as PXE_TFTP_URL. +# Example: +# OUTPUT=PXE +# PXE_CONFIG_GRUB_STYLE= +# PXE_CONFIG_URL=nfs://tftp-server/var/lib/tftpboot/pxelinux.cfg +# PXE_TFTP_URL=nfs://web-server/var/www/html +# PXE_SCHEME=http://web-server/ # mind the trailing slash! +PXE_SCHEME= +# # The way we start up in our PXE mode (keywords known are 'automatic', 'unattended', and empty) # 'automatic' is the auto_recover mode which means boot automatic with ReaR and execute a 'rear recover' # but when a question has to be answered (e.g. during migration mode) it will wait on an answer. diff --git a/usr/share/rear/lib/bootloader-functions.sh b/usr/share/rear/lib/bootloader-functions.sh index f3e27937cf..2d4a61392f 100644 --- a/usr/share/rear/lib/bootloader-functions.sh +++ b/usr/share/rear/lib/bootloader-functions.sh @@ -766,7 +766,7 @@ function make_pxelinux_config { echo "MENU title Relax-and-Recover v$VERSION" # Display message now: - echo "display $PXE_MESSAGE" + echo "display $PXE_SCHEME$PXE_MESSAGE" echo "say ----------------------------------------------------------" # start with rear entry @@ -791,8 +791,8 @@ function make_pxelinux_config { echo "Rescue image kernel $KERNEL_VERSION ${IPADDR:+on $IPADDR} $(date -R)" echo "${BACKUP:+BACKUP=$BACKUP} ${OUTPUT:+OUTPUT=$OUTPUT} ${BACKUP_URL:+BACKUP_URL=$BACKUP_URL}" echo "ENDTEXT" - echo " kernel $PXE_KERNEL" - echo " append initrd=$PXE_INITRD root=/dev/ram0 vga=normal rw $KERNEL_CMDLINE $PXE_RECOVER_MODE" + echo " kernel $PXE_SCHEME$PXE_KERNEL" + echo " append initrd=$PXE_SCHEME$PXE_INITRD root=/dev/ram0 vga=normal rw $KERNEL_CMDLINE $PXE_RECOVER_MODE" echo "say ----------------------------------------------------------" # start with optional rear http entry if specified From c9859e842f517c86e12f046f5be6a2f1762ad029 Mon Sep 17 00:00:00 2001 From: Robert Dahlem Date: Wed, 6 Dec 2023 16:05:45 +0100 Subject: [PATCH 2/2] fix (l)pxeconfig -> (l)pxeboot --- usr/share/rear/conf/default.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf index 2aad4bd6c8..839f25a607 100644 --- a/usr/share/rear/conf/default.conf +++ b/usr/share/rear/conf/default.conf @@ -1359,9 +1359,9 @@ PXE_REMOVE_OLD_LINKS= PXE_CONFIG_GRUB_STYLE= # # Support for downloading kernel and initrd by http, thus making downloads faster. -# First, you have to use lpxeconfig.0 instead of pxeconfig.0, the former supports http downloads. -# It's compatible, just replace pxeconfig.0 in your TFTP directory or set bootfile-name to -# lpxeconfig.0 in your DHCP server. +# First, you have to use lpxelinux.0 instead of pxelinux.0, the former supports http downloads. +# It's compatible, just replace pxelinux.0 in your TFTP directory or set bootfile-name to +# lpxelinux.0 in your DHCP server. # Obviously, OUTPUT needs to be set to PXE. # PXE_CONFIG_URL must be set and point to your pxelinux.cfg directory using nfs or any other mountable scheme. # PXE_TFTP_URL must be set and point to your web server root directory using nfs or any other mountable scheme.