How To Repair Filesystem in Rescue Mode For Red Hat Enterprise Linux
How To Repair Filesystem in Rescue Mode For Red Hat Enterprise Linux
C U S TO M E R (https://access.redhat.com/)
P O R TA L
Environment
Red Hat Enterprise Linux 4
Red Hat Enterprise Linux 5
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
EXT and XFS file system
Rescue Mode
Issue
How to repair filesystem in rescue mode for Red Hat Enterprise Linux
System won't load after boot, requests fsck of root file system
/ (root) filesystem going into read-only mode.
How to run repair root file system (on both EXT or XFS )
Resolution
1. Boot the system from the binary DVD or boot disc1 of the same major release as the system.
Once the system has successfully booted from the ISO image and Red Hat Enterprise Linux
boot screen will appear.
For RHEL 5: Type: linux rescue without the quotes, and hit enter at the prompt. Then go
to Step 2.
https://access.redhat.com/solutions/9541 1/6
11/09/2018 How to repair filesystem in rescue mode for Red Hat Enterprise Linux
2. When prompted for language, and keyboard, provide the pertinent information for the
C U S TO M E R (https://access.redhat.com/)
system. P O R TA L
5. If not using LVM, execute the check on the device which contains the filesystem (For ext4
filesystem use e2fsck and for xfs filesystem use xfs_repair ):
Note: please make sure to have a backup of data present in filesystem, before going for
filesystem repair
If using LVM, activate the volumes in order to scan them. Perform this task with LVM scans:
https://access.redhat.com/solutions/9541 2/6
11/09/2018 How to repair filesystem in rescue mode for Red Hat Enterprise Linux
C U S TO M E R (https://access.redhat.com/)
sh-3.1# lvm pvscan
PV /dev/sda1 P OVGR TA
VolGroup00
L lvm2 [96.00 MB / 0 free]
Total: 1 [3.34 GB] / in use: 1 [3.34 GB] / in no VG: 0 [0 ]
https://access.redhat.com/solutions/9541 3/6
11/09/2018 How to repair filesystem in rescue mode for Red Hat Enterprise Linux
rhel (/tags/rhel) rhel_5 (/tags/rhel_5) rhel_6 (/tags/rhel_6) rhel_7 (/taxonomy/tags/rhel7) xfs (/tags/xfs)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of
solutions that Red Hat engineers have created while supporting our customers. To give you the
knowledge you need the instant it becomes available, these articles may be presented in a raw and
unedited form.
getting "chroot: cannot run command '/bin/sh': No such file or directory" in rescue
mode
How to backup data via network in rescue mode with ssh but without using the systems
root filesystem?
https://access.redhat.com/solutions/9541 4/6
11/09/2018 How to repair filesystem in rescue mode for Red Hat Enterprise Linux
7 Comments C U S TO M E R (https://access.redhat.com/)
P O R TA L
Regards,
Baßel
≤ Reply (/Ajax_comments/Reply/9541/456233)
https://access.redhat.com/solutions/9541 5/6
11/09/2018 How to repair filesystem in rescue mode for Red Hat Enterprise Linux
NEWBIE
/var is a necessary filesystem and filesystem checks have to be done when the
C U S TO M E R (https://access.redhat.com/)
10 Points filesystem ifPOoffline.
R TA L Ensure that you booted into rescue mode and did not mount
them. You have to do the check on the path to the device or logical volume. So if /var
is located on "/dev/mapper/rootvg-var", for example, you will use that path, not the
mount point which is /var.
≤ Reply (/Ajax_comments/Reply/9541/1251481)
Privacy Statement
(http://www.redhat.com/en/about/privacy-policy)
Customer Portal Terms of Use
(https://access.redhat.com/help/terms/)
All Policies and Guidelines
(http://www.redhat.com/en/about/all-policies-guidelines)
Copyright © 2018 Red Hat, Inc.
https://access.redhat.com/solutions/9541 6/6