Getting a modern EOS on an Arista 7010T

The (currently) last version of EOS to support the venerable Arista 7010T switch is 4.28.10.1M. This is such a great switch; you can find them on eBay, often for less than $200, 48 gigE ports, 4 SFP+ ports, redundant power, hot swap and reversible fan. No longer able to be covered by support contracts, but until they have a security issue, they’re so cheap you can have a closet full of spares if you still have a need for gig ports, such as for out of band networks, iLO, etc.

Only problem with the 7010T is EOS has outgrown the tiny storage on the device, enough that you can’t fit your old image and your new image on the flash at the same time. This requires using some commands you may not normally use to get them upgraded to current, and of course, out of band serial in case things go wrong. Doesn’t hurt to have someone able to plug a usb stick in too if things go really haywire, where the USB stick will be preloaded with the prior EOS version and the new one, ‘just in case’.

Okay, so first option is a fresh install that includes a complete wipe, like what you’d want to do if you purchased a used device. You never know what you’re going to receive when you buy used. For example, a device I just received came from Rakuten.com apparently, and they disposed of it without clearing the config, including their device usernames and password hashes, snmp community (not using v3…), vlans, network addresses. I could even tell it used to be at a data center in Las Vegas with a company called Switch. Moral of the story, clear your configs before disposing of equipment folks…

Factory Erase Option

Doing this properly requires a USB stick. Format your device in FAT32 (exFAT is not supported), and put two files on it; the EOS version you want to use, named EOS.swi, and an empty file called fullrecover

Next, reload or power on the switch, and break out of the boot cycle with Ctrl-C when you see:

Aboot 6.1.0-3182495


Press Control-C now to enter Aboot shellCode language: CSS (css)

From the Aboot shell, first eliminate the old EOS files, including the hidden .boot-image.swi copy of the most recent running version:

Aboot# cd /mnt/flash
Aboot# rm .boot-image.swi
Aboot# rm EOS-4.16.7M.swi
Aboot# cd /Code language: PHP (php)

Now, insert your USB device. You should see (via serial) that it’s been noticed and mounted. May look ugly even though it mounts fine:

May  1 14:54:16 localhost StorageDevices: %STORAGEDEVICE-3-IO_ERROR_EXTERNAL_USB: USB storage at /mnt/usb1 (SN:Phison_2309_PRAM-0:0 Model:2309_PRAM Firmware:1.00) appears to be faulty.
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/modprobe -bv sg' failed with exit code 1.
[ 3616.749694] sd 2:0:0:0: [sda] No Caching mode page found
Process '/sbin/modprobe -bv sg' failed with exit code 1.
[ 3616.813339] sd 2:0:0:0: [sda] Assuming drive cache: write through
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/initblockdev 'sda' 'add' ''' failed with exit code 32.
Code language: JavaScript (javascript)

You can now do a fullrecover in Aboot. This will erase the flash, and since you removed both the prior EOS version and the .boot-image.swi, it should utilize your new EOS.swi found on the USB drive to create a new.boot-image.swi with the new version. If you forgot to create that EOS.swi you’ll get an error:

Aboot# fullrecover
No EOS image found in recovery partition, usb1 or usb2
You must provide a valid image named EOS.swi at the root of a mounted usb drive before running this command.Code language: CSS (css)

If you got it right, ready to go:

Aboot# fullrecover 
All data on /mnt/flash will be erased.
The following will be installed:
startup-config from recovery partition
EOS image EOS.swi from /mnt/usb1
boot-config from recovery partition
To continue, type "yes" and press Enter to proceed, or just press Enter to cancel: yes
Extracting recovery partition
Reformating flash device
installing EOS.swi
installing boot-config
installing startup-config
Code language: PHP (php)

Now I don’t actually want that old config, nor do I want my image named EOS.swi. So what I do next, before reboot, is:

Aboot# cd /mnt/flash
Aboot# rm boot-config startup-config
Aboot# mv EOS.swi EOS-4.28.10.1M.swi
Aboot# reboot Code language: PHP (php)

When it reboots, it’s going to fail to boot because it will be looking for an image that doesn’t exist. Not a problem, you’ll just be dumped back to Aboot. Before proceeding, if you want zero touch config, you’re good, but if you don’t, add a zerotouch-config file to /mnt/flash via the touch step shown below, and then proceed with the boot step either way:

# Do the following if disabling zero touch config
Aboot# touch /mnt/flash/zerotouch-config

# Now let's boot up with the new image:
Aboot# boot /mnt/flash/EOS-4.28.10.1M.swi
[  330.918872] Starting new kernel
[    2.913507] Running dosfsck on: /mnt/flash
[    3.540408] dosfsck on /mnt/flash took 0s
[    4.719671] Running dosfsck on: /mnt/usb1
[    7.127216] dosfsck on /mnt/usb1 took 2s
Data in /mnt/flash/EOS-4.28.10.1M.swi differs from previous boot image on /mnt/flash.
Saving new boot image to /mnt/flash...
Mounting SWIM Filesystem
  Optimization Strata-4GB root squash found
  Optimization Strata-4GB all squashes found
  Mounting optimization Strata-4GB
Switching rootfs
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/modprobe -bv sg' failed with exit code 1.
Process '/sbin/initblockdev 'sda' 'add' ''' failed with exit code 32.

