> ## Documentation Index
> Fetch the complete documentation index at: https://sambanova-systems.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# RDU module administration

The SN40L-2 RDU module contains a baseboard management controller (BMC) and an RDU controller (RDU-C) that require periodic administration. This document covers password management, API authentication, firmware updates, and network configuration for these components.

<Note>
  The SN40L-2 BMC includes a built-in secure account called `snservice` for root password recovery. See KB article #1417 for details.
</Note>

***

## Password administration

Change the default root password on the SN40L-2 BMC immediately after initial deployment.

<Note>
  SambaRack and Core Services Racks ship with default credentials for all devices. See KB article #1411 for default credentials.
</Note>

**Procedure:**

1. Log in to the SN40L-2 BMC:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
```

2. Run the `passwd` command:

```bash theme={null}
passwd
```

3. Enter and confirm the new password:

```text theme={null}
New password: <new_password>
Retype new password: <new_password>
passwd: password updated successfully
```

***

<Note>
  When choosing a new BMC password, be aware of the following restrictions. Passwords cannot be based on common dictionary words and must not include the `#` character. If the password does not meet these requirements, the system rejects the change and prompts you to choose a different password.
</Note>

## Generating a secure API login token

Token-based authentication eliminates the need to send plain-text passwords with REST API calls. Generate a token before using the API for power management or other BMC operations.

**Prerequisites:**

* Client system with network access to the SN40L-2 BMC
* `curl` installed

**Procedure:**

1. Generate the token:

```bash theme={null}
export token=$(curl -k -H "Content-Type: application/json" -X POST \
  https://<SN40L-2_BMC_IP>/login \
  -d '{"username":"root","password":"<password>"}' \
  | grep token | awk '{print $2;}' | tr -d '"')
```

2. Verify the token was created:

```bash theme={null}
echo $token
```

Example output:

```text theme={null}
1h0Dk9xjtjsOtBkMhgIN
```

3. Validate the token:

```bash theme={null}
curl -k -H "X-Auth-Token: $token" \
  https://<SN40L-2_BMC_IP>/xyz/openbmc_project/
```

Expected output:

```json theme={null}
{
  "data": [
    "/xyz/openbmc_project/Ipmi",
    "/xyz/openbmc_project/certs",
    "/xyz/openbmc_project/user"
  ],
  "message": "200 OK",
  "status": "ok"
}
```

A successful response confirms the token is ready for use with other API calls, such as powering the SN40L-2 RDU module on or off.

***

## Updating BMC and RDU-C firmware

BMC and RDU-C firmware updates must be performed in sequence on each SN40L-2 module within a node. Both the primary and recovery partitions are updated to ensure system resilience.

| Step | Component | Partition   |
| ---- | --------- | ----------- |
| 1    | –         | Preparation |
| 2    | BMC       | Primary     |
| 3    | BMC       | Recovery    |
| 4    | RDU-C     | Primary     |
| 5    | RDU-C     | Recovery    |

**Prerequisites:**

