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:
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:
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:
cumulus_switch-> printenvNext we set up the Environment to boot into ONIE (ONIE was previously unavailable due to Cumulus Linux U-Boot errors).
cumulus_switch-> setenv q1start 0xffb00000
cumulus_switch-> setenv q1sz.b 0x00400000
cumulus_switch-> tftp onie-dni_6448-r0.binWe will see something like this:
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: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##################################################
doneNext we will remove protection from the U-Boot Bootloader
cumulus_switch-> protect off $q1start +${q1sz.b} && erase $q1start +${q1sz.b}You will see something like this:
................ done
Un-Protected 16 sectors
................ done
Erased 16 sectorsNow we will move the file that we copied via TFTP to the system:
cumulus_switch-> cp.b $fileaddr $q1start
cumulus_switch-> md $q1start
cumulus_switch-> md 0xffe00000
cumulus_switch-> md 0xff800000You will see various printouts from the file information after inspecting the memory addresses with md
Next we protect the startup file:
cumulus_switch-> protect on $q1start +${q1sz.b}And we will do the same thing for the new uboot+env:
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.
cumulus_switch-> printenvNow we will reset into the U-Boot again:
cumulus_switch-> reset
Writing to Flash... 9....8..9....8....7....6....5....4....3....2....1....done
. done
Protected 1 sectorsPress space bar now to get into the U-Boot prompt to run ONIE:
Hit any key to stop autoboot: 0
cumulus_switch-> run onie_rescueHopefully 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:
Interrupting U-Boot over serial at 115200 8N1 and running
setenv ipaddr+tftpbootsaved a bricked Quanta LB9 switch in our lab when the primary flash partition corrupted.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.