Recover a Cisco 6000 series switch using a USB drive

This article provides the procedure to recover Cisco 6000 series switches using a USB drive. If a switch encounters issues, such as becoming unresponsive and remaining stuck at the login screen, recovery is essential to restore its functionality. This process involves reloading the switch with a Cisco Nexus Hyperfabric OS image that includes an updated agent.

Supported hardware and software versions

USB recovery is available only on select BIOS versions. To confirm compatibility, check the BIOS version displayed in the banner after the system reboots.

Supported hardware model and minimum BIOS versions

Hardware model

Minimum BIOS version

HF6100-32D

15.4

HF6100-60L4D

5.8

Prerequisites for preparing the USB recovery drive

Ensure you have these items for USB drive preparation.

  • Linux virtual machine (VM)
  • USB drive with at least 20GB of capacity and support for USB 3.0.
  • Download the specific Cisco 6000 series switch recovery image (.tar) from the Cisco Software Download site and extract these files:
    • efi_boot.img
    • efi_recovery.img
    • Cisco 6000 series switch model binary file:
      • SONiC.202405c.2.1.1-0.HF6100-32D.bin
      • SONiC.202405c.2.1.1-0.HF6100-60L4D.bin
    • readme.txt (contains the MD5 checksum for verifying file integrity)

Prepare the USB recovery drive

Follow these steps to create a bootable USB drive.


Step 1

Attach the USB drive to the Linux VM and confirm the device is connected.

Example:

root@UBUNTU:~$ lsblk 	  	 	 	 	 	 	 	 
loop0     7:0    0      4K  1 loop 	 	 	 
loop1     7:1    0   68.9M  1 loop	 
...            
sda      8:0    0     25G  0 disk      
├─sda1   8:1    0      1G  0 part
└─sda2   8:2    0   23.9G  0 part	 	 	 	 	 
sdb      8:16   1   28.9G  0 disk

In this example, the drive is sdb.

 Note

Exercise extra caution with the detected USB partition to prevent accidentally formatting non-USB data disks.

Step 2

Partition the USB drive and verify the partitions.

  1. Partition the USB drive.

    Example:

    root@UBUNTU:~$ sudo parted /dev/sdb mklabel msdos
    root@UBUNTU:~$ sudo parted /dev/sdb mkpart primary fat32 1MiB 301MiB
    root@UBUNTU:~$ sudo parted /dev/sdb mkpart primary fat32 301MiB 100%
    
  2. Verify the partitions.

    Example:

    root@UBUNTU:~$ lsblk 	 
     	 	 	 	 	 
    NAME    MAJ:MIN RM    SIZE RO TYPE MOUNTPOINTS 	 	 	 
    loop0     7:0    0      4K  1 loop
    loop1     7:1    0   68.9M  1 loop
    …
    sda      8:0    0     25G  0 disk
    ├─sda1   8:1    0      1G  0 part
    └─sda2   8:2    0   23.9G  0 part
    sdb      8:16   1   28.9G  0 disk
    ├─sdb1   8:1    0    300M  0 part
    └─sdb2   8:2    0   28.6G  0 part
    
    

    In this example, the sdb drive has partitions sdb1 and sdb2.

Step 3

Format partition entries with the FAT filesystem and assign labels.

Partition 1 must have the label "BOOT" and partition 2 must have the label "MAIN".

Example:

root@UBUNTU:~$ sudo mkfs.vfat -n "BOOT" /dev/sdb1
root@UBUNTU:~$ sudo mkfs.vfat -n "MAIN" /dev/sdb2 

Step 4

Download the EFI boot and recovery artifacts to the same folder on your Linux system. In this example, the Cisco HF6100-32D switch files are downloaded to ~/usb_recovery.

Example:

root@UBUNTU:~/usb_recovery$ ls -l

-rwxrwx--- 1 root vboxsf   268435456 Apr 30 18:29 efi_boot.img
-rwxrwx--- 1 root vboxsf 17179869184 Sep 16 20:34 efi_recovery.img
-rwxrwx--- 1 root vboxsf  1906331887 Sep 16 21:15 SONiC.202405c.2.1.1-0.HF6100-32D.bin
-rwxrwx--- 1 root vboxsf         279 Sep 24 14:29 readme.txt

Step 5

Copy the EFI boot and the EFI recovery images to the USB drive.

Example:

root@UBUNTU:~$ sudo dd if=usb_recovery/efi_boot.img of=/dev/sdb1 bs=4M
root@UBUNTU:~$ sudo dd if=usb_recovery/efi_recovery.img of=/dev/sdb2 bs=4M

Step 6

Create a temporary directory, mount the second partition, and copy the Cisco 6100 series switch image.

The image must be named sonic_recovery.bin or it will not be automatically detected.

  1. Create a temporary directory to mount the second partition.

    Example:

    root@UBUNTU:~$ mkdir recovery_temp
    root@UBUNTU:~$ ls recovery_temp
    
  2. Mount the second partition to the temporary directory

    Example:

    root@UBUNTU:~$ sudo mount /dev/sdb2 recovery_temp
    root@UBUNTU:~$ cd recovery_temp
    root@UBUNTU:~/recovery_temp$ ls -l
    
    drwxr-xr-x 4 root root  4096 May 14 04:43 grub
    drwx------ 2 root root 16384 May 14 04:43 lost+found
    drwxr-xr-x 7 root root  4096 May 14 04:50 onie
    drwxr-xr-x 2 root root  4096 Sep 16 18:57 sonic
    
  3. Copy the Cisco 6100 series switch image to the ~/recovery_temp/sonic path as sonic_recovery.bin.

    The image must be named sonic_recovery.bin or it will not be automatically detected.

    Example:

    root@UBUNTU:~/recovery_temp$ cd sonic
    root@UBUNTU:~/recovery_temp/sonic$ sudo cp ~/SONiC.202405c.2.1.1-0.HF6100-32D.bin ./sonic_recovery.bin
    root@UBUNTU:~/recovery_temp/sonic$ ls
    
    sonic_recovery.bin
    

    In this example, the Cisco 6100 series switch image is SONiC.202405c.2.1.1-0.HF6100-32D.bin.

Step 7

Exit the mounted temporary directory and sync write operations.

Example:

root@UBUNTU:~/recovery_temp/sonic$ cd ../..
root@UBUNTU:~/$ sync

Step 8

Unmount the sdb2 partition and eject the USB drive.

Example:


root@UBUNTU:~/$ sudo umount /dev/sdb2
root@UBUNTU:~/$ sudo eject /dev/sdb

The USB drive is now ready to be used to recover a Cisco 6000 series switch.

Recover the switch using the prepared USB drive

Follow these steps to recover a Cisco 6000 series switch using the USB drive.


Step 1

Insert the prepared USB drive into the switch.

See the specific Cisco 6000 series switch model documentation to locate the USB port.

Step 2

Power cycle the switch to initiate the recovery process.

  1. During the recovery, confirm that the BIOS version matches or exceeds the minimum required version for the switch model listed in Supported hardware and software versions.

    BIOS banner

    BIOS banner
  2. During the recovery process, the system locates and installs the Cisco 6100 series switch image.

    Installing recovery image

    Installing recovery image
  3. The start screen appears, confirming successful installation and recovery.

    Start screen

    Start screen
  4. After the switch has successfully booted from the USB drive, log into the switch with the default credentials:

    • Username: ttg-admin
    • Password: hfabric2025

Step 3

Remove the USB drive from the switch after recovery.

 Note

If you forget to remove the USB drive, the switch will continue to boot from the USB drive.