* Firmware file `sn<XRDU_version>-xrdu-sys-fw-<fw_version>.tar.gz` downloaded from the SambaNova `ext-xrdu-fw` repository `/latest` subdirectory (see KB article #1063)
* Network access to all SN40L-2 BMCs requiring updates

<Note>
  Download the XRDU firmware for SN40L specifically. Firmware for other RDU versions is not compatible.
</Note>

### Step 1: Prepare for the update

**Procedure:**

1. Shut down the node using SambaRack Manager. See *Power off* in [Node management](/en/v1.2.0/sambastack/hardware-admin/sambarack-manager/srm-node-admin).

2. Log in to each SN40L-2 BMC and reboot to clear registers:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
reboot
```

3. Wait 3–5 minutes for the reboot to complete.

4. Uncompress the firmware archive on your client system.

5. Copy the BMC firmware files to each SN40L-2 BMC:

```bash theme={null}
scp /<uncompressed_directory>/obmc/obmc-<version>* \
  root@<SN40L-2_BMC_IP>:/dev/shm/
```

6. Log in and verify the files:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
ls /dev/shm/obmc*
```

Expected output:

```text theme={null}
obmc-<version>.mtd  obmc-<version>.mtd.md5
```

### Step 2: Update the BMC primary partition

**Procedure:**

1. Run the update:

```bash theme={null}
obmcupdate -p primary -t bmc -f /dev/shm/obmc-rdu-<version>.mtd
```

<Warning>
  Do not run other commands or disconnect power during the update.
</Warning>

2. Wait for Erasing, Writing, and Verifying stages to reach 100%.

3. Reboot the BMC:

```bash theme={null}
reboot -f
```

4. Wait 3–5 minutes, then log in:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
```

<Note>
  The update changes the BMC's SSH host key. Remove the old entry from `~/.ssh/known_hosts` if prompted.
</Note>

5. Verify the update:

```bash theme={null}
obmcupdate -i
```

Confirm the BMC Release Version matches the applied firmware version.

### Step 3: Update the BMC recovery partition

The reimage process clears `/dev/shm/`. Copy the firmware files again before proceeding.

<Warning>
  `/dev/shm` is a temporary filesystem. Contents are lost on reboot.
</Warning>

**Procedure:**

1. Copy the firmware files from your client system:

```bash theme={null}
scp /<uncompressed_directory>/obmc/obmc-<version>* \
  root@<SN40L-2_BMC_IP>:/dev/shm/
```

2. Log in and verify:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
ls /dev/shm/obmc*
```

3. Run the update:

```bash theme={null}
obmcupdate -p recovery -t bmc -f /dev/shm/obmc-rdu-<version>.mtd
```

<Warning>
  Do not run other commands or disconnect power during the update.
</Warning>

4. Wait for all stages to reach 100%.

5. If the update fails repeatedly, contact SambaNova Support.

### Step 4: Update the RDU-C primary partition

**Procedure:**

1. Copy the RDU-C firmware files from your client system:

```bash theme={null}
scp /<uncompressed_directory>/rduc/rduc-<version>-* \
  root@<SN40L-2_BMC_IP>:/dev/shm/
```

2. Log in and verify:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
ls /dev/shm/rduc*
```

Expected output:

```text theme={null}
rduc-<version>-primary.spi      rduc-<version>-primary.spi.md5
rduc-<version>-recovery.spi     rduc-<version>-recovery.spi.md5
```

3. Run the update:

```bash theme={null}
obmcupdate -p primary -t rduc -f /dev/shm/rduc-<version>-primary.spi
```

<Warning>
  Do not run other commands or disconnect power during the update.
</Warning>

4. Verify the update:

```bash theme={null}
obmcupdate -i
```

Confirm the RDU-C Release Version matches the applied firmware version.

### Step 5: Update the RDU-C recovery partition

**Procedure:**

1. Run the update:

```bash theme={null}
obmcupdate -p recovery -t rduc -f /dev/shm/rduc-<version>-recovery.spi
```

2. If issues occur during any update step, contact SambaNova Support.

After all updates complete successfully, power on the system using SambaRack Manager. See the [Power on](/en/v1.2.0/sambastack/hardware-admin/sambarack-manager/srm-node-admin#power-on) section for more details.

***

## Configuring BMC network settings

BMC network settings are configured during initial rack delivery and typically do not require modification. Use the procedures below if reconfiguration is necessary.

<Warning>
  When changing the SN40L-2 BMC IP address, update the `IP_ADDRESS_SP#` entries in `/platform/network.json` on both the modified BMC and any directly connected BMCs in the node.
</Warning>

<Note>
  Changing the IP address terminates active SSH sessions. Reconnect using the new IP address.
</Note>

### Command reference

```bash theme={null}
network-settings [-h] -i [IPADDRESS] -n [NETMASK] -g [GATEWAY] -d [DNS] {static,DHCP}
```

| Option              | Description                            |
| ------------------- | -------------------------------------- |
| `{static,DHCP}`     | Network mode                           |
| `-i`, `--ipAddress` | IP address (use `""` for DHCP)         |
| `-n`, `--netMask`   | Subnet mask, 0–32 (any value for DHCP) |
| `-g`, `--gateWay`   | Gateway address (use `""` for DHCP)    |
| `-d`, `--dns`       | DNS server (use `""` for DHCP)         |
| `-h`, `--help`      | Display help                           |

### Setting a static IP address

**Procedure:**

1. Log in to the SN40L-2 BMC:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
```

2. Configure the static IP:

```bash theme={null}
network-settings -i "10.10.0.15" -n 24 -g "10.10.0.1" -d "10.0.0.13" static
```

3. Restart the network service:

```bash theme={null}
systemctl restart systemd-networkd.service
```

4. Reconnect using the new IP address:

```bash theme={null}
ssh root@<SN40L-2_NEW_BMC_IP>
```

5. Verify the configuration:

```bash theme={null}
ip address
```

The new IP appears as the second `inet` value under `eth0`.

### Setting DHCP

**Procedure:**

1. Log in to the SN40L-2 BMC:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
```

2. Configure DHCP:

```bash theme={null}
network-settings -i "" -n 0 -g "" -d "" DHCP
```

3. Restart the network service:

```bash theme={null}
systemctl restart systemd-networkd.service
```

4. Reconnect using the DHCP-assigned IP address and verify the configuration.

***

## Configuring BMC hostname

**Procedure:**

1. Log in to the SN40L-2 BMC:

```bash theme={null}
ssh root@<SN40L-2_BMC_IP>
```

2. Set the hostname:

```bash theme={null}
hostnamectl set-hostname <hostname>
```

3. Log out and log back in to verify the new hostname appears in the prompt.
