我正在运行 xubuntu Xenial,它最近无法正常启动。硬件是 Intel NUC,启动盘是具有 4 个分区的 M.2 SSD:
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 42993663 41943040 20G Linux filesystem
/dev/sdb3 495923200 500117503 4194304 2G Linux swap
/dev/sdb4 42993664 495923199 452929536 216G Linux filesystem
(有一个额外的 SATA 磁盘,即 sda)所有软件包都是最新的,内核:
Linux sam 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
看来 ubuntu 现在默认运行 systemd。如果我通过在高级选项 grub 菜单中选择“upstart”版本进行启动,系统将正确启动,所有分区均按预期安装。
但是,在启动默认(systemd)版本时,启动过程会挂起一段时间,然后才切换到紧急模式,并显示以下消息:
device-mapper: table: 252:1: multipath: error getting device
iwlwifi 0000:02:00.0: Unsupported splx structure
我认为第一行与 sdb 有关,第二行可能是转移注意力的花招。dmesg 提供了一些额外的信息:
[ 1.402062] sd 3:0:0:0: [sdb] 500118192 512-byte logical blocks: (256 GB/238 GiB)
[ 1.402110] sd 3:0:0:0: [sdb] Write Protect is off
[ 1.402113] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 1.402115] sd 3:0:0:0: Attached scsi generic sg1 type 0
[ 1.402130] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.403377] sdb: sdb1 sdb2 sdb3 sdb4
[ 1.403672] sd 3:0:0:0: [sdb] Attached SCSI disk
[ 2.206562] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
...
[ 2.344978] device-mapper: multipath: version 1.10.0 loaded
[ 2.345721] random: nonblocking pool is initialized
[ 2.378781] systemd[1]: Started Journal Service.
[ 2.402535] device-mapper: multipath round-robin: version 1.0.0 loaded
[ 2.403529] device-mapper: table: 252:1: multipath: error getting device
[ 2.403557] device-mapper: ioctl: error adding target to table
[ 2.513670] EXT4-fs (sdb2): re-mounted. Opts: errors=remount-ro
[ 2.536537] systemd-journald[952]: Received request to flush runtime journal from PID 1
此时,我看到 /dev 包含 sdb 和 sdb2,并且 /dev/sdb2 已挂载(以 rw 而不是 ro 方式),但是 /dev 中缺少 sdb1、sdb3 和 sdb4!
fdisk 和 gdisk 正确报告这些分区。
由于缺少设备,mount -a 预计会失败。
欢迎任何想法!
附加@heynnema 请求的附加信息:
fstab(由于我使用 PARTUUID 进行了测试,因此现在已对 UUID 进行了注释):
# /dev/sdb1
# LABEL=EFI /boot/efi vfat umask=0077 0 1
# UUID=1503-761C /boot/efi vfat umask=0077 0 1
PARTUUID=1c683c73-95ec-4de6-a98b-841650f2317c /boot/efi vfat umask=0077 0 1
# /dev/sdb2
# LABEL=xubuntu / ext4 errors=remount-ro,noatime 0 1
# UUID=c05b54a3-c2bf-4248-a020-1a6acddb99f6 / ext4 errors=remount-ro,noatime 0 1
PARTUUID=12fbd056-2e67-496e-b7d6-f5a097acaf12 / ext4 errors=remount-ro,noatime 0 1
# /dev/sdb3
# UUID=9ca249b6-b9da-4756-952e-4dbc13426527 none swap sw 0 0
PARTUUID=da8eb3c4-5d8b-45a9-b186-e114956ed69f none swap sw 0 0
# /dev/sdb4
# LABEL=Home /home ext4 defaults,noatime 0 2
# UUID=2d69cba0-ddb1-4746-a593-6d2811caf0a7 /home ext4 defaults,noatime 0 2
PARTUUID=548b1699-6832-4c0f-8fea-a053855e796d /home ext4 defaults,noatime 0 2
# HT-Data
# UUID=214a0d73-d36c-4ad6-8988-dbecdbc153f7 /media/HT-data ext4 defaults 0 1
PARTUUID=793ff092-6e09-4e22-b849-4d939c87ec46 /media/HT-data ext4 defaults 0 1
blkid(新贵):
/dev/sda1: LABEL="HT-Data" UUID="214a0d73-d36c-4ad6-8988-dbecdbc153f7" TYPE="ext3" PARTLABEL="home" PARTUUID="793ff092-6e09-4e22-b849-4d939c87ec46"
/dev/sdb1: LABEL="EFI" UUID="1503-761C" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="1c683c73-95ec-4de6-a98b-841650f2317c"
/dev/sdb2: LABEL="xubuntu" UUID="c05b54a3-c2bf-4248-a020-1a6acddb99f6" TYPE="ext4" PARTUUID="12fbd056-2e67-496e-b7d6-f5a097acaf12"
/dev/sdb3: UUID="9ca249b6-b9da-4756-952e-4dbc13426527" TYPE="swap" PARTUUID="da8eb3c4-5d8b-45a9-b186-e114956ed69f"
/dev/sdb4: LABEL="Home" UUID="2d69cba0-ddb1-4746-a593-6d2811caf0a7" TYPE="ext4" PARTUUID="548b1699-6832-4c0f-8fea-a053855e796d"
blkid(系统管理):
/dev/sdb2: LABEL="xubuntu" UUID="c05b54a3-c2bf-4248-a020-1a6acddb99f6" TYPE="ext4" PARTUUID="12fbd056-2e67-496e-b7d6-f5a097acaf12"
/dev/mapper/SAMSUNG_HM500JI_S1WFJD0SC83565-part1: LABEL="HT-Data" UUID="214a0d73-d36c-4ad6-8988-dbecdbc153f7" SEC_TYPE="ext2" TYPE="ext3" PARTLABEL="home" PARTUUID="793ff092-6e09-4e22-b849-4d939c87ec46"
/dev/sda: PTUUID="2cddf033-6053-4295-96a2-b3fd22295c95" PTTYPE="gpt"
/dev/mapper/SAMSUNG_HM500JI_S1WFJD0SC83565: PTUUID="2cddf033-6053-4295-96a2-b3fd22295c95" PTTYPE="gpt"
从 USB 启动,fsck 对每个分区返回 0。