0

I had to reboot my RPI when my web server was working. And the RPI can't reload on my Desktop after this reboot; a black page appears at each time.

So i have tried some button press and when I do Alt+F1 a sort of terminal appears! After I log myself as user : pi, I can made some commands. Then, I'm going in the raspi-config to change my setting to boot on my Desktop, who was always the fact before.

sudo raspi-config

So I reboot again but the same trouble is still here. Is there a LSB script problem or something like this? What can I do?

Can I restart only the boot config of raspbian?

goldilocks
  • 58,859
  • 17
  • 112
  • 227
Thibzy
  • 3
  • 4
  • I've edited a link to what I presume you meant by LSB -- although I am not sure how relevant it is, it seemed more applicable than "least significant byte". If you meant something else please correct. – goldilocks Sep 13 '16 at 14:35
  • I am not an expert but I want to talk about : https://wiki.debian.org/LSBInitScripts that kind of script. – Thibzy Sep 13 '16 at 14:44

1 Answers1

0

CtrlAltF[1-6] takes you to an array of virtual terminals (aka. VT or VC, virtual console). The X server runs on top of one of them, which is the dsyfunctional black screen in this case.

Since you can log in on a VT, you can check the current X server log in /var/log. This may or may not be useful. The logs are named with a format like this:

Xorg.N.log

Where N is the display number, which is likely 0 in this case. The logs are rolled over once so there will also be a Xorg.0.log.old. There's a lot of information there, just skim it to see if anything stands out to you as an error.

Next you can check the output of systemctl status lightdm. Lightdm is the display manager used by default on Raspbian if you are using a graphical login.

I had to reboot my RPI when my web server was working.

This sounds like by "reboot" you mean pull the plug and power up again without having shut the system down properly. If it was busy doing I/O to the SD card at the time, this may have resulted in filesystem corruption. I'm pretty sure this should be checked automatically at boot, although NOOBs may complicate that. To make sure, edit your /boot/recovery.cmdline (see here) and add:

fsck.mode=force

To the end. Note this file should remain all one line; this should be added after a space, not a newline. Then reboot.

You may want to remove that afterward since it will add some time every boot (about 10-20 seconds for an 8 GB root filesystem).

This may not fix the problem but it may fix something if there was corruption and it has gone unfixed -- you should notice boot messages about that if you switch to tty1 (with ctrl-alt-F1) as soon as possible during boot.

Note also if the filesystem fix was already done then there may have been corruption which is fixed in the sense the filesystem is now coherent, but data was lost causing your problem. If there is any content in /lost+found that's a clue that this may have happened (since those fragments won't be dated properly on the pi, it is impossible to say if they are recent, however, unless you keep the directory clean).

You can also look through the end of /var/log/syslog to see if any errors jump out there.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • Really good ! thx you men! I have just some precision to add, when i have says, I had to reboot .. It's because the server had completely explode my CPU charge to 100% and the only thing I can do it's to do the command reboot in my lxterminal. I will made all the cheked you have proposed see u soon – Thibzy Sep 13 '16 at 15:20
  • when I am in the /var/log, i do ls and i see two files in red : aptitude.1.gz and syslog.2.gz they are corrupt ? – Thibzy Sep 14 '16 at 08:11
  • And after the command : systemctl status lightdm the terminal send me Active: failed (Result: start-limit) since Tue 2016-09-13 17:26:57 CEST; 21min ago and on the next line Process 1241 ExecStart=/usr/sbin/lightdm (code=exited, staatus=1/FAILLURE) – Thibzy Sep 14 '16 at 08:22
  • Apparently I have problem about the start limit.. I see on my screen since the boot time, my system try to:Start User Manager For different UID like : 1000, 109 .And he stopped then consecutively. For say me at the end Failed to start Light Display Manager. – Thibzy Sep 14 '16 at 08:55
  • The files in red are probably just that way because of whatever file manager you are using; perhaps it indicates a compressed type (.gz). There is no way for it to know if a file is "corrupt". The more serious problem with filesystem corruption is that the information which organizes the filesystem is damaged, and this can have a range of consequences up to making it unusable. fsck is intended to try and correct that as much as possible, but sometimes this may mean having to throw data away. There should be an indication of this though when it happens. – goldilocks Sep 14 '16 at 09:25
  • WRT lightdm not working, that's the problem with the GUI. I'm not sure what you can do about it. You could try sudo apt-get install --reinstall lightdm. – goldilocks Sep 14 '16 at 09:25
  • Ok i will ! After the modification of /boot/cmdline.txt and a reboot I can see any content in /lost+found . So maybe I dont have corrupt files .. – Thibzy Sep 14 '16 at 09:41
  • Well that would mean you did or do have corrupt files, in the sense that their content is now not what it is supposed to be. Stuff left in lost+found are chunks that fsck had to dispose of, and it does not know what they were part of. They are there in case you want to try and salvage data. – goldilocks Sep 14 '16 at 09:48
  • The total size of stuff is a clue about of how much stuff got damaged. If there is a lot of it, and you cannot figure out what it is (random chunks of binary are nearly impossible to decypher), you may be better off just reinstalling the whole system since it could cause any kind of problem down the line. If there is not much you could just cross your fingers. – goldilocks Sep 14 '16 at 09:48
  • Yeah I think about it but i have many data on my RPI, Can I parse the sd card for keep them from the VC ? Or they are lost..? – Thibzy Sep 14 '16 at 09:53
  • Sure, you can try and copy whatever you want off the card. Your data isn't necessarily what was corrupted, so it may all be fine. If you don't have a PC with linux on it accessing the second filesystem can be awkward I think. Windows can't read it at all without installing extra software. – goldilocks Sep 14 '16 at 09:55
  • after a look with journalctl | grep lightdm an error appears: error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServUnknown: The name org.freedesktop.Account was not provided by any .service files that was certainly my problem you have maybe an idea ? – Thibzy Sep 14 '16 at 11:42
  • No. You could keep trying to solve these problems as they pop up but since you won't know what problems were caused by random data loss and which were not this is going to introduce some confusion and paranoia into your life. Problems that are caused by the loss are potentially going to be somewhere between difficult and impossible to solve. – goldilocks Sep 14 '16 at 11:47
  • Just one more thing, I want cp my data from the RPI in a USB key; I just don't know, how I can autorised here to connect because I don't see her in /media/pi like usual . – Thibzy Sep 14 '16 at 11:58
  • If there are no other drives attached most likely the USB drive is sda, so presuming it has a single partition on it, try sudo mount /dev/sda1 /media/pi. You will have to use sudo when copying this way. When you are done, unmount it before pulling it out: umount /dev/sda. You must not have /media/pi open or it will say the resource is busy. You must wait for umount to exit if it does not right away to ensure all the data has actually completed being copied. – goldilocks Sep 14 '16 at 12:02
  • Thanks for all that information, I will sleep less fool ^^ – Thibzy Sep 14 '16 at 12:22