Recover Corrupted Root Partition from Rescue Mode

当遇到根分区损坏的问题时,可以通过启动系统至救援模式进行修复。首先使用DVD或相同版本的启动盘引导,输入"linux rescue"进入救援模式。接着,检查并修复文件系统。如果是非LVM,使用`fsck`命令;如果是LVM,先扫描和激活卷,再运行`fsck`。完成修复后,退出救援模式,移除启动媒体,正常启动系统。
摘要由CSDN通过智能技术生成

Issue:

Recover the root partition, this is a critical issue.

Solution:

Checking all file systems.
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol00
/dev/VolGroup00/LogVol00 contains a file system with errors, check forced.
/dev/VolGroup00/LogVol00: Inodes that were part of a corrupted orphan linked list found.

/dev/VolGroup00/LogVol00: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance

The error indicates the root filesystem is corrupted. And to recover the corrupted root filesystem, please follow the steps below:

1) Boot the system from the DVD or boot disc1 of the same major release as the system. Once the system has successfully booted from the ISO image and Oracle Linux boot screen will appear.

Type: "linux rescue" without the quotes, and hit enter at the prompt.

boot: linux rescue


2) If not using LVM, execute fsck on the device which contains the filesystem:

  sh-3.1# e2fsck -f /dev/sda1
  e2fsck 1.41.12.14 (17-May-2014)
  [...]

 3) If using Software RAID, assemble the Software Raid before running fsck.
 

 4) If using LVM, activate the volumes before running fsck.

  sh-3.1# lvm pvscan
  PV /dev/sda1 VG VolGroup00 lvm2 [96.00 MB / 0 free]
  Total: 1 [3.34 GB] / in use: 1 [3.34 GB] / in no VG: 0 [0 ]

  sh-3.1# lvm vgscan
  Reading all physical volumes. This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2

  sh-3.1# lvm lvscan
  INACTIVE '/dev/VolGroup00/LogVol00' [3.34 GB] inherit

  sh-3.1# lvm lvdisplay

  --- Logical volume ---
  LV Name /dev/VolGroup00/LogVol00
  VG Name VolGroup00
  LV UUID 335qTi-Ossg-32O5-yQC7-xNON-egdI-frj4et
  LV Write Access read/write
  LV Status NOT available
  LV Size 3.34 GB
  Current LE 107
  Allocation inherit
  Read ahead sectors 0

  sh-3.1# lvm vgchange -ay
  1 logical volume(s) in volume group "VolGroup00" now active

  sh-3.1# sh-3.1# e2fsck -f -y /dev/VolGroup00/LogVol00
  e2fsck 1.41.12.14 (17-May-2014)
  [...]

 5) Exit the rescue mode, remove the DVD or boot disc media, then boot the system normally.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值