我在使用 Ubuntu 时遇到了一个问题,我发现很难排除故障,原因很明显:
# reboot
-bash: /sbin/reboot: Input/output error
# dmesg
-bash: /bin/dmesg: Input/output error
# ps -e
ps: error while loading shared libraries: /lib/libproc-3.2.8.so: cannot read file data: Input/output error
# lsof
-bash: /usr/bin/lsof: Input/output error
# fsck
-bash: /sbin/fsck: Input/output error
# badblocks
-bash: /sbin/badblocks: Input/output error
Run Code Online (Sandbox Code Playgroud)
所以我看不到发生了什么,也无法远程重启。我能做些什么来追根究底?
有趣的是:
# init 0
Segmentation fault
Run Code Online (Sandbox Code Playgroud)
我可以 cat /var/syslog 但不能 cat /var/log/messages 或其他几个重要文件。越来越多的不起作用,尾巴或头部等都不起作用。
每次我的计算机在 Ubuntu 中连接到网络时,让脚本运行的好方法是什么?我会以某种方式使用 dbus 来做到这一点吗?
背景:当我在火车上时,我运行一个简短的 Perl 脚本来单击启动页面上的一个按钮。这样我就可以立即使用互联网,而无需手动访问毫无意义的网站。我的脚本是一个近乎完美的解决方案,但如果它可以在我连接到网络时自动运行,那就太完美了。
我的笔记本电脑硬件据说对 Linux 有很好的休眠支持,但我听过太多关于休眠的恐怖故事。事情发生了变化还是休眠仍然是一个非常糟糕的主意?