I managed to brick one of my Netgear M5300 switches while trying to factory reset it, by selecting "Erase permanent storage" from the boot menu. At this point, it displays 'Uboot M5300 VerNo=1.0.0.6' on the console and does not progress further.

To recover, get a FAT32 formatted USB drive, and save the firmware as 'boot.stk' on it.

Insert the drive into the switch, connect to the serial console and power up the switch.

Interrupt Uboot by pressing Q. You should get a '=>' prompt.

Issue the following command to boot from the USB file: 'fatload usb 0:1 ${loadaddr} /boot.stk'

After some time, you should get something like: '19082718 bytes read'

Now you need to boot that image: 'bootm 0x01000074'

It will complain a bit about missing image1 & image2, then drop you to the boot menu of the switch.

Select option 3, "Load new operational code using USB"

Enter "boot.stk" as the filename

Load the image to image 1, then repeat the command for image2.

Finally, boot the switch by selecting option 1, "Start Operational Code"