I have a raspberry pi with raspbian and a 32gb SD card. I need it to run a bash script 24/7, but the script runs for 20-30 minutes and then it stops. And when I reboot the raspberry, it won't load the desktop and this https://i.stack.imgur.com/b165r.jpg shows up. It seems that this is because there isn't enough memory. I guessed it's because of the cache (the script has to open a window in chromium). How can I delete it? Is there a way to do it every time at the end of the script? What else could it be? Thanks.
This is what happens when I do apt-get purge anything to free up some space
https://i.stack.imgur.com/5F0FM.jpg
And this is what happens when I write df -h... It says that the system is full but how the heck is that possible???
https://i.stack.imgur.com/L8uvM.jpg
Related
Model: Raspberry Pi 3 model B+
OS: Raspbian Stretch
Target disk for data storage: Netgear readyNAS (NTFS, fstab mounted) with share for ownCloud and www-data as owner on mount
I've been following this guide for installing and setting up ownCloud on my Pi. I've been following every step and doing exactly what the guide says.
It all goes well until the very last step where I fill out the forms for setting up ownCloud via the browser, seemingly correct inputs and no errors, and when i click the finish button it just loads forever. The browser also indicates that the page is loading and this goes on forever.
Tables in the ownCloud database on the Pi gets created so something is happening, but it never seems to create the admin user as the oc_users table is empty no matter how long I wait. The Pi also seems to slow down drastically when doing this as it takes forever to perform simple and otherwise instant tasks like ls, rmdir, rm, etc...
The target disk for data storage as filled in in the ownCloud wizard data directory path is a NAS disk mounted with www-data (uid/guid 33) as owner and chmoded with 777. I know for a fact that the www-data user has the right privileges to the disk since I've overcome permission issues before as well as the correct mysql credentials. Ive tried ownCloud version 10.0.3/8 and 9.1.8 with the same result.
Has anybody encountered this issue before or have any clue what this is all about?
Turns out it was just insanely slow..
Had it running for about 2 hours and it finally finished and prompted me to the login page where I was able to login and finally use my ownCloud. Installed a php cache optimizer and it seemed to have improved a bit.
Hi I made some programs that are to be run in a raspberry pi.
The programs are mainly about controlling GPIO pins and analyzing USB camera Videos.
But do I have to manually run those programs all the time?
Is there any way to make the program run after starting os automatically?
Just like an arduino... it remembers what has been uploaded in its memory
Edit your crontab with crontab -e and add:
#reboot yourscript
Be careful about the environment variables PATH because cron could be lauched before some of your services (distibutions start up dependant).
I have a trouble build OpenWrt with SD card.
I download the source, git://github.openwrt.org/openwrt.git and run "make menuconfig", set target "brcm27xx", "brcm2710", "Raspberry Pi 3 Model B".
And finish the configuration, build success.
Using "sudo dd if=openwrt....img of=/dev/sdb bs=2M", I create SD card.
When I boot Raspberry Pi 3 with creating SD card, the Kernel message with error.
run "mount"
/dev/root/ type ext4 ro(read-only) file system.
What is the problem!! Because of this I can not do anything...
Please Help me...
I have been using dd for a while now and it is both very powerful and very unforgiving, in the sense that your console will suggest the writing of the image is concluded but in actuality it has not. My images constantly failed for much the same reason as yours so now use my alternative command line, see below....
sudo dd if=openwrt....img of=/dev/sdb bs=2M
Here is my suggestion
sudo dd if=openwrt....img of=/dev/sdb bs=4096 conv=sync,notrunc status=progress; sudo sync
the last command may be unnecessary as sync is defined within dd command line. remember all of the above is one a line command not two wrap is ok I hope this helps you
This question is almost a year old and people might come across this in the future.
To run OpenWRT/LEDE on Raspberry Pi, you need to flash an image on a microSD. You may download the images through this link(Just search for the particular RPi Model): https://openwrt.org/toh/views/toh_fwdownload
Then from personal experience, I use Etcher to flash the image on the microSD. You may download it through this link: https://etcher.io/
Hope this helps someone out there. :)
As i said in the title I deleted the config.txt file in the raspberry pi(raspbian). Why is that you might ask ? Well before that the raspberry pi was starting but could not boot. The following error message was on the screen : " error -110 transfering data sector 133646 ". The same message was printing on the screen with the last number incrementing of 1, every second.
So I thought the file system was corrupted and wanted to resolve that, problem is I deleted the config file wich seemed to be the problem, maybe that wasn't so smart.
Now the raspberry pi is not even booting which means that I don't even see error message on the screen and cannot access the raspberry.
My question is : how can I get the pi to boot again ? Can you give me a good config.txt file so that i can try it with that ?
Thanks a lot for your time and expertise.
I have the found the solution, I used chkdsk from Windows. It restored and repaired the file system so all is good.
I am currently developing a small OS on my Raspberry Pi, that I install by replacing the kernel.img file on the /boot partition of my SD card. By the time my code is run, the CPU is already in Normal Mode, so I can't have access to the Secure world / Trustzone area.
Is it possible to modify the boot process of the Raspberry to be able to start executing my code in Secure mode ?
Best,
V.
In fact you don't have to do anything but stop being stupid like me.
As explained here:
https://raspberrypi.stackexchange.com/questions/14953/is-it-possible-to-boot-the-raspberry-pi-in-secure-mode
When the NS bit of the SCR register is 0, it means that you are in Secure Mode, which is the case at boot on my Raspberry. I had the meaning of this bit backwards, sorry !