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).
- 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.
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
- 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
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
- 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.
- showtech prints device hardware information.
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.