Posted on June 11, 2015 10:35 am
 |  Asked by Abhimanyu
 |  11147 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hi,

I need to copy some backup configs as well as a code from an Arista DCS-7508 running 4.12.3.2-1419470.EOS41232 with a 7500-SUP as its supervisor to a USB stick. The USB doesn’t show up unless inserted. I don’t have a lab set up where I can test this so could you let me know the procedure to do this.

I also need to copy this code and configs from the USB stick back to a new supervisor (7500E-SUP). I understand that this is the procedure to prepare a USB stick

 

How to prepare the USB drive

a. 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)
b. Create a text file named “fullrecover”(with no extension) on the USB drive – the file
may be empty
c. 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.
d. Obtain an EOS image and copy it to the USB drive, renaming it to EOS.swi

and these contents will get copied into the switch.

This is in the case of a password recovery. Would the procedure remain the same in this case too.

 

Abhimanyu

 

 

 

 

0
Posted by Jeremy Georges
Answered on June 11, 2015 2:29 pm

Hello Abhimanyu,

 

First, to copy from the switch to your USB flash drive, insert the flash drive. You’ll see the following on the console and the USB drive is auto-mounted to the following mount point /mnt/usb1:

7050S-64.H:32:22#[ 183.235652] sd 5:0:0:0: [sdc] No Caching mode page present
[ 183.304210] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 183.385883] sd 5:0:0:0: [sdc] No Caching mode page present
[ 183.452003] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 183.531197] sd 5:0:0:0: [sdc] No Caching mode page present
[ 183.596970] sd 5:0:0:0: [sdc] Assuming drive cache: write through
[ 183.921160] FAT-fs (sdc): bogus number of reserved sectors

Note that your startup config and the EOS image are stored in the /mnt/flash mount point. You have a couple of options to copy the files over to the flash drive:

 

1. You can drop to bash and do it all from there.

2. Or you can do it all from the EOS CLI

 

For either one, you’ll want to verify which image/version you’re using. Use the ’show boot-config’ command in EOS to verify this:

7050S-64.H:38:44#show boot-config
Software image: flash:/EOS-4.14.6M.swi
Console speed: (not set)
Aboot password (encrypted): (not set)
Memory test iterations: (not set)

 

For #1 approach, just type ’bash’ at your EOS prompt once you’re in enabled mode.

7050S-64.H:38:48#bash

Arista Networks EOS shell

[admin@7050S-64 ~]$

[admin@7050S-64 flash]$ cd /mnt/flash
[admin@7050S-64 flash]$ cp EOS-4.14.6M.swi /mnt/usb1
[admin@7050S-64 flash]$ cp startup-config /mnt/usb1

 

 

Or for #2 approach in EOS CLI, do the following after you’ve inserted your USB storage.

7050S-64.H:43:21#copy flash:EOS-4.14.6M.swi usb1:
Copy completed successfully.

7050S-64.H:43:21#copy flash:startup-config usb1:
Copy completed successfully.

 

 

For copying this over to another switch, the procedure is just reversed (source/destination) with your copy commands.

 

With regards to using the ’fullrecover’ procedure for password recovery, you will want to use this if you wanted to automatically reformat your switch’s flash partition on booting with whatever the contents is on your usb thumb drive.  You have to have several things in place in order for this to occur as outlined in the documentation excerpt you’ve included, such as a filename ’fullrecover’, a boot-config file, EOS.swi file and startup-config in the root directory of your USB thumb drive.

But I’d only use this if that is your intention (to re-format the flash partition and copy the entire contents of the USB thumb drive to your switch). I’ve used this procedure to flash several switches on a bench to have the same version of EOS and startup-config as a template. Or test gear that needed quick updating to a baseline version and configuration. Its very useful for this.

But for most production switches, I’d think you’d just want to copy the EOS image over using either of the steps outlined above.

-Jeremy

 

0
Posted by Abhimanyu
Answered on June 11, 2015 4:38 pm

Thank you so much for the detailed answer Jeremy. Much appreciated.

 

 

Post your Answer

You must be logged in to post an answer.