Allied Telesis Support Portal

How to Restore an AlliedWare Plus device using autoboot from external media

My switch fails and I need to configure a new one as a replacement

Introduction

The Autoboot feature enables the switch to automatically load a specific release file and/or configuration file from external media, such as SD card or USB drive, into Flash memory, providing there is enough free space available.
If there is not enough free space, the Autoboot feature will exit and booting will revert to what was previously set by the CLI. This feature is enabled only the first time the device is powered up in the field direct from the factory. Subsequently, the Autoboot feature is disabled by default.

Note: The Autoboot feature is not supported in a stacked configuration nor in SBx8100 model.

Do not remove the external media part way through the copy process as this may leave the device in an unstable state.

Configuration commands that rely on the presence of a feature license will fail when executed in the replacement device if the replacement device does not have the same feature license present.

 

Restoring the device


The example below describes the sequence of events when an AW+ device in the field fails and is restored using this feature:

1. Using the create autoboot command, a network engineer has previously manually created a restore external media device, such as a USB storage device.
The external media device contains the following components:

  • An autoboot.txt file with required contents

  • An appropriate release file

  • A configuration file


2. A failed AW+ device in the field.

3. A replacement device of same model.
Note: This replacement must already have a 5.4.2-2.6 or later release or bootloader version 1.1.6 or later pre-installed to be able to detect and interpret the autoboot.txt file.

4. The previously created external media device is placed into the replacement AW+ device.

5. The AW+ device powers up using its pre-installed release if present. It automatically checks the external media device for the autoboot.txt file.

6. The AW+ device finds a valid autoboot.txt file on the external media device, with the value “Copy_from_external_media_enabled” set. The release file and configuration file both exist on the external media device.

7. The MD5sum of pre-installed Flash release file is compared to the MD5sum of the release file stored in the external media device. If they do not match, because the release file in the replacement unit is either missing or different, then the release is copied from the external media device. If the release files already match, then the release file is not copied from the external media device.

8. The MD5sum of the Flash configuration file default.cfg is compared to the MD5sum of the configuration file stored in the external media device. If they do not match, because the configuration file in the replacement unit is either missing or different, then the configuration file is copied from the external media device. If the configuration file already match, then the configuration file is not copied from the external media device.

9. The memory space available in the unit´s Flash is checked to ensure the release and configuration files stored in the external media device will fit. If there is not enough space the Autoboot feature will exit.

10. The release file and configuration files are automatically copied from the external media device to the unit´s Flash memory. The AW+ device release and configuration files are updated to contain the appropriate names.

11. The AW+ device is automatically rebooted.

12. The replacement unit is now running the restored release and configuration files. Subsequent reboots are based on the restored release and configuration files stored in the unit´s Flash memory.

13. If you want to Autoboot from external media on this specific switch in the future, you must now manually enable the Autoboot feature in the configuration menu via the autoboot enable command. This command resets the enable flag stored internally in the switch NVS memory.

awplus# configure terminal
awplus(config)# autoboot enable

You can only create one Autoboot file on your external media, otherwise you will receive the following message:

awplus#create autoboot usb
% autoboot.txt already exists on external media.
% Failed to create restore file autoboot.txt on external media.

If you put an External Media with an Autoboot file on a different device model, the autoboot will fail and the device will boot with the default configuration file and all the ports LEDs will start flashing green until you reboot the device.
 

Return a device to its factory default condition

You can erase all data from NVS and all data from flash except the following:

  • The boot release file (a .rel file) and its release setting file
  • All license files
  • The latest GUI release file

Use the command:

awplus# erase factory-default
This command will erase all NVS, all flash contents except for the boot release,
a GUI resource file, and any license files, and then reboot the switch. 
Continue? (y/n):y

The device is then rebooted and returned to its factory default condition. The device can then be used for Autoboot recovery.
 

Creating the Autoboot file on the External Media


Use the create autoboot command to create an autoboot.txt file on external media. This command will automatically ensure that the keys and values that are expected in this file are correct. After the file is created the command will copy the current release and configuration files across to the external media.

awplus# create autoboot usb
% Created restore file autoboot.txt on external media.
 

Example autoboot.txt file

;Autoboot Creation, Local Time Sun, 3 Jan 2021 11:10:03
;

[AlliedWare Plus]
Copy_from_external_media_enabled=yes
Boot_Release=<device>-5.5.0-2.1.rel
Boot_Config=example.cfg