What can we do if Brocade 5300 switch is not booting and we have a message "Bad Magic Number" ?
Thanks for your help
Most likely the flashcard containing FOS failed
If you have support with your vendor, call them to get a ticket open.
If you don't have support, you can try to boot from the second partition.
With the migration of this community to a new platform some content was delayed, therefor you'll not find a user created procedure here.
You can use some of the steps from http://www.docstoc.com/docs/112229063/Password-recovery to give it a go at your own risk!
This doc is tailored to reset password on switches, but also gives insight into how the switch selects the partition to boot from.
If you understand the doc you can give it a go, again on your own risk.
If you don't understand the doc or what is required from you, then call support and have them fix the switch at a break-fix rate.
Can we reinstall the FOS from USB ?
Not that I'm aware of.
Do you have support?
If yes call them of no call them and pay them.
It's not only to get the box up again, but you need to transfer licenses, the switch has to be configured again (unless you made regular backups using configupload) etc.
As far as I know the only option would be to find a similar switch, and dd the content of it's cf to the old cf (that you have destroyed). Boot again and your switch will be ok.
I've test this solution myself and it works. You should dd the whole device:
dd if=/dev/goodcf of=/badcf
Just be very cautious don't ruin the good cf!
If you don't have enough CF readers you can use an ISO file as a interpreter:
dd if=/dev/goodcf of=gcf.iso
dd if=gcf.iso of=/dev/badcf
Have fun! :D