Hi, here is the description of the problem.
What I did:
I have written a server in C++ and compiled it. I wanted it to run on startup. The first tutorial I found used crontab. I was connected with SSH and I did this in the terminal:
>> crontab -e
added the following line to the bottom
Then, I had to test it. So I decided to reboot the raspberry, and ran the following command:
>> sudo reboot -h now
The SSH disconnected, and then I couldn't connect anymore.
I unplugged the MicroUSB from raspberry, connected the raspberry to a monitor and connected the mouse and keyboard, and plugged the MicroUSB back.
Here is what happens when I start the raspberry.
1. At first, I don't remember exactly, but I think the same things specifed in 2 and 3 happened, and I just kept pressing Ctrl + C and the terminal opened in the end. I was stuck in a read-only file system so I decided to fix the inodes using fsck. With
>> fsck /
. Then I rebooted and I still don't know if it changed something.
2. some messages print up, and they don't seem suspicious.
3. a bunch of errors shows up:
The last message, says that it is trying to start 2 jobs. And after 1 minute and 30 seconds, it proceeds.
Then I get other messages:
Just in the end, it logs in the raspberry and boots.
4. Finally, the GUI shows, but then I get a no session for PID error. The keyboard and mouse won't work. Note that the keyboard works before the GUI showing up. I can't connect to the Raspberry via SSH.
What I tried:
I tried to change the crontab file back to its previous state. I opened the contents of the SD card on another PC.
I opened the text file /var/spool/cron/crontabs/p
i and removed the line I had added (which was @reboot /path/to/server/
But the problem is still there. I just removed the server file, so that anything should run it, failing to find the file proceeds without running anything. I haven't still tried to see if this one changed anything.
This is all. What additional information should I provide? I will post updates in this thread.
Thank you in advance for the help.
I removed my server file (deleted it). And the errors are still there.
In the very end, it waits for 3 jobs to complete. One relates to random, and it completes, the other 2 do not.
Here are the other 2 jobs:
A start job is running for /dev/serial1
This is probably because the dev folder is empty.