2.4 Recovery Procedures
These sections describe switch recovery procedures:
The first three procedures require Aboot Shell access through the console port. If the console port is not accessible, use the last procedure in the list to replace the configuration file through the USB Flash Drive.
Boot Loader – Aboot describes the switch booting process and includes descriptions of the Aboot shell, Aboot boot loader, and required configuration files.
2.4.1 Removing the Enable Password from the Startup Configuration
The enable password controls access to Privileged EXEC mode. To prevent unauthorized disclosure, the switch stores the enable password as an encrypted string that it generates from the clear-text password. When the switch authentication mode is local and an enable password is configured, the CLI prompts the user to enter the clear-text password after the user types enable at the EXEC prompt.
The startup-config file stores the encrypted enable password to ensure that the switch loads it when rebooting. If the text version of the enable password is lost or forgotten, access to enable mode is restored by removing the encrypted enable password from the startup configuration file.
This procedure restores access to enable mode without changing any other configuration settings.
Step 1 Access the Aboot shell:
a Power cycle the switch by successively removing and restoring access to its power source.
b Type Ctrl-C when prompted, early in the boot process.
c Enter the Aboot password, if prompted.
If the Aboot password is unknown, refer to Section 2.4.3: Restoring the Factory Default EOS Image and Startup Configuration for instructions on reverting all flash directory contents to the factory default, including the startup configuration and EOS image.
Step 2 Change the active directory to /mnt/flash directory.
Aboot#cd /mnt/flash
Step 3 Open the startup-config file in vi.
Aboot#vi startup-config
Step 4 Remove the enable password line.
This is an example of an enable password line:
enable password 5 $1$dBXo2KpF$Pd4XYLpI0ap1ZaU7glG1w/
Step 5 Save the changes and exit vi.
Step 6 Exit Aboot. This boots the switch.
Aboot#exit
2.4.2 Reverting the Switch to the Factory Default Startup Configuration
The startup-config file contains configuration parameters that the switch uses during a boot. Parameters that do not appear in startup-config are set to their factory defaults when the switch reloads. The process requires the Aboot password if Aboot is password protected.
This procedure reverts EOS configuration settings to the default state through bypassing the startup-config file during a switch boot.
Step 1 Access the Aboot shell through the console port:
a Type reload at the Privileged EXEC prompt.
b Type Ctrl-C when prompted, early in the boot process.
c Enter the Aboot password, if prompted.
If the Aboot password is unknown, refer to Section 2.4.3: Restoring the Factory Default EOS Image and Startup Configuration for instructions on reverting all flash directory contents to the factory default, including startup-config and EOS image.
Step 2 Change the active directory to /mnt/flash directory.
Aboot#cd /mnt/flash
Step 3 Rename the startup configuration file.
Aboot#mv startup-config startup-config.old
Step 4 Exit Aboot. This boots the switch
Aboot#exit
Step 5 Cancel Zero Touch Provisioning (ZTP). Refer to Section 2.1.2.2: Canceling Zero Touch Provisioning for instructions.
If ZTP is not canceled, the switch either:
boots, using the startup-config file or boot script that it obtains from the network, or
remains in ZTP mode if the switch is unable to download a startup-config file or boot script.
Step 6 Configure the admin and enable passwords.
switch>enable
switch#configure terminal
switch(config)#enable password xyz1
switch(config)#username admin secret abc41
Step 7 Save the new running-config to the startup configuration file.
switch#write
Step 8 (Optional) Delete the old startup configuration file.
switch#delete startup-config.old
After ZTP is canceled, the switch reboots, using the factory default settings. To avoid entering ZTP mode on subsequent reboots, create a startup-config file before the next switch reboot.
2.4.3 Restoring the Factory Default EOS Image and Startup Configuration
A fullrecover command removes all internal flash contents (including configuration files, EOS image files, and user files), then restores the factory default EOS image and startup-config. A subsequent installation of the current EOS image may be required if the default image is outdated. This process requires Aboot shell access through the console port.
Note For hardware that is purchased after June 2017, the factory default partition will not have the backup EOS software image. This is done to increase the flash size on smaller flash size disks and also since other options are available in the fullrecover command functionality to restore factory default EOS image. This is applicable to both fixed system and modular system hardware.
This procedure restores the factory default EOS image and startup configuration.
Step 1 Access the Aboot shell through the console port:
a Type reload at the Privileged EXEC prompt.
b Type Ctrl-C when prompted, early in the boot process.
c Enter the Aboot password, if prompted.
If the Aboot password is not known, enter an empty password three times, after which the CLI displays:
Type "fullrecover" and press Enter to revert /mnt/flash to factory default state, or just press Enter to reboot:
d Type fullrecover and go to step 4.
Step 2 Type fullrecover at the Aboot prompt.
Aboot#fullrecover
Aboot displays this warning:
All data on /mnt/flash will be erased; type "yes" and press Enter to proceed, or just press Enter to cancel:
Step 3 Type yes and press Enter.
The switch performs these actions:
erases the contents of /mnt/flash
writes new boot-config, startup-config, and EOS.swi files to /mnt/flash
returns to the Aboot prompt
Step 4 Exit Aboot. This boots the switch.
Aboot#exit
The serial console settings are restored to their default values (9600/N/8/1/N).
Step 5 Reconfigure the console port if non-default settings are required.
Step 6 Cancel Zero Touch Provisioning (ZTP). Refer to Section 2.1.2.2: Canceling Zero Touch Provisioning for instructions.
If ZTP is not canceled, the switch either:
boots, using the startup-config file or boot script that it obtains from the network, or
remains in ZTP mode if the switch is unable to download a startup-config file or boot script.
After ZTP is canceled, the switch reboots, using the factory default settings. To avoid entering ZTP mode on subsequent reboots, create a startup-config file before the next switch reboot.
2.4.4 Restoring the Configuration and Image from a USB Flash Drive
The USB flash drive port can be used to restore an original configuration when you cannot establish a connection to the console port. This process removes the contents of the internal flash drive, restores the factory default configuration, and installs a new EOS image from the USB flash drive.
This procedure restores the factory default configuration and installs an EOS image stored on a USB flash drive.
Step 1 Prepare the USB flash drive:
a Verify the drive is formatted with MS-DOS or FAT file system.

