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.