Skip to main content
The efivar tool manages unified extensible firmware interface (UEFI) environment variables stored in the non-volatile firmware storage. Use these variables to configure the UEFI firmware and its environment. The efivars are key-value pairs stored in the UEFI firmware. They hold settings for boot configuration, system state, and other essential parameters. The efivars manage boot entries and firmware settings, ensuring the system boots correctly and maintains its configuration. To interact with the UEFI environment variables, use the following command:
efivar [-n name] [-f file] [-p] [-w]
Command options:
  • -n name: Specify the name of the UEFI variable.
  • -f file: Load or save variable contents from a file.
  • -p: Print the value of the specified UEFI variable.
  • -w: Write to the specified UEFI variable.

Update the OsIndications variable

To update the OsIndications variable and verify the value of the EFI variable, do the following:
  1. Create a data.hex file containing a specific byte sequence 04 00 00 00 00 00 00 00.
    echo -e -n "\x4\x0\x0\x0\x0\x0\x0\x0" > data.hex
    
  2. Write the contents of data.hex to the EFI variable 8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications.
    efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications -f data.hex -w
    
  3. To verify the value of the EFI variable 8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications, run the following command:
    efivar -n 8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications -p
    
    Output of the previous command:
    GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c
    Name: "OsIndications"
    Attributes:
          Non-Volatile
          Boot Service Access
          Runtime Service Access
    Value:
    00000000  04 00 00 00 00 00 00 00
    

Update the VendorDtbOverlays variable

To update the VendorDtbOverlays variable and verify the value of the EFI variable, do the following:
  1. Create a /var/data file containing data camx.
    echo -n "camx" > /var/data
    
  2. Write the contents of /var/data to the EFI variable 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays.
    efivar -n 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays -f /var/data -w
    
  3. To verify the value of the EFI variable 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays, run the following command:
    efivar -n 882f8c2b-9646-435f-8de5-f208ff80c1bd-VendorDtbOverlays -p
    
    Output of the previous command:
    GUID: 882f8c2b-9646-435f-8de5-f208ff80c1bd
    Name: "VendorDtbOverlays"
    Attributes:
          Non-Volatile
          Boot Service Access
          Runtime Service Access
    Value:
    00000000  63 61 6d 78                                       |camx            |
    

Next steps

For more information, see efivars Manual.