我正在运行 14.04,在输入密码后但在命令提示符出现之前登录 tty 会话时出现以下错误:
[198877.466429] systemd-udevd[25302]: timeout 'udisks-part-id /dev/sdb'
[198878.467543] systemd-udevd[25302]: timeout: killing 'udisk-part-id /dev/sdb' [20816]
[198878.581606] systemd-udevd[25302]: 'udisks-part-id /dev/sdb' [20816] terminated by signal 9 (Killed)
这台机器是一台笔记本电脑,只有一个硬盘。我搜索了一条命令来告诉我 sdb 是什么,有人提到了,ls -l /dev/disk/by-id
所以我运行了这条命令,下面是提到 sdb 的一行:
lrwxrwxrwx 1 root root 9 Jul 18 03:07 usb-Generic-_Multi-Card_20071114173400000-0:0 -> ../../sdb
这个错误是什么意思?我猜测是 USB 卡和/或其驱动程序出了问题?假设是这样,我如何获取有关卡的足够信息以查明是否有新的驱动程序或其他东西?
编辑:当我说“tty 会话”时,我的意思是我点击了Ctrl+ Alt+F1并以这种方式登录,(我这样做是为了终止一个使我的 GUI 会话变得难以使用的缓慢的程序。)
发生错误时插入的唯一 MMC 卡是笔记本电脑内置的。其中也没有插入任何卡。
其中没有提到 sbd /etc/fstab/
,只有一些关于 sda 上分区的内容。
我查看了一下,里面/etc/udev/rules.d/
只有.rules
70-persistent-cd.rules
70-persistent-net.rules
如前所述,MMC 卡是内置的,因此我没有将其移除。我sudo udevadm test --action=add /sys/class/block/sdb
还是运行了,得到了以下输出:
calling: test
version 204
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
=== trie on-disk ===
tool version: 204
file size: 5774243 bytes
header size 80 bytes
strings 1271747 bytes
nodes 4502416 bytes
load module index
read rules file: /lib/udev/rules.d/40-crda.rules
read rules file: /lib/udev/rules.d/40-gnupg.rules
read rules file: /lib/udev/rules.d/40-hyperv-hotadd.rules
read rules file: /lib/udev/rules.d/40-inputattach.rules
read rules file: /lib/udev/rules.d/40-joystick.rules
read rules file: /lib/udev/rules.d/40-libgphoto2-2.rules
read rules file: /lib/udev/rules.d/40-libgphoto2-6.rules
GOTO 'libgphoto2_usb_end' has no matching label in: '/lib/udev/rules.d/40-libgphoto2-6.rules'
read rules file: /lib/udev/rules.d/40-libsane.rules
read rules file: /lib/udev/rules.d/40-usb-media-players.rules
read rules file: /lib/udev/rules.d/40-usb_modeswitch.rules
read rules file: /lib/udev/rules.d/40-virtualbox-dkms.rules
read rules file: /lib/udev/rules.d/40-virtualbox.rules
read rules file: /lib/udev/rules.d/40-xdiagnose.rules
read rules file: /lib/udev/rules.d/42-usb-hid-pm.rules
read rules file: /lib/udev/rules.d/50-firmware.rules
read rules file: /lib/udev/rules.d/50-udev-default.rules
read rules file: /lib/udev/rules.d/55-dm.rules
read rules file: /lib/udev/rules.d/56-hpmud.rules
read rules file: /lib/udev/rules.d/60-cdrom_id.rules
read rules file: /lib/udev/rules.d/60-keyboard.rules
read rules file: /lib/udev/rules.d/60-pcmcia.rules
read rules file: /lib/udev/rules.d/60-persistent-alsa.rules
read rules file: /lib/udev/rules.d/60-persistent-input.rules
read rules file: /lib/udev/rules.d/60-persistent-serial.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
read rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
read rules file: /lib/udev/rules.d/60-persistent-storage.rules
read rules file: /lib/udev/rules.d/60-persistent-v4l.rules
read rules file: /lib/udev/rules.d/61-accelerometer.rules
read rules file: /lib/udev/rules.d/61-gnome-bluetooth-rfkill.rules
read rules file: /lib/udev/rules.d/62-google-cloudimg.rules
read rules file: /lib/udev/rules.d/64-btrfs.rules
read rules file: /lib/udev/rules.d/64-xorg-xkb.rules
read rules file: /lib/udev/rules.d/66-xorg-synaptics-quirks.rules
read rules file: /lib/udev/rules.d/69-cd-sensors.rules
IMPORT found builtin 'usb_id --export %p', replacing /lib/udev/rules.d/69-cd-sensors.rules:89
read rules file: /lib/udev/rules.d/69-libmtp.rules
read rules file: /lib/udev/rules.d/69-xorg-vmmouse.rules
read rules file: /lib/udev/rules.d/69-xserver-xorg-input-wacom.rules
read rules file: /etc/udev/rules.d/70-persistent-cd.rules
read rules file: /etc/udev/rules.d/70-persistent-net.rules
read rules file: /lib/udev/rules.d/70-power-switch.rules
read rules file: /lib/udev/rules.d/70-printers.rules
read rules file: /lib/udev/rules.d/70-uaccess.rules
read rules file: /lib/udev/rules.d/71-seat.rules
read rules file: /lib/udev/rules.d/73-idrac.rules
read rules file: /lib/udev/rules.d/73-seat-late.rules
read rules file: /lib/udev/rules.d/75-net-description.rules
read rules file: /lib/udev/rules.d/75-persistent-net-generator.rules
read rules file: /lib/udev/rules.d/75-probe_mtd.rules
read rules file: /lib/udev/rules.d/75-tty-description.rules
read rules file: /lib/udev/rules.d/77-mm-ericsson-mbm.rules
read rules file: /lib/udev/rules.d/77-mm-huawei-net-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-longcheer-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-nokia-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-pcmcia-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-platform-serial-whitelist.rules
read rules file: /lib/udev/rules.d/77-mm-qdl-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-simtech-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-usb-device-blacklist.rules
read rules file: /lib/udev/rules.d/77-mm-usb-serial-adapters-greylist.rules
read rules file: /lib/udev/rules.d/77-mm-x22x-port-types.rules
read rules file: /lib/udev/rules.d/77-mm-zte-port-types.rules
read rules file: /lib/udev/rules.d/77-nm-olpc-mesh.rules
read rules file: /lib/udev/rules.d/78-graphics-card.rules
read rules file: /lib/udev/rules.d/78-sound-card.rules
read rules file: /lib/udev/rules.d/80-drivers.rules
read rules file: /lib/udev/rules.d/80-mm-candidate.rules
read rules file: /lib/udev/rules.d/80-udisks.rules
read rules file: /lib/udev/rules.d/80-udisks2.rules
read rules file: /lib/udev/rules.d/85-brltty.rules
read rules file: /lib/udev/rules.d/85-hdparm.rules
read rules file: /lib/udev/rules.d/85-hplj10xx.rules
read rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
read rules file: /lib/udev/rules.d/85-regulatory.rules
read rules file: /lib/udev/rules.d/85-usbmuxd.rules
read rules file: /lib/udev/rules.d/90-alsa-restore.rules
read rules file: /lib/udev/rules.d/90-alsa-ucm.rules
read rules file: /lib/udev/rules.d/90-hid-rebind.rules
read rules file: /lib/udev/rules.d/90-libgpod.rules
read rules file: /lib/udev/rules.d/90-pulseaudio.rules
read rules file: /lib/udev/rules.d/95-cd-devices.rules
read rules file: /lib/udev/rules.d/95-udev-late.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-dell.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-gateway.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-ibm.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
read rules file: /lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
read rules file: /lib/udev/rules.d/95-upower-csr.rules
read rules file: /lib/udev/rules.d/95-upower-hid.rules
read rules file: /lib/udev/rules.d/95-upower-wup.rules
read rules file: /lib/udev/rules.d/97-bluetooth-hid2hci.rules
read rules file: /lib/udev/rules.d/98-osscuse.rules
read rules file: /lib/udev/rules.d/99-steam-controller-perms.rules
rules contain 393216 bytes tokens (32768 * 12 bytes), 40045 bytes strings
33093 strings (275017 bytes), 29157 de-duplicated (238909 bytes), 3937 trie nodes used
IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:3
/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3:1.0: if_class 8 protocol 6
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:50
LINK 'disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0' /lib/udev/rules.d/60-persistent-storage.rules:43
IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:57
LINK 'disk/by-path/pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0' /lib/udev/rules.d/60-persistent-storage.rules:58
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:72
error: /dev/sdb: No medium found
IMPORT 'udisks-part-id /dev/sdb' /lib/udev/rules.d/80-udisks.rules:84
starting 'udisks-part-id /dev/sdb'
'udisks-part-id /dev/sdb' [13520] exit with return code 0
RUN '/lib/udev/hdparm' /lib/udev/rules.d/85-hdparm.rules:2
handling device node '/dev/sdb', devnum=b8:16, mode=0660, uid=0, gid=6
preserve permissions /dev/sdb, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:16' to '../sdb'
found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fusb-Generic-_Multi-Card_20071114173400000-0:0'
creating link '/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0' to '/dev/sdb'
preserve already existing symlink '/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0' to '../../sdb'
found 'b8:16' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0'
creating link '/dev/disk/by-path/pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0' to '/dev/sdb'
preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0' to '../../sdb'
ACTION=add
DEVLINKS=/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0 /dev/disk/by-path/pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0
DEVNAME=/dev/sdb
DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-3/1-3:1.0/host0/target0:0:0/0:0:0:0/block/sdb
DEVTYPE=disk
ID_BUS=usb
ID_INSTANCE=0:0
ID_MODEL=Multi-Card
ID_MODEL_ENC=Multi-Card\x20\x20\x20\x20\x20\x20
ID_MODEL_ID=0158
ID_PATH=pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0
ID_PATH_TAG=pci-0000_00_1a_7-usb-0_3_1_0-scsi-0_0_0_0
ID_REVISION=1.00
ID_SERIAL=Generic-_Multi-Card_20071114173400000-0:0
ID_SERIAL_SHORT=20071114173400000
ID_TYPE=disk
ID_USB_DRIVER=ums-realtek
ID_USB_INTERFACES=:080650:
ID_USB_INTERFACE_NUM=00
ID_VENDOR=Generic-
ID_VENDOR_ENC=Generic-
ID_VENDOR_ID=0bda
MAJOR=8
MINOR=16
SUBSYSTEM=block
UDISKS_PRESENTATION_NOPOLICY=0
USEC_INITIALIZED=88805
run: '/lib/udev/hdparm'
unload module index
编辑2:
仔细查看后/var/log/syslog
我发现大约每分钟就会出现如下几行:
Jul 20 03:33:28 ryan-PC kernel: [ 398.876900] sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
Jul 20 03:33:28 ryan-PC kernel: [ 398.879147] sd 6:0:0:0: [sdb] Asking for cache data failed
Jul 20 03:33:28 ryan-PC kernel: [ 398.879152] sd 6:0:0:0: [sdb] Assuming drive cache: write through
我尝试注释掉第 36 行/lib/udev/rules.d/60-persistent-storage.rules
并重新启动,但这些行仍然显示,并且的输出sudo udevadm test --action=add /sys/class/block/sdb
看起来相同,包括以下行:error: /dev/sdb: No medium found
但是,从那时起,原始的超时错误就没有出现过(在我注释掉第 36 行之前或之后)。
答案1
您显示的错误消息是由于您在导入设备属性时遇到了 udev 执行时间问题/dev/sdb
。我怀疑您可以在 中看到类似甚至更明确的错误/var/log/syslog
。
查找你的 udev 规则:/lib/udev/rules.d/60-persistent-storage.rules
/../../sdb
正如yr 输出所反映的, 在第 43 行正确创建了一个符号链接:ls -l /dev/disk/by-id | grep sdb
path_id
已正确导入(作为设备属性 - 请参阅man udev
)第 57 行- 在第 58 行正确创建了设备路径的符号链接:
disk/by-path/pci-0000:00:1a.7-usb-0:3:1.0-scsi-0:0:0:0
- 当使用 导入该块设备的属性时,导致错误的条目位于第 72 行
blkid
。
对于 Ubuntu 14.04.4 桌面安装,这是:
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{builtin}="blkid"
由此报告尝试注释掉 的第 36 行/lib/udev/rules.d/60-persistent-storage.rules
,这样就不再依赖 来ata_id --export $devnode
导入设备属性,udev
而是会回到usb_id
。
如果此操作成功抑制了错误,请记住,该更改/lib/udev/rules.d/60-persistent-storage.rules
不是永久性的,可能会在升级时丢失。显然,这是多个发行版中记录良好的问题。不确定它是否算作错误。它可能与硬件或固件有关。您可能需要研究该部分。