DietPi- Zero w keeps rebooting

I installed dietpi today on a Zero w. (did it on a 3B+ and setup as Hotspot no problem). I wanted to setup the zero as a webcam.
I did this 4 times before I started to install or change the configuration and reboot at least 2 times to make sure all was good.
I changed the setup to US. connected to the Wi-Fi.
Updated to the latest version of dietpi. Update the firmware.
Changed drop bear to ssh.
installed REALVNC.
But when I Install RPI WEB CAM it keeps rebooting and I can't stop it.
As I said after the 3rd time I flashed a fresh image again and rebooted at least 2 times after each change or install until I got to the RPI Web CAM issue.
I get "You're in emergency mode. Enter root password for maintenance or CTRL D.
I tried dietpi for the password and root. CTRL D does nothing but reboot back to the same area.
I'm assuming there is am issue with RPI Web Cam.
And Yes I made sure the power supply is good. I replaced the power supply with one used on my Pi3B+. It's 5.2V, 3amps.
I even tested it with my voltmeter. The issue is this pi Zero W setup works fine with a full version of Raspian and the RPI WEB CAM version I had to manually configure. I switched back to that card and all is fine. I just like the small footprint and ease of setup with DietPi. And it only starts to reboot when I add in the Web Cam distro on DietPi. I even tried some other packages after my 4th attempt, on the card, flashed a new image. In fact I added a few distros to the DietPi setup and had no problem. But when I went back to flashing the card and the same steps for the Pi Web cam distro it keeps rebooting. I even tried different SD cards. I only use high quality SanDisk SD cards on all my Pi's .SanDisk Ultra 64GB Micro SDXC UHS-I. For the Pi camera I used the 64GB on the original setup with Raspian and RPI Web Cam ( I actually have 3 running for over 2 months) and had no issues at all. For other projects that don't require a lot of space I use smaller size cards but same quality.
Chuck LoweAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chuck LoweAuthor Commented:
The only issue I can think of is RPI Web Cam likes to use Apache 2 (At least when I installed it with a full version of Raspian on the Zero W that worked). DietPi installs Lighttpd by default.
I'll install Apache 2 and remove Lighttpd and reboot 2 times. If I'm not in a reboot loop I'll try installing RPI Web Cam.
I'll get back to the group after this.
Kyle SantosQuality AssuranceCommented:
Hi,

I am here to help you with your open question.  Do you still need help?  I have the ability to alert more experts if you still need help.

If you solved the problem on your own, would you please post the solution here in case others have the same problem?

If you need me to delete this question just say "Delete."

Thank you for using Experts Exchange.

Regards,

Kyle Santos
Customer Relations
Chuck LoweAuthor Commented:
Thanks for your concern. I posted this on a number of forums including DietPi.com. No one has come up with an answer. I plan to do the following.

The only issue I can think of is RPI Web Cam likes to use Apache 2 (At least when I installed it with a full version of Raspian on the Zero W that worked). DietPi installs Lighttpd by default.
I'll install Apache 2 and remove Lighttpd and reboot 2 times. If I'm not in a reboot loop I'll try installing RPI Web Cam.
I'll get back to the group after this.

In the meantime if anyone else has any ideas (aside from the power supply) I'm all ears.

Thanks
Ron MalmsteadInformation Services ManagerCommented:
A spontaneous reboot without some error dump screen usually comes down to 1 of 4 things in my experience.  A screen dump would indicate a software issue...whereas you get some type of halt screen.

1 ...not enough power (amps) for machine + peripherals
2 ... Corrupted malfunctioning memory or CPU
3 ... Overheating
4 ... A sensor meant to keep your machine from damage is malfunctioning or being "tripped" by something....a temp sensor or other type of sensor.


By your description....you didn't have issues until you used the webcam right?... It  could be as simple as the webcam needing more power (amps)

I had a Raspi2 and I had a similar issue when I attached an external usb splitter....the raspi 2 doesn't supply power to usb ports but the power supply I was using was faulty and causing my PI to spontaneously reboot whenever I connected anything to it usb.

Because these are embeddes systems they are inherently sensitive to any adverse voltage or amperage changes...and even electrostatic interferences...like a portable fan plugged into a power strip that is also powering the Pi.

Unless you find sime software error messages building up in system logs...its likely something hardware or power issue.
Chuck LoweAuthor Commented:
As I stated before I know it's not the power supply and it worked with a full version od Raspian.
"The issue is this pi Zero W setup works fine with a full version of Raspian and the RPI WEB CAM version I had to manually configure. I switched back to that card and all is fine. I just like the small footprint and ease of setup with DietPi. And it only starts to reboot when I add in the Web Cam distro on DietPi."

I also tried different Pi Zero W's since I get them for $5 at my local Microcenter.

It looks like the errors are related to the keyboard (which I did not have under the initial setup with full Raspian).
I use a wireless keyboard. I switched it to a wired usb keyboard and still have the same issue.

The one thing I did do is enable serial console (which I did not do on the full version of Raspian). I'm wondering since the PiZero W has only one USB hub it somehow gets confused with serial console and a keyboard attached?

I will try to start over with a new image and not enable serial console.
Chuck LoweAuthor Commented:
So, after a new flashed image on a new card I had no issues when doing the software and firmware updates.
I set my Locals info (US, English, keyboard) Which did not get save on the first boot. Went back to UK defaults. I had to set them again.
I did not enable serial console. I just replaced Dropbear with SSH support. Apache 2 for webserver. Reboot (2 times) after each change/install.
No other software installs. Rebotted a few times with no issues.
I picked RPI Webcam to install. It installed Apache 2 and then RPI Webcam. And I'm back with the same issues.
It looks like it has a problem with the keyboard. I made sure it was setup correctly and wired. It draws .01 amps.
Has anyone any idea what's going on here? It it just a bad Apache 2 or RPI Webcam package?
As I stated I have the setup on a Pi Zero W card with full blown Raspian, and the Apache 2 and RPI Webcam and have no issues at all.
Chuck LoweAuthor Commented:
Issue happens with a fresh image and REALVNC install.

Going back to Raspian lite and manual package install.
Kyle SantosQuality AssuranceCommented:
Thanks for letting us know!
Chuck LoweAuthor Commented:
No body helped me.
Kyle SantosQuality AssuranceCommented:
Oh, sorry I probably misunderstood you then.  You marked this question as solved.  Should I send more alerts to see if we can find an expert who can help or delete this question?
Chuck LoweAuthor Commented:
If you think you can find someone else who's usual answer is not "It's the power supply", Then yes.
I've posted this on RaspberryPi.ORG, Spiceworks.com, DietPi.com. The first answer was always the power supply and I stated I guarantee there is no issue there.

The issue seems to be with the DietPi packages. Yet no one has told me how to check what is causing the issue.

I have resolved myself to go back to the RaspberryPi.org Raspian Lite version and install the package manually.
But by all means if someone has a true understanding of the issue any help would be appreciated.
Chuck LoweAuthor Commented:
Kyle
 Thanks for the update.
Chuck LoweAuthor Commented:
DietPi has opened up a ticket for this issue so it can be closed here.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.