Welcome to Arista Networks EOS 4.28.10.1M
New seat seat0.
/usr/bin/SsuRestore: line 24: /mnt/flash/persist/AsuEvent.log: No such file or directory
Starting ProcMgr: Removing all files in all subdirs of /etc/ProcMgr.d/run
[  OK  ]
Starting EOS initialization stage 1: [  OK  ]
Starting NorCal initialization:
-----------------------------------------------------
Upgrading the otter2 system fpga.
This process can take several minutes.
Please do not reboot your switch.
-----------------------------------------------------
Upgrade of the otter2 system fpga completed successfully.
Power cycling the system after successfully upgrading all system fpgas.
Code language: PHP (php)

You’ll notice in this case it did some fpga flashing too due to how old the prior EOS was. One more reboot and it came up fine:

localhost#show boot
Software image: flash:/EOS-4.28.10.1M.swi
Console speed: (not set)
Aboot password (encrypted): (not set)
Memory test iterations: (not set)
Checksum: 9057d4fbc2a9f76aed85cea6b020d01e3b8e414a
Checksum algorithm: sha1Code language: PHP (php)

Upgrade In Place Option

This next way to do the upgrade is what you’ll want to do if your system is in production or not otherwise untrustworthy. You can do this via scp, sftp, or from usb stick. I haven’t tried via tftp so not sure if that works.

Before you begin, please back up the current EOS image from the device to either USB or external location (scp, sftp, tftp). You may very rarely need it. Keep its name the same as what’s in your current startup config.

You need enough room on the device for the hardware-specific size of the EOS image. This is not the size of the .swi file you’ll download, because there will be parts that are not needed for your specific device. The system is able to figure this out and only consume the pieces it needs to build the image that ends up on the device. However, you’ll still need an amount of space equal to 2x that image size, which is probably going to be in the 1.5GB+ range. This means you will probably not have enough room to have your old image in .boot-image.swi, your new image, and spare space for it to rebuild the boot image.

So here we go, clearing space, and then the nerveracking part where we get rid of the running EOS on a live device. First, start with the Arista guide on clearing a full filesystem, to ensure no useless files are cluttering it up and consuming space:

https://arista.my.site.com/AristaCommunity/s/article/troubleshooting-filesystem-full-issues

Next, see if you’ve got any leftover file system check files, which the above article does not touch on:

localhost#dir *.REC
Directory of flash:/

       -rwx   765083648            Jan 1  1980  FSCK0000.REC

localhost#del FSCK0000.RECCode language: PHP (php)

Now let’s get rid of the running EOS .swi file (NOT the boot file, i.e. .boot-image.swi), if you are sure you’ve saved it to external location:

localhost#dir
Directory of flash:/

       -rwx   608484547           Jan 25  2023  EOS-4.19.1F.swi

localhost#del EOS-4.19.1F.swiCode language: PHP (php)

Hopefully you now see a bunch of free space:

localhost#bash df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/mmcblk0p1            3.6G      1.1G      2.5G  31% /mnt/flashCode language: PHP (php)

You should now be good to go. However, I’ve had instances where the underlying linux does not release the free space from either of the above file deletions. That makes for a nervous situation where your only option is to reboot (reload). The reboot ‘should’ work fine, because the .boot-image.swi file is still there and the system, upon failing to boot the specified EOS in the config, will fall back to the boot image. You could find yourself having to put that old image back via Aboot though if something does go wrong, so that’s why you backed it up. If it does fail to boot, what you’ll do from Aboot is copy the prior image file back to /mnt/flash via the USB (/mnt/usb1) or remote network source, which may require adding networking if you’re using a remote location and it does not already exist in your boot-config file. Docs on that here.

If you do see the free space, the next part is easy:

localhost#install source usb1:/EOS-4.28.10.1M.swi destination flash:

EOS-4.28.10.1M.swi                                                       100% 1153MB  20.5MB/s   00:56
done.
Preparing new boot-config... done.
Committing changes... done.
Installation succeeded.
Optimized image size for the Strata platform is 730M

Code language: PHP (php)

This should have resulted in a new optimized size EOS-4.28.10.1M.swi in /mnt/flash versus the original size from your source location. Take an md5 sum of it and compare to the release md5 JSON, looking for your specific platform:

localhost#bash md5sum /mnt/flash/EOS-4.28.10.1M.swi
ac7f8948aa37e2e9d2537f92c9c85381  /mnt/flash/EOS-4.28.10.1M.swiCode language: PHP (php)

This compares properly with the correct value in the json:

"Strata-4GB": {"checksums": {"md5": "ac7f8948aa37e2e9d2537f92c9c85381", "sha512": "0ef5dcecde384cdcf0956bee2f333625e7516a1a03d68f97e6806104d056d4dc21acf9f1a5126b27f26741e6053d489c60f5692728c20d0ec4031fcb19def2a2"}, "description": "Optimized image used on Strata platforms with only 4GB of flash storage"}Code language: JavaScript (javascript)

Now we’re ready to go ahead and update the boot config, write, reload the switch:

localhost#conf t
localhost(config)#boot system flash:/EOS-4.28.10.1M.swi
localhost(config)#end
localhost#wr mem
Copy completed successfully.
localhost#reload
Proceed with reload? [confirm]yCode language: PHP (php)

Hooray, good to go:

localhost#show ver
Arista DCS-7010T-48
Hardware version: 12.00
Serial number:
Hardware MAC address:
System MAC address:

Software image version: 4.28.10.1M
Architecture: i686
Internal build version: 4.28.10.1M-35010112.428101M
Image format version: 3.0
Image optimization: Strata-4GB
Code language: CSS (css)

Leave a Reply

Your email address will not be published. Required fields are marked *