0

I'm using gentoo. Sometimes (not always), when the system starts (from power up), its crash (before I'm getting the GUI login window).

I know Linux saves into log files the problem of the crash, but I'm so confuse and don't know from where to start ?

Do I Need to check the dmsg file ? (or other log file ?)
Do I need to grep with "errors" ? or there string pattern to search in the dmsg or other logging file ?)
3
  • 1
    Since the log files usually have time stamps on their entries, looking for the time of the crash would be the first I'd do.
    – celtschk
    Commented Aug 29, 2014 at 16:25
  • You could look for errors inside the kernel log file (/var/log/kern.log). If your OS stops booting you can use a live usb to access your main OS files. Or if your GUI is broken you can access other terminals with <Ctrl><Alt><F1>.
    – Thomio
    Commented Aug 29, 2014 at 16:45
  • If you are using OpenRC (as opposed to systemd), you can enable interactive boot by opening the file /etc/rc.conf and uncommenting the line that says: #rc_interactive="YES". Then, next time you boot up, hit I after it prompts you and you can manually control which services start. This might help you pinpoint where the crash occurs. As long as a logger daemon (metalog, syslog-ng, etc.) starts before the crash, there might also be some clues in your /var/log directory. If it happens as soon as the XDM service starts, you might want to start looking for video card compatibility issues.
    – hololeap
    Commented Sep 16, 2014 at 20:04

1 Answer 1

1

It depends at which stage crash takes place. It can be kernel problem, eg. wrong/conflicted parameters passed to it as an options in the grub config, or (most probable) problems with missed or wrongly configured system packages.

It also depends which init system do you use. If it is openrc then first step is to check /var/log/messages for errors, if you use rather systemd then journalctl command is your friend (here usually errors are marked red).

Of course dmesg | less command can be helpful as well.

If your boot process stops and you cannot see X (GUI) login screen then maybe it is just misconfigured Xorg/gnome/gdm/whatever. Then just hit ALT+CTRL+F1 to login at console. In case even that is not possible then you can try to boot linux as a single user, the so called rescue mode. Here are the steps to do that:

  1. At grub level select the kernel you want to boot, but instead of enter hit 'e' (edit)
  2. Select the line starting with word 'kernel' and again hit 'e'
  3. Add letter 'S' at the end of the line
  4. Press ENTER and 'b' (boot)

You will now boot at very minimal system just to login as a root and get a few commands available to figure out what is going on with your gentoo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .