Roll back SONiC to EOS on Arista 7050QX-32

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

larryexchange

Active Member
Dec 27, 2016
86
128
33
48
After reading @AT S37=0 's following article and thread, I decide to convert my Arista 7050QX-32 to SONiC.
Get started with 40GbE SDN with Microsoft Azure SONiC for under $1K
Azure Sonic on the Arista 7050QX-32
Then the first question I ask myself is can I roll back to EOS just in case. The answer is 'Yes'.

You have two options.
Option 1: Reboot to Aboot mode, manually restore/install the EOS image.
Option 2: Restore to factory default using USB drive

Option 1: Reboot to Aboot mode, manually restore/install the EOS image.
-----------------------------
First connect to the console port and login SONiX. Then execute the following commands to reboot the switch.
sudo bash
reboot
7.png

Press Ctrl+C to enter Aboot mode. In Aboot mode, you may use the following commends to clean up the disk and reboot swtich.
umount /mnt/flash
mkfs.vfat /dev/sda1
reboot
8.png

After reboot, swtich will enter Aboot mode automatically coz flash storage is empty. Now you may plug in the USB drive which contains at least one valid EOS image. (It would be better if you have a backup of the original startup-config and boot-config file.) Then you may run the following commands to install EOS.
cp /mnt/usb1/EOS-4.14.6M.swi /mnt/flash
cp /mnt/usb1/startup-config /mnt/flash (If you don't have the backup, you may skip this step.)

cp /mnt/usb1/boot-config /mnt/flash (If you don't have the backup, you may skip this step.)
boot /mnt/flash/EOS-4.14.6M.swi​
9.png

If you have backup of startup-config and boot-config, You may skip the following steps.

If you don't have backup of boot-config file, after switch reboot, you may run the following command and create one.
enable
config t
boot system flash:/EOS-4.14.6M.swi
write
11.png

If you don't have backup of the startup-config file, you may also use the following to cancel the zero-touch provision and create a new startup-config file.
zerotouch cancel
10.png

Now switch roll back from SONiC to the official EOS image.

Pros:
  • Actually in Aboot mode you can configure ma1 interface and download image. So you don't really need a USB drive or access the switch physically.
Cons:
  • A little bit complicated compare to the option 2.

Option 2: Restore to factory default using USB drive
-------------------------------------
Prepare the USB drive
  1. Insert the drive into a computer and format it with either the MS-DOS or FAT filesystem (most USB drives are usually pre-formatted with a compatible filesystem)
  2. Create a text file named “fullrecover”(with no extension) on the USB drive – the file may be empty
  3. Create a text file named “boot-config” (with no extension) on the USB drive – the last modified timestamp of the boot-config file on the USB flash must differ from the boot-config file on the switch. The file should contain a single line: SWI=flash:EOS.swi.
  4. Obtain an EOS image and copy it to the USB drive, renaming it to EOS.swi
Then you may insert the above USB drive into Arista 7050QX-32 and use the following commands to reboot switch.
sudo bash
reboot
After rebooting, system will perform full recovery from USB automatically.

The option 2 is from official document Arista EOS Central – Password recovery / Return to factory default

Pros:
  • Pretty straightforward.
Cons:
  • You need a USB drive and need to plug it into switch.
 
Last edited: