Raspberry pi doesn't boot after config.txt was deleted - raspberry-pi

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.

Related

Raspberry Pi 3 returns input/output error and crashes system when trying to update on 64GB card

I'm trying to set up my Raspberry Pi with a 64GB micro-SD card using the image file 2018-04-18-raspbian-stretch-lite.
Every time I try to update or install software on the card, the system gives me the following error message:
dpkg: unrecoverable fatal error, aborting:
unable to sync directory '/var/lib/dpkg/updates/': Input/output error
E: Sub-process /usr/bin/dpkg returned an error code (2)
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - pkgDPkgPM::Go (30: Read-only file system)
The system then refuses to run any more programs and I cannot access the system again after I log out. (I normally access my Raspberry Pi via SSH.) I've checked the filesystem on the card, as per this article, and Disk Utility is telling me the card is FAT32, so that doesn't seem to be the issue; and besides the article says the card shouldn't even boot up the first time if I was using the wrong filesystem.
I have tried installing Raspbian on two different 64GB cards now and have got the same result on both. Additionally, I tried doing the same thing on a 16GB card and it worked normally.

tftp booting my raspberry pi, but initramfs file is not requested by the raspberrypi

I am using custom Linux Kernel built through Yocto. I generated sdimg and try to boot it using an SDCARD and it boots perfectly fine. Here along with the Kernel I also use INITRAMFS files. Using config.txt and cmdline.txt file in partition 1, I tell the kernel to load my INITRAMFS file. This procedure is working fine.
Now, I am trying to net boot my Raspberrypi. For this I have another PC which has DNSMASQ installed and it acts as DNS server. I have all the required files in my /tftpboot directory. When I turn on the client RPI, it gets all the files from the server except my INITRAMFS file. I have added the initramfs file name as shown below in the config.txt, but still it is not being requested by my PI. How to make the RPI request for the INITRAMFS file? It just boots up the kernel7.img and thats it !
//appended the following lines to config.txt
ramfsfile=myramfs.cpio.gz
initramfs myramfs.cpio.gz followkernel
Please note that I am not using u-boot.
I was able to resolve the issue. When we do TFTP booting, the first file requested by Raspberry pi(Rpi) is startx.elf, this will be run on the GPU core. Next file that is requested is config.txt. For some reason, if I append the above 2 lines it doesn't work. I read in one of the raspberry pi forums that if the config.txt file is above some size limit, it will be ignored. So I cleared the config.txt file and added just these lines, and voila! Now my initramfs file is requested by the PI and boots successfully :)

Raspberry Pi + ownCloud: never stops finishing setup wizard

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.

Raspberry pi won't load GUI after running a script

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

Is it possible to boot the Raspberry Pi in Secure Mode?

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 !