Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aterfax/f2d42ba55b08a3868cfe7cd05ff9c244 to your computer and use it in GitHub Desktop.
Save Aterfax/f2d42ba55b08a3868cfe7cd05ff9c244 to your computer and use it in GitHub Desktop.
Netbooting the Urbackup restore ISO with Netboot.xyz

Netbooting the Urbackup restore ISO with Netboot.xyz

Description

The following instructions will allow you to netboot the Urbackup restoration CD/ISO using netboot.xyz and were derived from info at:

Note

These instructions assume you are using the Netboot.xyz Docker container.

Instructions

Adding the main custom urbackuprestore.ipxe ipxe file.

  1. Download the USB/CD boot iso from:

    https://hndl.urbackup.org/Restore/urbackup_restore_2.4.2.iso (64bit ISO)

  2. Extract initrd.img, vmlinuz and filesystem.squashfs from urbackup_restore_2.4.2.iso\live\ with 7zip or similar.

  3. Upload these files to your netboot.xyz asset mirror e.g. to /mnt/netboot/asset-mirror/releases/urbackup

  4. Create a new ipxe file called urbackuprestore.ipxe and add the following content amending the live_endpoint and folder paths as required:

#!ipxe
set live_endpoint http://192.168.1.250:8484

set squash_url ${live_endpoint}/asset-mirror/releases/urbackup/filesystem.squashfs
set kernel_url ${live_endpoint}/asset-mirror/releases/urbackup/vmlinuz
set initrd_url ${live_endpoint}/asset-mirror/releases/urbackup/initrd.img
goto boot

:boot
imgfree
kernel ${kernel_url} boot=live config username=urbackup fetch=${squash_url}
initrd ${initrd_url}
boot

Set one machine to netboot directly to Urbackup

  1. Add a custom ipxe file for the machine you want to netboot with Urbackup using the MAC address, e.g.

MAC-4e1de17bfe26.ipxe

  1. Add the following content to the file, adjusting hostnames or paths appropriately:
#!ipxe
chain urbackuprestore.ipxe
  1. Now netboot the machine.

Add urbackup to the utilities menu

Note

As there are multiple machine architectures/boot methods and we have only downloaded the 64bit ISO above, these instructions apply to the utils-efi.ipxe and utils-pcbios-64.ipxe utilities menu files.

If you want to make a netboot available for the other architectures you will need to create another urbackuprestore.ipxe using the matching bit value (e.g. 32 bit) or architecture (e.g. ARM) initrd.img, vmlinuz and filesystem.squashfs files then edit the matching utilities menu, e.g. utils-arm.ipxe and utils-pcbios-32.ipxe.

  1. Open the utils-efi.ipxe and utils-pcbios-64.ipxe and first insert the Urbackup "item" between the item --gap Utilities: and item --gap netboot.xyz tools: lines:
item urbackup ${space} Urbackup
  1. Second, add the matching definition to chain boot the urbackuprestore.ipxe file just before the :utils_exit section:
:urbackup
chain urbackuprestore.ipxe
goto utils_exit

Warning

You must avoid pasting in where this would break the syntax of other configuration blocks. If you make a mistake and need to revert, you can revert the file to the original with the revert/delete button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment