Just a thought... If your sketch is sending data out the serial port right off the bat, it could be interrupting the Linux boot process (the Arduino processor is connected to a console port, and there are a couple places during the boot process where you can press a key to stop the boot. It might be worth a try holding the Arduino processor in reset until you finish booting, then releasing it while trying to upload a sketch using WiFi.
It's a Hail Mary pass, but this is what I would try before giving up:
- Power down the Yun
- Put a jumper wire between the RESET and GND pins on the shield connectors
- Power up the Yun, and give it a minute or two to reboot
- Get ready to upload a safe sketch (like blink?) using WiFi
- Just before starting the upload, remove the jumper between RESET and GND
- Hit the sketch upload button
- Hope it works...
Holding the Arduino processor in reset will eliminate serial port interference as a reason for the Linux side to not boot. If that works, then loading a sketch over WiFi will not only clear out the offending sketch, but will also reload the bootloader in the Arduino processor, letting you start from a clean slate.
I don't know if it's going to help, but I don't think it can hurt to try.