Removed some files and bricked Arduino Yún [SOLVED]

All right, so I mistakenly removed some files from the root folder in the linino firmware on the Arduino Yún by executing rm -rf / but aborting it with ^C very quickly. I know it is a bummer, but yes I made that mistake. Now it looks like the Arduino Yún is bricked. I cannot connect over wifi and pressing the reset button by the USB ports does not have any effect.

When I connect it now, the ON LED is on, then the WAN goes ON, and the RX goes on, then the RX goes off, the WAN goes off, the RX goes on, and then the RX goes off. The ON LED stays on all the time, and nothing happens next.

I tried the following the procedure that noblepepper mentions here,199366.0.html which is the following

And does not work for me. The YunSerialTerminal sketch is uploaded successfully over USB (on the micro-USB port) through the Arduino IDE 1.5.5 (LED L13 and a blinking sequence for LEDs RX and TX happens; then, the ON LED remains on). After that, if I open the Serial Monitor, set the speed to 115200 bauds, I can interact with the Arduino Yun. For example, if I write ~1, it replies to me with "Speed set to 115200". If I write ~~, it replies back with "Sending bridge's shutdown command". But I cannot progress from there.

After that, if I try to press the reset button by the USB ports for more than 1 minute and nothing happens.

I was hoping I could restore to factory defaults / upload a firmware / bootloader.. really appreciate your help.

UPDATE after some research.

I was able to get to the linino environment over the serial connection thanks to the YunSerialTerminal. I followed the following procedure (not aware of the white reset button for AR9331 near the leds)

In order for this to work, I had to set the ending format to "Newline" instead of the default "No line ending". This time the "f" and Enter was understood, and I was able to get into the linino environment.

Then executed

cd /usr/bin

and the ON LED stayed on while the blue LED started blinking, and remained like that forever. I waited more than 15 minutes, and nothing happened besides the blue LED kept on blinking.

I guess I screwed up something in the system, but I am not sure what. I am aware there are 3 pieces

  • U-boot
  • kernel
  • linino

My guess is that I screwed the linino system, so an idea would be to reflash the linino system as the following page says through TFTP

However, I am concerned about voiding my Yún warranty (the page mentions this), and also about the likelihood of success. And I am wondering, if they offer the firmwares for the 3 pieces (uboot, kernel and linino) for download, why is the warranty going void if you use them?

Anyway.. after all this procedure, when I reboot, I yet get the following kernel panic message

- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[    9.850000] jffs2: notice: (528) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 14 of xref (0 dead, 2 orphan) found.
[   11.110000] sd 0:0:0:0: [sda] Attached SCSI removable disk
switching to jffs2
- init -
[   31.720000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200

Any thoughts?

UPDATE: Fixed.

Relieved that there is no need to reflash any of the three components :open_mouth:

I followed this procedure.

  1. Connect the Arduino Yún through the micro-USB connector to the USB port of my computer.
  2. Run Arduino IDE 1.5.5.
  3. Open the YunSerialTerminal sketch.
  4. Select the Arduino Yún in Tools - Boards and the appropriate serial COM port on Tools - Ports.
  5. Upload the sketch.
  6. Open the Serial Monitor. Configure it for "Newline" mode and 115200 bauds.
  7. Reset the AR9331 (white button close to the led array)
  8. Wait until you read "Press the [f] key and hit [enter] to enter failsafe mode": do that, press f and hit enter.
  9. Execute /sbin/firstboot
  10. Execute reboot

It looks like so far it is working! I just had to reconfigure the device as if it was new and fresh, but it seems to be working now.

NOTE: The suggested script /usr/bin/reset-to-factory-anyway on page did not seem to work for me, so I inspected the script, and it looks like it runs /sbin/firstboot. I then gave this last command / script a try.. and wow, up and running again!

@avente, I'm glad you solved.

As for your question, as we (= everyone playing/working with arduino) love tinkering with things, it's better to give you the tools and warn you about the danger than to leave you without them.