我的 Fedora 21 系统直接启动进入紧急模式。有错误信息:unable to init device /dev/mcelog (rc -5)
它说尝试:systemctl default
启动到默认模式;这有效。然后机器就很好地重新启动了。下次重新启动时,情况又一样。
也许有必要知道我也有输入/输出错误。如果我在紧急模式下输入 ^D,启动会继续顺利进行,但yum update
由于输入/输出错误而无法启动。
我使用的是 Fedora 3.17.7-300.fc21.x86_64) 21.
错误消息还显示: type journalctl -xb
;这是输出:日志ctl xb
第一行:
-- Logs begin at Thu 2015-01-08 09:06:21 CET, end at Fri 2015-02-06 13:08:34 CET. --
Feb 06 13:03:26 localhost.localdomain systemd-journal[120]: Runtime journal is using 8.0M (max allowed 141.7M, trying to leave 212.6M free of 1.3G available → current limit 141.7M).
Feb 06 13:03:26 localhost.localdomain systemd-journal[120]: Runtime journal is using 8.0M (max allowed 141.7M, trying to leave 212.6M free of 1.3G available → current limit 141.7M).
Feb 06 13:03:26 localhost.localdomain kernel: Initializing cgroup subsys cpuset
Feb 06 13:03:26 localhost.localdomain kernel: Initializing cgroup subsys cpu
Feb 06 13:03:26 localhost.localdomain kernel: Initializing cgroup subsys cpuacct
Feb 06 13:03:26 localhost.localdomain kernel: Linux version 3.17.7-300.fc21.x86_64 ([email protected]) (gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC) ) #1 SMP Wed Dec 17 03:08:44 UTC 2014
Feb 06 13:03:26 localhost.localdomain kernel: Command line: BOOT_IMAGE=/vmlinuz-3.17.7-300.fc21.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8
Feb 06 13:03:26 localhost.localdomain kernel: Disabled fast string operations
Feb 06 13:03:26 localhost.localdomain kernel: e820: BIOS-provided physical RAM map:
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000000dc000-0x00000000000fffff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x0000000000100000-0x00000000b4eeffff] usable
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000b4ef0000-0x00000000b4efefff] ACPI data
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000b4eff000-0x00000000b4efffff] ACPI NVS
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000b4f00000-0x00000000b4ffffff] usable
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000fec00000-0x00000000fec0ffff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: BIOS-e820: [mem 0x00000000fffe0000-0x00000000ffffffff] reserved
Feb 06 13:03:26 localhost.localdomain kernel: NX (Execute Disable) protection: active
(我认为很重要)中线:
Feb 06 13:03:26 localhost.localdomain kernel: Initializing XFRM netlink socket
Feb 06 13:03:26 localhost.localdomain kernel: NET: Registered protocol family 10
Feb 06 13:03:26 localhost.localdomain kernel: mip6: Mobile IPv6
Feb 06 13:03:26 localhost.localdomain kernel: NET: Registered protocol family 17
Feb 06 13:03:26 localhost.localdomain kernel: mce: Unable to init device /dev/mcelog (rc: -5)
Feb 06 13:03:26 localhost.localdomain kernel: Loading compiled-in X.509 certificates
Feb 06 13:03:26 localhost.localdomain kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
Feb 06 13:03:26 localhost.localdomain kernel: Loaded X.509 cert 'Fedora kernel signing key: a3deaae72f85c63029d7879041c633438a40e688'
Feb 06 13:03:26 localhost.localdomain kernel: registered taskstats version 1
Feb 06 13:03:26 localhost.localdomain kernel: Magic number: 3:210:76
最后几行:
Feb 06 13:03:30 localhost.localdomain systemd[1]: Configuration file /usr/lib/systemd/system/auditd.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Feb 06 13:03:31 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root contains a file system with errors, check forced.
Feb 06 13:03:31 localhost.localdomain lvm[487]: /dev/sr0: open failed: No medium found
Feb 06 13:03:31 localhost.localdomain lvm[487]: 2 logical volume(s) in volume group "fedora" monitored
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: Duplicate or bad block in use!
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: Multiply-claimed block(s) in inode 1316688: 5439532
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: Multiply-claimed block(s) in inode 1328717: 5439532
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: (There are 2 inodes containing multiply-claimed blocks.)
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: File /var/log/wtmp (inode #1316688, mod time Fri Feb 6 13:03:20 2015)
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: has 1 multiply-claimed block(s), shared with 1 file(s):
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: /var/log/mariadb/mariadb.log (inode #1328717, mod time Fri Feb 6 13:01:52 2015)
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root:
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: /dev/mapper/fedora-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: (i.e., without -a or -p options)
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: fsck failed with error code 4.
Feb 06 13:03:32 localhost.localdomain systemd-fsck[489]: Running request emergency.target/start/replace
Feb 06 13:03:33 localhost.localdomain kernel: EXT4-fs (dm-0): warning: mounting fs with errors, running e2fsck is recommended
Feb 06 13:03:33 localhost.localdomain alsactl[505]: alsactl 1.0.28 daemon started
Feb 06 13:03:33 localhost.localdomain alsactl[505]: /usr/sbin/alsactl: load_state:1729No soundcards found...
Feb 06 13:03:33 localhost.localdomain kernel: EXT4-fs (dm-0): re-mounted. Opts: (null)
Feb 06 13:03:33 localhost.localdomain systemd-journal[485]: Permanent journal is using 96.0M (max allowed 4.0G, trying to leave 4.0G free of 35.1G available → current limit 4.0G).
Feb 06 13:03:33 localhost.localdomain systemd-journal[485]: Time spent on flushing to /var is 537.241ms for 1381 entries.
Feb 06 13:03:34 localhost.localdomain kernel: piix4_smbus 0000:00:07.3: SMBus Host Controller not enabled!
Feb 06 13:03:34 localhost.localdomain kernel: vmw_vmci 0000:00:07.7: Found VMCI PCI device at 0x11080, irq 16
Feb 06 13:03:34 localhost.localdomain kernel: vmw_vmci 0000:00:07.7: Using capabilities 0xc
Feb 06 13:03:34 localhost.localdomain kernel: vmw_vmci 0000:00:07.7: irq 56 for MSI/MSI-X
Feb 06 13:03:34 localhost.localdomain kernel: vmw_vmci 0000:00:07.7: irq 57 for MSI/MSI-X
Feb 06 13:03:34 localhost.localdomain kernel: Guest personality initialized and is active
Feb 06 13:03:34 localhost.localdomain kernel: VMCI host device registered (name=vmci, major=10, minor=59)
Feb 06 13:03:34 localhost.localdomain kernel: Initialized host personality
Feb 06 13:03:34 localhost.localdomain kernel: shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Feb 06 13:03:34 localhost.localdomain kernel: parport_pc 00:05: reported by Plug and Play ACPI
Feb 06 13:03:34 localhost.localdomain kernel: parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
Feb 06 13:03:34 localhost.localdomain kernel: alg: No test for crc32 (crc32-pclmul)
Feb 06 13:03:34 localhost.localdomain kernel: ppdev: user-space parallel port driver
Feb 06 13:03:34 localhost.localdomain mtp-probe[553]: checking bus 2, device 2: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-1"
Feb 06 13:03:34 localhost.localdomain mtp-probe[553]: bus: 2, device: 2 was not an MTP device
Feb 06 13:03:33 localhost.localdomain systemd-udevd[526]: starting version 217
Feb 06 13:03:34 localhost.localdomain kernel: Adding 3014652k swap on /dev/mapper/fedora-swap. Priority:-1 extents:1 across:3014652k FS
Feb 06 13:03:34 localhost.localdomain lvm[573]: 3 logical volume(s) in volume group "fedora" now active
Feb 06 13:03:34 localhost.localdomain systemd-fsck[575]: /dev/sda1: clean, 419/128016 files, 129336/512000 blocks
Feb 06 13:03:34 localhost.localdomain kernel: EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Feb 06 13:03:34 localhost.localdomain kernel: SELinux: initialized (dev sda1, type ext4), uses xattr
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home contains a file system with errors, check forced.
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: Duplicate or bad block in use!
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: Multiply-claimed block(s) in inode 2359436: 9445606
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: Multiply-claimed block(s) in inode 2359723: 9445606
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: (There are 2 inodes containing multiply-claimed blocks.)
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: File /dder/.cache/mozilla/firefox/fl6tebaj.default/cache2/entries (inode #2359436, mod time Fri Feb 6 12:58:01 2015)
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: has 1 multiply-claimed block(s), shared with 1 file(s):
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: /dder/.mozilla/firefox/fl6tebaj.default/prefs.js (inode #2359723, mod time Sun Jan 11 21:22:16 2015)
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home:
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: /dev/mapper/fedora-home: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: (i.e., without -a or -p options)
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: fsck failed with error code 4.
Feb 06 13:03:34 localhost.localdomain systemd-fsck[589]: Running request emergency.target/start/replace
Feb 06 13:03:34 localhost.localdomain kernel: EXT4-fs (dm-2): warning: mounting fs with errors, running e2fsck is recommended
Feb 06 13:03:34 localhost.localdomain kernel: EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
Feb 06 13:03:34 localhost.localdomain kernel: SELinux: initialized (dev dm-2, type ext4), uses xattr
Feb 06 13:03:35 localhost.localdomain systemd-tmpfiles[608]: remove(/var/lib/rpm/__db.001): Input/output error
Feb 06 13:03:35 localhost.localdomain kernel: EXT4-fs error (device dm-0): ext4_lookup:1441: inode #1316485: comm systemd-tmpfile: deleted inode referenced: 1328892
Feb 06 13:03:35 localhost.localdomain auditd[612]: Started dispatcher: /sbin/audispd pid: 618
Feb 06 13:03:35 localhost.localdomain audispd[618]: priority_boost_parser called with: 4
Feb 06 13:03:35 localhost.localdomain audispd[618]: max_restarts_parser called with: 10
Feb 06 13:03:35 localhost.localdomain audispd[618]: audispd initialized with q_depth=150 and 1 active plugins
Feb 06 13:03:35 localhost.localdomain auditd[612]: Init complete, auditd 2.4.1 listening for events (startup state enable)
Feb 06 13:03:35 localhost.localdomain kernel: audit: type=1305 audit(1423224215.337:4): audit_pid=612 old=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:auditd_t:s0 res=1
Feb 06 13:03:35 localhost.localdomain auditctl[613]: No rules
Feb 06 13:04:08 localhost.localdomain kernel: EXT4-fs error (device dm-0): ext4_mb_generate_buddy:757: group 161, block bitmap and bg descriptor inconsistent: 12 vs 13 free clusters
Feb 06 13:08:30 localhost.localdomain kernel: EXT4-fs (dm-0): error count since last fsck: 230
Feb 06 13:08:30 localhost.localdomain kernel: EXT4-fs (dm-0): initial error at time 1421083217: ext4_lookup:1441: inode 1722417
Feb 06 13:08:30 localhost.localdomain kernel: EXT4-fs (dm-0): last error at time 1423224248: ext4_mb_generate_buddy:757
Feb 06 13:08:34 localhost.localdomain kernel: EXT4-fs (dm-2): error count since last fsck: 36
Feb 06 13:08:34 localhost.localdomain kernel: EXT4-fs (dm-2): initial error at time 1421083213: ext4_mb_generate_buddy:757
Feb 06 13:08:34 localhost.localdomain kernel: EXT4-fs (dm-2): last error at time 1423223563: ext4_mb_generate_buddy:757
我尝试从 Live-USB 启动并输入fdisk -l
.这是输出的一部分fdisk -l
:
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x337f0bd9
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux
/dev/sda2 1026048 234440703 233414656 111.3G 8e Linux LVM
Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora-swap: 2.9 GiB, 3087007744 bytes, 6029312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora-home: 58.4 GiB, 62662901760 bytes, 122388480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 14.7 GiB, 15728640000 bytes, 30720000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa1d41386
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 8064 30719999 30711936 14.7G c W95 FAT32 (LBA)
sda
是我的 Fedora 系统,sdb
是我的加密 Windows,全部都使用单独的引导加载程序运行。
的输出e2fsck
带来:
e2fsck /dev/sda
e2fsck 1.42.11 (09-Jul-2014)
/dev/sda is in use.
e2fsck: Cannot continue, aborting.
e2fsck /dev/sda1
e2fsck 1.42.11 (09-Jul-2014)
/dev/sda1 is mounted.
e2fsck: Cannot continue, aborting.
e2fsck /dev/sda2
e2fsck 1.42.11 (09-Jul-2014)
/dev/sda2 is in use.
e2fsck: Cannot continue, aborting.
从 Live-USB 启动时e2fsck /dev/sda1
会产生clean drive
, 并e2fsck /dev/sda2
带来/dev/sda2 is in use. e2fsck: Cannot continue, aborting.
答案1
Live-USB 显然会自动安装您的文件系统。要修复它们,您必须在使用 e2fsck 之前卸载它们。由于您有 LVM,您的文件系统将在目录 /dev/mapper 中列为链接文件,因此不要尝试在 /dev/sda2 上卸载或使用 e2fsck,而是在 /dev/mapper/whatever 上卸载或使用 e2fsck(比如 /dev/mapper/vg_hostname_lv_root, /dev/mapper/vg_hostname_lv_home) ...因为这是使用 LVM 时构建文件系统的地方。