Most USB drives are pre-formatted with a compatible file system.
b Create a text file named fullrecover on the USB flash drive.

The filename does not have an extension. The file may be empty.
c Create a text file named boot-config.

The last modified timestamp of the boot-config file on the USB flash must differ from the timestamp of the boot-config file on the switch.
d Enter this line in the new boot-config file on the USB flash:
SWI=flash:EOS.swi
e Copy an EOS image file to the flash drive. Rename it EOS.swi if it has a different file name.

For best results, the flash drive should contain only these three files, because the procedure copies all files and directories on the USB flash drive to the switch.
fullrecover
boot-config
EOS.swi
Step 2 Insert the USB flash drive into the USB flash port on the switch, as shown in Figure 2-1.
Step 3 Connect a terminal to the console port and configure it with the default terminal settings (9600/N/8/1) to monitor progress messages on the console.
Step 4 Power up or reload the switch.
The switch erases internal flash contents and copies the files from the USB flash drive to internal flash. The switch then boots automatically.
Step 5 Cancel Zero Touch Provisioning (ZTP). Refer to Section 2.1.2.2: Canceling Zero Touch Provisioning for instructions.
If ZTP is not canceled, the switch either:
boots, using the startup-config file or boot script that it obtains from the network, or
remains in ZTP mode if the switch is unable to download a startup-config file or boot script.
After ZTP is canceled, the switch reboots using the factory default settings. To avoid entering ZTP mode on subsequent reboots, create a startup-config file before the next switch reboot.