Debian救命命令fsck -y /dev/sda1 和error: { UNC }报错,/bin/sh: can t access tty: job control turned off

一直用一个旧笔记本作为Debian测试服务器,最近出了点状况,在3个月内两次无法进入系统,停在(initramfs)_,这让非专业人士有点束手无策,但靠着一句:

fsck -y /dev/sda1

让人马上走出困境。感觉真好!

出错信息一:

[   65.924910] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[   65.924922] ata1.00: BMDMA stat 0x65
[   65.924930] ata1.00: failed command: READ DMA
[   65.924946] ata1.00: cmd c8/00:00:08:0d:80/00:00:00:00:00/e0 tag 0 dma 131072 in
[   65.924946]          res 51/40:38:d0:0d:80/00:00:00:00:00/00 Emask 0x9 (media error)
[   65.924954] ata1.00: status: { DRDY ERR }
[   65.924959] ata1.00: error: { UNC }
[   65.932788] ata1.00: configured for UDMA/133
[   65.932899] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[   65.932917] sd 0:0:0:0: [sda] tag#0 Sense Key : Medium Error [current]
[   65.932922] sd 0:0:0:0: [sda] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed
[   65.932929] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 80 0d 08 00 01 00 00
[   65.932933] blk_update_request: I/O error, dev sda, sector 8392144
[   65.932967] ata1: EH complete

修复方法:
fsck -y /dev/sda1
exit 重启系统
然后就恢复正常了。

出错信息二:

/dev/mapper/  -> /dev/sda1

loading, please wait...

/dev/mapper/debian--vg-root contains a file system with errors,check the file system.
/dev/mapper/debian-vg-root:
Inodes that were part of a corrupted orphan linked list found.

/dev/mapper/debian--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
...

fsck exited with status code 4
The root filesystem on /dev/dm-0 requires a manual fsck
modprobe: module ehci-orion  not found in modules.dep
BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell(ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty: job control turned off
(initramfs)_

修复方法:
fsck -y /dev/sda1
exit 重启系统
然后也恢复正常了。

你可能感兴趣的:(Linux,debian,linux,运维)