Aboot Shell

The Aboot shell is an interactive command-line interface used to manually boot a switch, restore the internal flash to its factory-default state, run hardware diagnostics, and manage files. The Aboot shell is similar to the Linux Bourne Again Shell (Bash).

The Aboot shell provides commands for restoring the state of the internal flash to factory defaults or a customized default state. You can use these recovery methods to:

  • restore the factory-default flash contents before transferring the switch to another owner.
  • restore Aboot shell access if the Aboot password is lost or forgotten.
  • restore console access if baud rate or other settings are incompatible with the terminal.
  • replace the internal flash contents with configuration or image files stored on a USB flash drive.

Aboot Shell Operation

When the switch is powered on or rebooted, Aboot reads its configuration from boot-config on the internal flash and attempts to boot an EOS software image (with the extension .swi) automatically if one is configured.

You can monitor the automatic boot process or enter the Aboot shell only from the console port. You can connect a PC or terminal directly to the port and run a terminal emulator to interact with the serial port or access it through a serial concentrator device.

Console settings are stored in boot-config; the factory-default settings for Arista switches are 9600 baud, no parity, 8 character bits, and 1 stop bit. If you do not know the current settings, perform a full flash recovery to restore the factory-default settings. When the console port is connected and the terminal settings are configured properly, the terminal displays a message similar to the following a few seconds after powering up the switch:

Aboot 1.0.0

Press Control-C now to enter the Aboot shell

To abort the automatic boot process and enter the Aboot shell, press Ctrl-C (ASCII 3 in the terminal emulator) after the Press Control-C now to enter Aboot shell message appears. Pressing Ctrl-C can interrupt the boot process up through the starting of the new kernel.

If the boot-config file does not contain a password command, the Aboot shell starts immediately. Otherwise, you must enter the correct password at the password prompt to start the shell. If you enter the wrong password three times, Aboot displays this message:

Type "fullrecover" and press Enter to revert /mnt/flash to factory default 

state, or just press Enter to reboot:
  • Pressing Enter continues a normal soft reset without entering the Aboot shell.
  • Typing fullrecover and pressing Enter performs a full flash recovery to restore the factory-default settings, removing all previous contents of the flash drive.

The Aboot shell starts by printing:

Welcome to Aboot.

Aboot then displays the Aboot# prompt.

Aboot reads its configuration from boot-config on the internal flash.

Accessing the Aboot Shell

This procedure accesses the Aboot Shell.

  1. Reload the switch and press enter or type y when prompted, as described in Typical Reset Sequence.
    The command line displays this Aboot entry prompt.
    Press Control-C now to enter Aboot shell
  2. Type Ctrl-C.
    If the boot-config file does not contain a PASSWORD command, the CLI displays an Aboot welcome banner and prompt.
    ^CWelcome to Aboot.
    Aboot#
    If the boot-config file contains a PASSWORD command, the CLI displays a password prompt. In this case, proceed to step 3. Otherwise, the CLI displays the Aboot prompt.
  3. If prompted, enter the Aboot password.
    Press Control-C now to enter Aboot shell 
     ^CAboot password: 
    Welcome to Aboot. 
    Aboot#
    Aboot allows three attempts to enter the correct password. After the third attempt, the CLI prompts the user to either continue the reboot process without entering the Aboot shell or to restore the flash drive to the factory default state.
    Press Control-C now to enter Aboot shell 
    ^CAboot password: 
    incorrect password 
    Aboot password: 
    incorrect password 
    Aboot password: 
    incorrect password 
    Type "fullrecover" and press Enter to revert /mnt/flash to factory default 
    state, or just press Enter to reboot: fullrecover 
    All data on /mnt/flash will be erased; type "yes" and press Enter to proceed, 
    or just press Enter to cancel:
    The fullrecover operation replaces the flash contents with a factory default configuration. The CLI displays text similar to the following when performing a fullrecover, finishing with another entry option into the Aboot shell.
    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 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.
    Erasing /mnt/flash
    Writing recovery data to /mnt/flash
    boot-config
    startup-config
    EOS.swi
    210770 blocks
    Restarting system.
    
    
    Aboot 1.9.0-52504.EOS2.0
    
    
    Press Control-C now to enter Aboot shell

Aboot File Structure

When you enter the Aboot CLI, the current working directory is the root directory on the switch. Switch image and configuration files are at /mnt/flash. When exiting the Aboot shell, only the contents of /mnt/flash are preserved. The /mnt directory contains the file systems of storage devices. Aboot mounts the internal flash device at /mnt/flash.

When a USB flash drive is inserted in one of the flash ports, Aboot mounts its file system on /mnt/usb1. The file system is unmounted when the USB flash drive is removed from the port. Most USB drives contain an LED that flashes when the system is accessing it; do not remove the drive from the flash port until the LED stops flashing.

Booting From the Aboot Shell

Aboot attempts to boot the EOS software image (with the extension .swi) configured in boot-config automatically if you take no action during the boot process. If the boot process fails for any reason, such as an incorrectly configured software image, Aboot enters the shell, allowing you to correct the configuration or boot a software image manually. The boot command loads and boots an EOS software image file.

The boot command syntax is

boot SWI

where SWI lists the location of the EOS image that the command loads. SWI options include:

  • device:path loads the image file from the specified storage device. The default device value is flash; other values include file and usb1.
  • /PATH loads the image file from the specified path in the switch directory.
  • http://server/path loads the image file from the HTTP server on the host server.
  • ftp://server/path loads the image file from the FTP server on the host server.
  • tftp://server/path loads the image file from the TFTP server on the host server.
  • nfs://server/path mounts the path’s parent directory from the host server and loads the image file from the loaded directory.

The accepts the same commands as the SWI variable in the boot-config file. See boot-config Command Line Content for a list of boot command formats.

If an image file is not specified in boot-config, or if booting the image results in an error condition (for example, an incorrect path or unavailable HTTP server), Aboot halts the boot process and drops into the shell.

Example

To boot EOS.swi from internal flash, enter one of these commands on the Aboot command line:
boot flash:EOS.swi
boot /mnt/flash/EOS.swi

Aboot Commands

To list the contents of the internal flash, enter ls /mnt/flash at the Aboot# prompt.

Example

Aboot#ls /mnt/flash
EOS.swi boot-config startup-config

Commonly used commands include:

  • ls prints a list of the files in the current working directory.
  • cd changes the current working directory.
  • cp copies a file.
  • more prints the contents of a file one page at a time.
  • vi edits a text file.
  • boot boots a software image file.
  • swiinfo prints information about a software image.
  • recover recovers the factory-default configuration.
  • reboot reboots the switch.
  • udhcpc configures a network interface automatically via DHCP.
  • ifconfig prints or alters network interface settings.
  • wget downloads a file from an HTTP or FTP server.

Many Aboot shell commands are provided by Busybox, an open-source implementation of UNIX utilities. Busybox command help is found at http://www.busybox.net/downloads/BusyBox.html. Aboot provides access to only a subset of the documented commands.

Aboot can access networks through the Ethernet management ports. Aboot provides network interfaces mgmt1 and mgmt2. These ports are unconfigured by default; you can configure management port settings using Aboot shell commands like ifconfig and udhcpc. When a management interface is configured, use wget to transfer files from an HTTP or FTP server, tftp to transfer files from a TFTP server, or mount to mount an NFS filesystem.