YunUBoot reflash FAIL after disk expansion

Hi there -

I've been struggling with a few issues this week that stem from a series of mistakes I made with my Yun.

I had originally expanded disk space to run node. That was all peachy, worked like a dream.

From my personal forensic work here's what transpired next:

At one point I removed the SD card (first mistake) to install a sys-upgrade from another card.

Since linux was running off the first card (which was removed), when I tried to access the web panel I was greeted with an error message, something like "The CGI process could not provide data". This makes sense since there was no luci to serve up the panel.

I then made a second mistake of re-flashing the UBoot, Kernel, and OpenWRT image.

Third mistake - I formatted the SD card that I originally had to prep it for disk expansion again.

Now, no matter what I do, my kernel is constantly throwing panics. I've tried re-flashing numerous times with an SD inserted, without an SD.

My question is this - could it be possible that the 'fdisk' process during disk expansion interfered with something on my board that is preventing it from re-flashing correctly?

Thank you for any insight or advice.

DT

Hello,
can you post the output of YunSerialTerminal when the Yun is booting? Paste all the output, from uboot to kernel errors.

davidptracy:
My question is this - could it be possible that the 'fdisk' process during disk expansion interfered with something on my board that is preventing it from re-flashing correctly?

No, everything you do on the old system is overwritten when you re-flash the image.

Thanks for the reply, Angelo.

I suspect I'm running into a hardware issue; something with bad memory.

I've attached a couple log files:

The first shows the re-flash process and the first kernel panic, this is from a few days ago.

The second is from just a few moments ago; arduino booted up in a stable state, served the luci web panel, I reconfigured it to connect to a WPA wireless network ... then kernel panic.

The third file, shows an even more recent freakout - one that threw 66 oops messages.

The fourth file, shows a couple segmentation faults before linux loaded.

Thanks again for your response, this has been driving me nuts.

DT_ArduinoYun_Log_11042014.txt (20.2 KB)

U-Boot 1.1.4-dirty (Oct 17 2014 - 22:29:59).txt (14.1 KB)

U-Boot 1.1.4-dirty (Oct 17 2014 - 22:29:59) - 02.txt (143 KB)

U-Boot 1.1.4-dirty (Oct 17 2014 - 22:29:59)-03.txt (59.9 KB)

Mmhh, maybe the files you downloaded are corrupted? Did you use always the same file to reflash the Yun?

Yes - I've used the same files to reflash - could it be that the guide (here) is incorrect?

I wonder if the guide needs some updating based on the newer openWRT image - my understanding is that the package included in the reflash zip is the newest 1.52.

davidptracy:
I had originally expanded disk space to run node.


I then made a second mistake of re-flashing the UBoot, Kernel, and OpenWRT image.

This doesn't explain why re-flashing the system doesn't work, especially since you also re-formatted the SD card so it's clear you're not trying to boot from that. But, from what I've read, upgrading the system kernel while you have an expanded SD card set up can be problematical: the kernel loads into memory from the internal flash, and booting starts using internal flash. Then, at the appropriate point, the process switches over to using the SD card. But the kernel (that came from internal flash) is still loaded in memory. If you try to upgrade either system (the one in internal flash or on the SD card) then things can get out of sync: one system thinks that a kernel function is at one address in RAM, while the system upgrade may have moved it to another address.

The OpenWRT page on an expanded root file system warns about not upgrading the kernel. If an upgrade is truly required, it almost sounds like you have to do it in internal flash, and then expand to the flash card all over again?

Thanks Shapeshifter -

This seems to be in line with what I've been experiencing.

Can you give me any guidance as to how I should go about fixing the issue? ie. restoring my Yun to its default factory state.

I just want to get back to square one at this point.

Thanks again for your response!

davidptracy:
Can you give me any guidance as to how I should go about fixing the issue? ie. restoring my Yun to its default factory state.

I really wish I could, but any help is going to have to come from someone with a lot more experience than I. :frowning:

The normal way to recover is to hold the reset button for 30 seconds, but that only works if the system is up and running the script that watches for button presses. :frowning: :frowning: :frowning:

Is something connected to the Yun? How are you powering the Yun?

ShapeShifter:
This doesn't explain why re-flashing the system doesn't work, especially since you also re-formatted the SD card so it's clear you're not trying to boot from that. But, from what I've read, upgrading the system kernel while you have an expanded SD card set up can be problematical: the kernel loads into memory from the internal flash, and booting starts using internal flash. Then, at the appropriate point, the process switches over to using the SD card. But the kernel (that came from internal flash) is still loaded in memory. If you try to upgrade either system (the one in internal flash or on the SD card) then things can get out of sync: one system thinks that a kernel function is at one address in RAM, while the system upgrade may have moved it to another address.

The OpenWRT page on an expanded root file system warns about not upgrading the kernel. If an upgrade is truly required, it almost sounds like you have to do it in internal flash, and then expand to the flash card all over again?

It can be but davidptracy said that sometimes the boot process ended with success, so if it is a software error it should cause the same error everytime.

Thanks Shapeshifter and Angelo -

The Yun is being powered through USB coming from my computer.

I've definitely tried everything I could - 30 sec reset to factory, booting into failsafe mode and running './reset-to-factory-anyway', and multiple re-flashes of the boot loader, kernel, and openWRT.

At this point I have three hypotheses:

A. There is a hardware problem.
B. There is a software problem that is generating conflicting memory addresses, causing kernel panics.
C. There is an error in the guide for re-flashing.

If I could get my hands on the original kernel image and openWRT image for the yun, I would try and re-flash using the older image. Another option is to try and figure out a way to wipe everything on the linux side and build it up from scratch.

Thanks again for your responses!