Cos*_*s64 5 init.d boot systemd 15.04
我今天刚升级到 Ubuntu Vivid (15.04),重启后我经历了很长的启动过程。我的笔记本电脑通常在 5 秒或更短的时间内启动,现在即使在几分钟后它也没有完成。
按Esc显示以下屏幕:

最后一行表示“正在为 /etc/rc.local 兼容性运行启动作业(7 分钟 24 秒/无限制)”。尽管有“无限制”部分,它在 10 分钟后放弃(或完成?),启动过程完成。
每次启动都会发生这种情况。
是否与向 systemd 的过渡有关?我怎样才能解决这个问题?(现在,我在关闭笔记本电脑之前要三思而后行)。我应该报告错误吗?如果是这样,在哪里?
我的/etc/rc.local文件:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
fstrim -v /
fstrim -v /home
exit 0
Run Code Online (Sandbox Code Playgroud)
该文件是可执行的:
$ ls -l /etc/rc.local
-rwxr-xr-x 1 root root 333 aug 14 2013 /etc/rc.local
Run Code Online (Sandbox Code Playgroud)
fstrim大约 2 年前,当我按照Easy Linux 提示项目的说明安装 SSD 时,我添加了 2行。
显然这些是我的问题的原因(我删除了它们并重新启动 - 问题消失了),但我仍然认为系统不应该像那样挂起 10 分钟。另外,我fstrim现在如何在启动时运行?
如果您将长时间运行的命令放入 中rc.local,您的启动将被延迟。您应该将这些发送到后台:
( fstrim -v /; fstrim -v /home ) &
Run Code Online (Sandbox Code Playgroud)
也就是说,您可能不必自己执行此操作。Ubuntu 14.10为fstrim.
| 归档时间: |
|
| 查看次数: |
21640 次 |
| 最近记录: |