Recovering a Cumulus Linux Switch from U-Boot and Missing sysroot2 Partition Errors via TFTP

Recovering a Cumulus Linux Switch from U-Boot and Missing sysroot2 Partition Errors via TFTP

If a Cumulus Linux switch drops into a debug shell during boot with a missing sysroot2 partition error, the U-Boot environment or ONIE flash sectors may be corrupted:

cli
Success: Found uboot-env mtd partition

Failure: Unable to find sysroot2 partition...

Spawning debug shell so you can have a look ...

I have attached the files that we will move to the switch via TFTP at the bottom of this post.

WARNING, DO NOT USE FILES UNLESS YOU HAVE A 6448 GIG SWITCH! Even if you have Cumulus Linux U-Boot errors because this is only for a 6448 GIG switch.

First we set the IP address:

cli
cumulus_switch-> setenv ipaddr 192.168.1.10 
cumulus_switch-> setenv netmask 255.255.255.0
cumulus_switch-> setenv gatewayip 192.168.1.10
cumulus_switch-> setenv serverip 192.168.1.2

 

Next we will do a printenv save this as you will compare this in later steps:

cli
cumulus_switch-> printenv

Next we set up the Environment to boot into ONIE (ONIE was previously unavailable due to Cumulus Linux U-Boot errors).

cli
cumulus_switch-> setenv q1start 0xffb00000
cumulus_switch-> setenv q1sz.b 0x00400000
cumulus_switch-> tftp onie-dni_6448-r0.bin

We will see something like this:

bash
Speed: 100, full duplex
Using eth0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.10
Filename 'onie-dni_6448-r0.bin'.
Load address: 0x8000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################################################
done

Next we will remove protection from the U-Boot Bootloader

cli
cumulus_switch-> protect off $q1start +${q1sz.b} && erase $q1start +${q1sz.b}

You will see something like this:

cli
................ done
Un-Protected 16 sectors

................ done
Erased 16 sectors

Now we will move the file that we copied via TFTP to the system:

cli
cumulus_switch-> cp.b $fileaddr $q1start
cumulus_switch-> md $q1start
cumulus_switch-> md 0xffe00000
cumulus_switch-> md 0xff800000

You will see various printouts from the file information after inspecting the memory addresses with md

Next we protect the startup file:

cli
cumulus_switch-> protect on $q1start +${q1sz.b}

And we will do the same thing for the new uboot+env:

cli
cumulus_switch-> setenv q2start 0xfff40000
cumulus_switch-> setenv q2sz.b 0x000c0000
cumulus_switch-> tftp onie-dni_6448-r0.bin.uboot+env

cumulus_switch-> protect off $q2start +${q2sz.b} && erase $q2start +${q2
cumulus_switch-> protect off $q2start +${q2sz.b} && erase $q2start +${q2
...... done
Un-Protected 6 sectors

...... done
Erased 6 sectors
cumulus_switch-> cp.b $fileaddr $q2start ${q2sz.b}
Copy to Flash... 9....8....7....6....5....4....3....2....1....done

cumulus_switch-> md $q2start
cumulus_switch-> md 0xfff80000
cumulus_switch-> protect on $q2start +${q2sz.b}

Now we will compare our printenv to what we had before moving over the new files and it should be the same.

cli
cumulus_switch-> printenv

Now we will reset into the U-Boot again:

cli
cumulus_switch-> reset

Writing to Flash... 9....8..9....8....7....6....5....4....3....2....1....done
. done
Protected 1 sectors

Press space bar now to get into the U-Boot prompt to run ONIE:

cli
Hit any key to stop autoboot: 0

cumulus_switch-> run onie_rescue

Hopefully this helps you resolve any Cumulus Linux U-Boot errors that may have been encountered. Please feel free to leave a comment if you have resolved other Cumulus Linux U-Boot errors and would like them included in this post or another post on this blog.

WARNING, DO NOT USE FILES UNLESS YOU HAVE A 6448 GIG SWITCH!
Files are Hosted at DreamObjects here:

onie-dni_6448-r0.bin.uboot+env
onie-dni_6448-r0.bin

>_ Engineering Discussion 2 Comments

+ Add Field Note ↓
  1. Interrupting U-Boot over serial at 115200 8N1 and running setenv ipaddr + tftpboot saved a bricked Quanta LB9 switch in our lab when the primary flash partition corrupted.

  2. Running onie-nos-install tftp://... from the ONIE rescue prompt is so much cleaner than vendor-specific USB recovery procedures once you have a local TFTP/HTTP provisioning server on the management VLAN.

Leave a Technical Comment

Share CLI tips, hardware notes, or questions below. Inline backticks (`command`) are supported.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Engineering Notes