Deploying BlueField Software Using BFB with PXE

Note

It is recommended to upgrade your BlueField product to the latest software and firmware versions available to benefit from new features and latest bug fixes.

  1. Provide the image from BFB file. Run:

    Copy
    Copied!
                

    # mlx-mkbfb -x <BFB>

    For example:

    Copy
    Copied!
                

    # mlx-mkbfb -x DOCA_2.6.0_BSP_4.6.0_Ubuntu_22.04-<version>.bfb

    Warning

    mlx-mkbfb is a Python script that can be found in BlueField release tarball under the /bin directory or in the BlueField Arm file system /usr/bin/mlx-mkbfb.

  2. Copy the 2 dumped files, dump-image-v0 and dump-initramfs-v0 into the PXE server tftp path.

  3. In the PXE server create a boot entry. For example:

    Copy
    Copied!
                

    /var/lib/tftpboot/grub.cfg   set default=0 set timeout=5 menuentry 'Bluefield_Ubuntu_22_04_From_BFB' --class red --class gnu-linux --class gnu --class os { linux (tftp)/ubuntu22.04/dump-image-v0 ro ip=dhcp console=hvc0 console=ttyAMA0 initrd (tftp)/ubuntu22.04/dump-initramfs-v0 }

    If additional parameters must be set, use the bf.cfg configuration file, then add the bfks parameter to the Linux command line in the grub.cfg above.

    Copy
    Copied!
                

    menuentry 'Ubuntu22.04 From BFB with bf.cfg' --class red --class gnu-linux --class gnu --class os { linux (tftp)/ubuntu22.04/dump-image-v0 console=hvc0 console=ttyAMA0 bfnet=oob_net0:dhcp bfks=http://15.22.82.40/bfks initrd (tftp)/ubuntu22.04/dump-initramfs-v0 }

    Where bfks is a BASH script that will run by BFB's install.sh script at the beginning of the BFB installation process. Here is an example of bfks that creates a /etc/bf.cfg file:

    Copy
    Copied!
                

    cat > /etc/bf.cfg << 'EOF' DEBUG=yes ubuntu_PASSWORD='$1$3B0RIrfX$TlHry93NFUJzg3Nya00rE1' EOF

  4. Define DHCP.

    Copy
    Copied!
                

    /etc/dhcp/dhcpd.conf   allow booting; allow bootp;   subnet 192.168.100.0 netmask 255.255.255.0 { range 192.168.100.10 192.168.100.20; option broadcast-address 192.168.100.255; option routers 192.168.100.1; option domain-name-servers <ip-address-list> option domain-search <domain-name-list>; next-server 192.168.100.1; filename "/BOOTAA64.EFI"; }   # Specify the IP address for this client. host tmfifo_pxe_client { hardware ethernet 00:1a:ca:ff:ff:01; fixed-address 192.168.100.2; } subnet 20.7.0.0 netmask 255.255.0.0 { range 20.7.8.10 20.7.254.254; next-server 20.7.6.6; filename "/BOOTAA64.EFI"; }

    pxe_deployment-version-1-modificationdate-1707429372020-api-v2.png

  1. Connect to the BlueField console via UART or RShim console.

  2. Reboot Arm.

  3. Interrupt the boot process into UEFI menu.

  4. Access the Boot Manager menu.

  5. Select the relevant port to PXE from.

boot-manager-menu-version-1-modificationdate-1707429372553-api-v2.png

ISO upgrade via Redfish to set UEFI HTTPs/PXE boot by setting UEFI first boot source. To set the UEFI first boot source using Redfish:

  1. Follow the instructions under section "PXE Server Preparations".

  2. Check the current boot override settings by doing a GET on the ComputerSystem schema over 1GbE to the DPU's BMC. Look for the "Boot" property.

    Copy
    Copied!
                

    curl -k -X GET -u root:<password> https://<DPU-BMC-IP>/redfish/v1/Systems/<SystemID>/ | python3 -m json.tool { ... "Boot": { "BootNext": "", "BootOrderPropertySelection": "BootOrder", "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "None", "UefiTargetBootSourceOverride": "None", ..... }, .... "BootSourceOverrideEnabled@Redfish.AllowableValues": [ "Once", "Continuous", "Disabled" ], "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "UefiHttp", "UefiShell", "UefiTarget", "UefiBootNext" ], .... }

    Boot override enables overriding the first boot source, either once or continuously.

  3. The sample output above shows the BootSourceOverrideEnabled property is Disabled and BootSourceOverrideTarget is None. The BootSourceOverrideMode property should always be set to UEFI. Allowable values of BootSourceOverrideEnabled and BootSourceOverrideTarget are defined in the metadata (BootSourceOverrideEnabled@Redfish.AllowableValues and BootSourceOverrideTarget@Redfish.AllowableValues respectively).

  4. If BootSourceOverrideEnabled is set to Once, after the first boot, boot override is disabled, and any related properties are reset to their former values to avoid repetition. If it is set to Continuous, then on every reboot the DPU keeps performing boot override (HTTPBoot).

  5. To perform boot override, perform a PATCH to pending settings URI over 1GbE to the DPU's BMC.

    Copy
    Copied!
                

    curl -k -X PATCH -d '{"Boot": {"BootSourceOverrideEnabled":"Once", "BootSourceOverrideMode":"UEFI", "BootSourceOverrideTarget": "UefiHttp", "HttpBootUri":"http://<HTTP-Server-Ip>/Image.iso"}}' -u root:<password> https://<DPU-BMC-IP>/redfish/v1/Systems/<SystemID>/Settings | python3 -m json.tool

    For example:

    Copy
    Copied!
                

    curl -k -X GET -u root:<password> https://<DPU-BMC-IP>/redfish/v1/Systems/<SystemID>/ | python3 -m json.tool { ... "Boot": { "BootNext": "", "BootOrderPropertySelection": "BootOrder", "BootSourceOverrideEnabled": "Once", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideTarget": "UefiHttp", "UefiTargetBootSourceOverride": "None", ..... }, ..... }

  6. After performing the above PATCH successfully, reboot the DPU using Redfish Manager schema over 1GbE to the DPU's BMC:

    Copy
    Copied!
                

    curl -k -u root:<password> -H "Content-Type: application/json" -X POST https://<DPU-BMC-IP>/redfish/v1/Systems/Bluefield/Actions/ComputerSystem.Reset -d '{"ResetType" : "GracefulRestart"}'

  7. Once UEFI has completed, check whether the settings are applied by performing a GET on ComputerSystem schema over 1GbE OOB to the DPU BMC.

    Warning

    The HttpBootUri property is parsed by the Redfish server and the URI is presented to the DPU as part of DHCP lease when the DPU performs the HTTP boot.

© Copyright 2023, NVIDIA. Last updated on Mar 6, 2024.