NVIDIA BlueField BSP

Ubuntu Dual Boot Support

BlueField DPU may be installed with support for dual boot. That is, two identical images of the BlueField OS may be installed using BFB.

Proposed EMMC partitioning layout for 64GB EMMC is:

Device             Start       End  Sectors  Size Type
/dev/mmcblk0p1      2048    104447   102400   50M EFI System
/dev/mmcblk0p2    104448  50660334 50555887 24.1G Linux filesystem
/dev/mmcblk0p3  50660335  50762734   102400   50M EFI System
/dev/mmcblk0p4  50762735 101318621 50555887 24.1G Linux filesystem
/dev/mmcblk0p5 101318622 122290141 20971520   10G Linux filesystem

Where:

  • /dev/mmcblk0p1 - boot EFI partition for the first OS image

  • /dev/mmcblk0p2 - root FS partition for the first OS image

  • /dev/mmcblk0p3 - boot EFI partition for the second OS image

  • /dev/mmcblk0p4 - root FS partition for the second OS image

  • /dev/mmcblk0p5 - common partition for both OS images 

    The common partition can be used to store BFB files that will be used for OS image update on the non-active OS partition.

Ubuntu Dual Boot Installation

Add the values below to the bf.cfg configuration file (see section "Ubuntu 20.04 with DOCA Runtime and DOCA Installation" for more information).

DUAL_BOOT=yes

If EMMC size is ≤16GB, dual boot support is disabled by default, but it can be forced by setting the following parameter in bf.cfg:

FORCE_DUAL_BOOT=yes

To modify the default size of the /common partition, add the following parameter:

COMMON_SIZE_SECTORS=<number-of-sectors>

The number of sectors is the size in bytes divided by the block size (512). For example, for 10GB, the COMMON_SIZE_SECTORS=$((10*2**30/512)).

After assigning size for the /common partition, what remains is divided equally between the two OS images.

# bfb-install --bfb <BFB> --config bf.cfg --rshim rshim0

This will result in the Ubuntu OS image to be installed twice on the BlueField DPU.

Upgrading Ubuntu OS Image Using Dual Boot

  1. Download the new BFB to the BlueField DPU into the /common partition. Use bfb_tool.py script to install the new BFB on the inactive BlueField DPU partition:

    /opt/mellanox/mlnx_snap/exec_files/bfb_tool.py --op fw_activate_bfb --bfb <BFB>
    
  2. Reset BlueField DPU to load the new OS image:

    /sbin/shutdown -r 0
    

    BlueField DPU will now boot into the new OS image.

Use efibootmgr utility to manage the boot order if necessary.

  • Change the boot order with:

    # efibootmgr -o
    
  • Remove stale boot entries with:

    # efibootmgr -b <E> -B
    

    Where <E> is the last character of the boot entry (i.e., Boot000<E>).

Last updated: