Thinkpad T520 Crash

I’ve installed NixOS on a Thinkpad T520, but after awhile it just crashes.

How does it crash, you may ask;) Well, all commands return “command not found”, even dmesg is not found.

Whenever I try to access a directory, it’s Input/Output error.

I guess the next step is setting up a serial console, but I’m just venting here to see if there’s a quicker fix;)

Did you have any other OS installed on there before that was running stabily? How long ago was that? This sounds like a bad drive or cable. The OS continues to run because it’s loaded to RAM, but any command you execute in the shell gets read from disk.

You could try to run btop and iotop while doing normal work. These two together track pretty much all your resources and you can try to see if there’s anything suspicious happening like swap filling up quickly, I/O activity dropping or peaking, stuff like that.

Sounds like a faulty disk/filesystem.

1 Like

The OS is installed on an M.2 in an M.2 USB Adapter, so there might be that it goes to sleep, maybe, but I can’t verify anything, cause there are so few commands available when it happens.

It happened right now and I can’t even issue a dmesg command.

If I reboot, then everything is ok. I don’t even have to wiggle the cables, so it’s not a loose cable issue;)

EDIT: I can’t even use “systemctl reboot”; it only gives access denied. I have to hold down the physical power button.

Then keep dmesg -w open in a terminal until it happens, or cat /dev/kmsg if you’re lucky and cat still works.


$ cat /dev/kmsg
cat: command not found

Can I issue sysrq from the command line over ssh or somehow use bash built-in commands to trigger something in the virtual filesystems to reboot?

ok, this works;)

[b0ef@thaldor:/]$ sudo -s
[root@thaldor:/]# echo b > /proc/sysrq-trigger

ok, something interesting happened.

When I rebooted with that command, it got stuck in BIOS, saying no boot drive was available. I had to physically hold down the power button to turn it off and when I turned it on again, everything worked fine.

So, this strengthens the idea that it might be going to sleep?