7.3 KiB
Reverting To Stock Fastpath
Introduction
If for some reason after flashing over to Brocade you'd like to flash back to stock, that's now possible. You'll need the Brocade Firmware Zip (zip updated: 2-14-2018) - the same one linked on the main flash page.
The zip was recently amended with a new uboot file - you must have this version. In the Fastpath Revert folder there should be a file named ubootenv.bin - if you have uboot.bin instead, you have an old copy of the zip.
Now that you have the proper contents of the Fastpath Revert folder (ubootenv.bin and lb6m.1.2.0.18.img) we can begin - copy those two files onto your TFTP server.
Preparing U-Boot
As we are overwriting the boot sector again, the same warnings still apply. Copy and paste commands only (no typing). Have the device on a UPS if possible.
Connect to the serial console port on the switch and open a terminal window (9600 8N1). Also be sure to connect the #1 management port on the switch to a network that has layer 2 access to your tftp server, so it can succesfully retrieve them while in u-boot.
Reboot the switch while watching the serial output, it should prompt you to hit the b key to interrupt boot and drop you into the Brocade boot monitor. Do that, which should take you here:
Monitor>
Use the memory read command to verify your Brocade bootloader is where it should be - this ensures the commands to follow will use the correct location:
dd fff80000
the output should match this exactly:
Monitor>dd fff80000
fff80000: 4d554348 02057be5 0005a2d6 00004058
fff80010: 00000000 00012f2c 0004d880 00600028
fff80020: 00030030 0004ffff ffffffff 00000000
fff80030: 4e6ab6ae 07030000 74727a30 37333030
If the output on your switch does not match this exactly, STOP! Pastebin your switches output and get in touch with us on ServeTheHome.
Getting u-boot into RAM
Carrying on, assuming your output matched ours: It's time to load in the u-boot bootloader and prepare it for flashing. First you'll need to set a temporary IP for the switch - give it a unique IP (it will only be used for this bootloader session):
ip address 192.168.1.50/24
Now copy the u-boot bootloader to a file in onboard flash named quanta:
copy tftp flash 192.168.49 ubootenv.bin quanta
After some dots it should say Done. You now have u-boot stored in onboard flash. Now we need to copy it to RAM, then to the final boot sector.
Copy our quanta file to a location in RAM:
copy flash memory 08000000 quanta
Now we need to verify u-boot has been stored in RAM succesfully. Verify the beginning of u-boot:
dd 08000000
The output should match the below exactly:
Monitor>dd 08000000
08000000: 27051956 552d426f 6f742032 3030392e
08000010: 30362028 41707220 31392032 30313120
08000020: 2d203135 3a35373a 30362900 60000000
08000030: 3c20d000 60213f80 38000000 9401fffc
If your output matches, move on to the next section. If it doesn't match, you can safely abort and reboot.
Erasing and replacing the bootloader
You now have the u-boot bootloader stored in RAM, so we need to copy it from that RAM address to the bootloader address. From here on, be incredibly careful, and follow the commands exactly.
Copy u-boot from RAM to the boot sector:
copy memory boot 08000000 524288
Congratulations, you've installed the u-boot bootloader (which can now load the Quanta software image). DO NOT REBOOT YET! First verify u-boot is in the bootloader location:
dd fff80000
The output from your switch should match the below exactly:
Monitor>dd fff80000
fff80000: 27051956 552d426f 6f742032 3030392e
fff80010: 30362028 41707220 31392032 30313120
fff80020: 2d203135 3a35373a 30362900 60000000
fff80030: 3c20d000 60213f80 38000000 9401fffc
Verify the end instruction of the bootloader was copied correctly:
dd FFFFFFFC
The output should match the below exactly:
Monitor>dd FFFFFFFC
fffffffc: 4bfff004 xxxxxxxx xxxxxxxx xxxxxxxx
0000000c: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
0000001c: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
0000002c: xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
If it matches, skip on to Booting Quanta below - the risky part is over. However if it doesn't match, don't panic. You either entered a command wrong, or skipped one. Do not reboot yet! To recover the original brocade bootloader back, run the below command:
#for recovery only!
copy tftp flash 192.168.1.49 brocadeboot.bin boot
After that command finishes you can reboot into the bootloader again and try once more.
Booting Quanta
You now have u-boot in the proper section of the PowerPC flash. Now we just need to reboot! The "reset" command in Brocade's bootloader is bugged (will just freeze), so to make it reboot you must pull power to the switch, then re-apply. It should boot up to a u-boot prompt:
=>
Now we must set the MAC address for fastpath. Your chassis MAC should be on a sticker on the side of the unit generally, or you can generate a random MAC. Either way, replace the MAC in the command below with your target MAC, making sure to adhere to the same formatting:
setenv ethaddr 54:AB:3A:42:0B:42
saveenv
reset
After it reboots back into u-boot, we can now boot fastpath in order to flash it. We need to set our temporary IP address plus the IP of our tftp server, then pull the image and boot it:
setenv ipaddr 192.168.1.50
setenv serverip 192.168.1.49
tftpboot 0x08000000 lb6m.1.2.0.18.img
boot
It should boot into a FASTPATH Startup menu:
FASTPATH Startup -- Utility Menu
1 - Start FASTPATH Application
2 - Load Code Update Package
3 - Load Configuration
4 - Select Serial Speed
5 - Retrieve Error Log
6 - Erase Current Configuration
7 - Erase Permanent Storage
8 - Select Boot Method
9 - Activate Backup Image
10 - Start Diagnostic Application
11 - Run Manufacturing Diagnostics
12 - Delete Manufacturing Diagnostics
13 - Reboot
Select option 2, and follow its instructions. For transfer mode enter T for tftp, then fill out the IP's as it asks, as well as our image filename:
Select Mode of Transfer (Press T/X/Y/Z for TFTP/XMODEM/YMODEM/ZMODEM) []:t
Enter Server IP []:192.168.1.49
Enter Host IP []:192.168.1.50
Enter Host Subnet Mask [255.255.255.0]:
Enter Gateway IP []:
Enter Filename []:lb6m.1.2.0.18.img
Do you want to continue? Press(Y/N): y
It will flash the image then ask to reboot - hit yes. It should reboot as normal all the way into the Fastpath software it was originally shipped with, and you're done! If you forgot, the default fastpath login is admin with no password.
If you're worried about "wearing out" the onboard flash by flashing back and forth, the write cycle lifetime for the onboard flash IC is 100,000 complete erase-write cycles, so it's a non-issue.
Thanks:
Contributing:
The markdown source for these guides is hosted on our Github repo. If you have any suggested changes or additions feel free to submit a pull request.