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 resembles 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 ifthe 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 a configured EOS software image (with the extension .swi).
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.
The boot-config stores the console settings; 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 configured terminal settings are proper, 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, select 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 password using 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 flash drive contents.
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 /mnt/flash preserves the contents. The /mnt directory contains the file systems of storage devices. Aboot mounts the internal flash device at /mnt/flash.
When you insert a USB flash drive in one of the flash ports, Aboot mounts its file system on /mnt/usb1. The file system is unmounted when you remove the USB flash drive 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 boots the EOS software image (with the extension .swi), which is available in boot-config automatically if you take no action during the boot process. Suppose the boot process fails for any reason, such as an incorrectly configured software image. In that case, 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.
It 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.
Suppose the boot-config does not have a specified image or booting the image results in an error condition (for example, an incorrect path or unavailable HTTP server). In that case, 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.
Busybox, an open-source implementation of UNIX utilities, provides many Aboot shell commands. Busybox command help is available 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 unconfigured by default; you can configure management port settings using Aboot shell commands like ifconfig and udhcpc. After configuring a management interface, 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.