Dietpi failed to boot... again. How to fix failing boot?

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Acriax

Dietpi failed to boot... again. How to fix failing boot?

Post by Acriax »

So, last week or so I had just spent another day reinstalling dietpi on my raspberry pi 2 because it had for no apparent reason stopped responding to ssh although samba was working, and when I plugged it into a monitor and keyboard and hard-rebooted it, it gave me a "end kernel panic - not syncing" message on boot. So yeah, I tried to google the messages I got and everything, but in the end I had to reformat the sd-card. Took a while, but eventually I got everything working and configured and running smoothly.

Now the other day, I suddenly couldn't access it over samba. I could access the pi using ssh, so I ran a reboot command, and that was that. Now it wouldn't boot back up again. Plugged in monitor and keyboard. No signal on monitor. Hard-reset the pi, now I get "end kernel panic - not syncing - Attempted to kill init ! exit code 0x00007f00". Googled the error and got some scattered linux/ubuntu hits but no definitive answer on what it meant or how to fix it.

I love dietpi and my rpi2 when it's working, but all this hassle of having to reinstall it over and over whenever it suddenly decides to stop working is not worth it. How can I find out what is wrong and fix it, preferably permanently? How can I scroll up the kernel panic message or see the log files and how can I repair a failing boot? Does booting from a usb repair distro of some sort work with the pi or is there some key combination I can hold down to get into some kind of recovery mode?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi failed to boot... again. How to fix failing boot?

Post by Fourdee »

Hi,
stopped responding to ssh although samba was working
Dropbear or OpenSSH?

What are your:
- PSU make, model?
- SDcard make, model?
- Overclocking values (if set)?

Would you also be able to attach the /boot/dietpi.txt (remove any passwords/keys) from the failed system? I just want to check for any modifications.
I love dietpi and my rpi2 when it's working, but all this hassle of having to reinstall it over and over whenever it suddenly decides to stop working is not worth it. How can I find out what is wrong and fix it, preferably permanently? How can I scroll up the kernel panic message or see the log files and how can I repair a failing boot? Does booting from a usb repair distro of some sort work with the pi or is there some key combination I can hold down to get into some kind of recovery mode?
This is unexpected behavior and should not occur, although, I've not personally experienced this issue.

The only thing I could suggest is use Full logging mode on your next installation: http://dietpi.com/phpbb/viewtopic.php?f ... art=20#p68.
Make sure Samba/SSH server have as much logging enabled as possible (DietPi uses default config locations, so a simple google search should provide the answers).
Then if/when the issue occurs, power off the system and plug SD card into another Linux machine, then check through the logs (/var/log) for any clues, or, upload them and i'll take a look.

I'am edging on the side of unstable PSU and/or corrupt filesystem over time, although, we'd need to get those logs files to see if anything else is causing the issue.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Acriax

Re: Dietpi failed to boot... again. How to fix failing boot?

Post by Acriax »

Hi Fourdee,

Appreciate the help (and all your work on dietpi)!

I think it was dropbear, the default, that I used.

PSU is a 5V 1A travel charger I got for the Rpi 1 in 2012.
SD is a 2GB from Transcend, but I've also tried a
I think I set overclocking values to default but with the conservative setting and lowered temp limit for throttling by 5*C

My dietpi.txt is unmodified from the original. I used the setup to make changes.

Alright, that sounds like a plan. Hopefully, the issue won't reoccur, but otherwise I'll update this thread!

Thanks!
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi failed to boot... again. How to fix failing boot?

Post by Fourdee »

Acriax wrote:PSU is a 5V 1A travel charger
I think this is where the problem is originating. The RPi 2 recommends a minimum 5V/2A, and stable PSU. If you have any USB devices connected, your very likely hitting the 1A limit of the PSU when its at full clocks.
Unstable or insufficient PSU = Corrupt filesystem, guaranteed.

I personally use the official RPi PSU for all USB powered boards, although, these are just as good: https://www.amazon.co.uk/NorthPada-Supp ... 953E4RR21B
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Acriax

Re: Dietpi failed to boot... again. How to fix failing boot?

Post by Acriax »

You may be right. When reinstalling dietpi now, it randomly refused to light up the green light, the keyboard lights and display anything on the screen. I plugged the PSU into the wall socket directly instead of the power strip and it worked, but after a few reboots it didn't work in the wall socket and only worked in the power strip. Weird!

The only thing I had plugged in into the USB though, when not troubleshooting it, was a 2tb WD external HDD, and it has its own power supply. And I think the real cause of my problems could be that that drive had died on me. I didn't realize it first, but now when I reinstalled, the dietpi installer didn't ask me if I wanted to format the drive like it usually does. It just skipped that step. So I guess it was already messed up at that point. I just noticed it after the installation was done and I ls:ed /mnt/usb_1 and it came up empty. Neither my windows or mac computers could access the drive at that point. :S

So yeah, I don't know if the drive died because of the pi suddenly rebooting because of its weak PSU or if it was a problem with the drive itself or what it was or even when it had happened. I'll have to put the pi on hold and see if it's possible recover the contents of the drive for now. Oh well.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Dietpi failed to boot... again. How to fix failing boot?

Post by Fourdee »

Acriax wrote:So yeah, I don't know if the drive died because of the pi suddenly rebooting because of its weak PSU or if it was a problem with the drive itself or what it was or even when it had happened. I'll have to put the pi on hold and see if it's possible recover the contents of the drive for now. Oh well.
I'am just wondering if the USB drive could be sending some "unexpected" current back through USB cable to RPi. Not sure how you could test for that, but it is a possibility and could explain why the RPi is unstable.

But it does mostly sound like a typical HDD failure. If the drive cant be detected with USB, you may need to remove the case and plug the drive directly into SATA on PC, then try a recovery program.

I cant stress enough how much a good/stable 5v/2A is worth the money. It can make the difference between pulling your hair out due to unexplained random issues, or having a stable and consistently reliable system.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply