GNU/Linux 启动缓慢

GNU/Linux 启动缓慢

最近,我的 gnu/linux 桌面计算机启动很慢。根据以下日志,您能猜出发生了什么吗?

这是运行的输出

$ dmesg -d | cut -d "<" -f2 | sort -nr | head

获取按增量时间(-d)选项排序的前 10 个日志事件。

50,148100>] EXT4-fs (sda5): orphan cleanup on readonly fs
48,447960>] ------------[ cut here ]------------
39,039483>] Adding 1951740k swap on /dev/sda6.  Priority:-1 extents:1 across:1951740k 
10,400851>] wlan0: no IPv6 routers present
5,015258>] init: failsafe main process (759) killed by TERM signal
2,536267>] EXT4-fs (sda5): INFO: recovery required on readonly filesystem
2,076843>] wlan0: authenticate with 64:70:02:a0:5d:28 (try 1)
1,678620>] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
0,907473>] psmouse serio1: synaptics: Touchpad model: 1, fw: 7.4, id: 0x1e0b1, caps: 0xd04773/0xe40000/0xa0400
0,708169>] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro

这是

$ df -ah

S.ficheros       Tamaño Usados  Disp Uso% Montado en
/dev/sda5          9,2G   6,6G  2,2G  76% /
proc                  0      0     0    - /proc
sysfs                 0      0     0    - /sys
none                  0      0     0    - /sys/fs/fuse/connections
none                  0      0     0    - /sys/kernel/debug
none                  0      0     0    - /sys/kernel/security
udev               923M   4,0K  923M   1% /dev
devpts                0      0     0    - /dev/pts
tmpfs              187M   860K  186M   1% /run
none               5,0M   8,0K  5,0M   1% /run/lock
none               934M    22M  912M   3% /run/shm
/dev/sda7          142G   8,8G  126G   7% /home
gvfs-fuse-daemon      0      0     0    - /home/dione/.gvfs

这是

$ cat /etc/network/interfaces

auto lo
iface lo inet loopback

最后,这是最慢的一个上下文。

$ dmesg -d | cut -d "<" -f2 | grep -C 18 "orphan cleanup"

0,109007>] Initializing USB Mass Storage driver...
0,000082>] usbcore: registered new interface driver usb-storage
0,000002>] USB Mass Storage support registered.
0,047818>] fbcon: inteldrmfb (fb0) is primary device
0,000091>] Console: switching to colour frame buffer device 170x48
0,000025>] fb0: inteldrmfb frame buffer device
0,000002>] drm: registered panic notifier
0,015547>] ACPI Warning: _BQC returned an invalid level (20110623/video-526)
0,000126>] acpi device:01: registered as cooling_device4
0,000192>] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4
0,000078>] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
0,000053>] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
0,006591>] usb 2-1.5: new high-speed USB device number 3 using ehci_hcd
0,044042>] scsi4 : usb-storage 1-1.5:1.0
0,000137>] usbcore: registered new interface driver ums-realtek
0,190415>] usb 1-1.5: USB disconnect, device number 4
2,536267>] EXT4-fs (sda5): INFO: recovery required on readonly filesystem
0,000004>] EXT4-fs (sda5): write access will be enabled during recovery
50,148100>] EXT4-fs (sda5): orphan cleanup on readonly fs
0,000009>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 295219
0,000075>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 295218
0,000013>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 295204
0,000012>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 269196
0,000013>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 191299
0,000008>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 131978
0,000008>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 131499
0,000006>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 131498
0,000007>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 131492
0,000006>] EXT4-fs (sda5): ext4_orphan_cleanup: deleting unreferenced inode 131458
0,000006>] EXT4-fs (sda5): 10 orphan inodes deleted
0,000002>] EXT4-fs (sda5): recovery complete
0,073855>] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
39,039483>] Adding 1951740k swap on /dev/sda6.  Priority:-1 extents:1 across:1951740k 
0,708169>] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro
0,685423>] ADDRCONF(NETDEV_UP): eth0: link is not ready
0,058400>] udevd[420]: starting version 175
0,007700>] lp: driver loaded but no devices found

该发行版是 Elementary Luna OS,基于 Debian 家族的 Ubuntu。

$ uname -a

Linux saturno 3.2.0-67-generic #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

答案1

虽然还不完全清楚为什么您的驱动器需要检查磁盘,但它似乎在启动时需要检查磁盘。这可能是由于不正确地关闭机器或由于磁盘损坏导致文件系统变得有点混乱而引起的。要检查是否是后者,您应该安装并使用 smartctl 实用程序,该实用程序位于 smartmontools udeb(或 smartmontool rpm)中。对于 ubuntu/debian,使用该工具的语法通常是“smartctl --all --device=sat /dev/sda”。在输出中,找到“具有阈值的供应商特定 SMART 属性”部分。如果任何值在运行之间频繁上升,或者有 1000 多个错误,您应该更换硬盘。

相关内容