Board Serial is not set

I am running into an issue where the /sys/class/dmi/id/product_uuid and /sys/class/dmi/id/product_serial are not set.

Vyos seems to need it to do v6 duid generation on first boot.

things like vendor are set - dmidecode output is :

dmidecode
vyos@vyos:~$ sudo dmidecode
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.
7 structures occupying 245 bytes.
Table at 0xF69C6020.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: U-Boot
        Version: 2020.07-rc1-ga94e0d21
        Release Date: 03/15/2022
        ROM Size: 64 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                Selectable boot is supported
                I2O boot is supported
                Targeted content distribution is supported

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: traverse
        Product Name: ten64
        Version: Not Specified
        Serial Number: Not Specified
        UUID: Not Settable
        Wake-up Type: Reserved
        SKU Number: Not Specified
        Family: Not Specified

Handle 0x0002, DMI type 2, 14 bytes
Base Board Information
        Manufacturer: traverse
        Product Name: ten64
        Version: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Features:
                Board is a hosting board
        Location In Chassis: Not Specified
        Chassis Handle: 0x0000
        Type: Motherboard

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
        Manufacturer: traverse
        Type: Desktop
        Lock: Not Present
        Version: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: Unspecified
        Contained Elements: 0

Handle 0x0004, DMI type 4, 48 bytes
Processor Information
        Socket Designation: Not Specified
        Type: Central Processor
        Family: Unknown
        Manufacturer: Unknown
        ID: 00 00 00 00 00 00 00 00
        Version: Unknown
        Voltage: Unknown
        External Clock: Unknown
        Max Speed: Unknown
        Current Speed: Unknown
        Status: Unpopulated
        Upgrade: None
        L1 Cache Handle: Not Provided
        L2 Cache Handle: Not Provided
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Characteristics: None

kernel is linux-5.10.110 built with vyos-build/packages/linux-kernel at ten64-build · grahamhayes/vyos-build · GitHub and vyos-build/ten64_defconfig at ten64-build · grahamhayes/vyos-build · GitHub as the config

Is there a way to write that myself?

Try setting the serial# environment variable in U-Boot, this should be passed in the DMI/SMBIOS

(Board MAC as reported by boot sequence)
uC:    MACADDR: 00:0A:FA:24:25:2F

=> setenv serial# '000AFA24252F'
=> saveenv

product_serial should read correctly then:

# cat /sys/class/dmi/id/product_serial
000AFA24252F

If DMI/SMBIOS isn’t available (non-EFI OS) it can be found in the device tree as well:

cat /sys/firmware/devicetree/base/serial-number
000AFA24252F

I recently reworked the MAC and serial settings in U-Boot so this will be done automatically in future firmware releases. It hasn’t made it’s way into the published firmware versions yet, though.

1 Like

That worked - thanks!