28

A Thinkpad X220 (Core-i5, SandyBridge, Intel GMA) running Precise 64bit has rebooted hard twice in the last four days. I was doing nothing more than writing an email. No warning. It just went black, and the next thing I saw was the Lenovo boot screen.

Where should I look to find the cause? I fear that this immediate reboot does not leave time for logs to be written...

Thanks!

14

Check /proc/sys/kernel/panic, if it's value is 1 then server will immediately reboot on panic. Bad drivers can cause kernel panic.

If it's not panic check last issue of reboot, maybe overheating is the issue.

last reboot
  • This command shows that my system came up with a new kernel. Ubuntu 12.04 64 bit. 3.2.0-63 after reboot, 3.2.0-61 before – Antonios Hadjigeorgalis May 26 '14 at 14:20
  • 4
    This led me to checking etc/apt/apt.conf.d/50unattended-upgrades I had set Unattended-Upgrade::Automatic-Reboot "true"; I changed it back to the default setting of false. – Antonios Hadjigeorgalis May 26 '14 at 15:31
  • @Antonios does this auto reboot is without warning? – Aquarius Power Dec 5 '14 at 20:38
  • 6
    last |head -n 50 wow, I just found this: 13:55 - crash (04:35) what gonna track how that happened, thx! – Aquarius Power Dec 5 '14 at 20:44
  • 1
    @AquariusPower Yes, it was. my issue went away after changing the unattended-upgrades setting. – Antonios Hadjigeorgalis Dec 5 '14 at 21:49
11

Commands

  1. dmesg - May not show items from before last boot, but very useful if the system is still up

Files

  1. /var/log/syslog - System wide logger, use tail /var/log/syslog or less /var/log/syslog
  2. /var/log/kern.log - Kernel log, same as above
  3. /var/log/*
  • Thanks so much for your answer. The problem is - as stated in my question - that the system is not up anymore. I believe that I had some kind of hardware issue. – Andre Nov 7 '12 at 3:49
  • 1
    I went on a quick google hunt to check if the above files persist across reboots (since I'm not infront of a linux computer atm) and I found this site, which I found extremely informative: softpanorama.info/Commercial_linuxes/troubleshooting.shtml – Huckle Nov 7 '12 at 17:23
  • Can you elaborate on how the output of dmesg is supposed to help? My machine has just randomly rebooted, and if I understand your suggestion right, then dmesg cannot help here, right? – tchakravarty Aug 27 '16 at 11:05
  • I would like to add this grep "Jan 11 01" /var/log/* -rah 2>/dev/null |sort so you can target the day and the hour (ubuntu 16.04 but some info are version independent) – Aquarius Power Jan 11 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.