Solved

CentOS 5 forcefsck loop

Posted on 2012-03-12
6
697 Views
Last Modified: 2012-03-14
A client's POS server was crashing intermittently, and as part of the diagnostic I ran fsck. Of course the problems were on the root drive, so we had to use forcefsck to make the system check on boot.

The problem now is that forcefsck on boot finds errors that need to be addressed manually (not automatically), but it's loading the FS in read-only.

End result is that the machine is stuck in a loop. It boots and runs fsck, fails out to read-only, and we can't delete the forcefsck command.

The only solution I've found online so far is to try booting via a CD (like damn small linux) and accessing the files from there - but the root file system is inaccessible when I boot from CD.

The server has 2 SSD drives running in RAID 1 with a hardware controller.
0
Comment
Question by:RKFcomputers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 37714497
You can do linux rescue.  You can do it by using CentOS CD1 or DVD.  At the boot prompt

boot:

Type
linux rescue askmethod

this enables options to mount some volumes over the network or if you don't need network availability option, just type

linux rescue

And hit enter.

It then mounts your actual drive under /mnt/sysimage.  So now your /root is /mnt/sysimage/root
And you /boot is /mnt/sysimage/boot.

You can do fsck as well if you enable chroot jail.  This you can do by issuing command

cd /mnt/sysimage
chroot /mnt/sysimage
0
 

Author Comment

by:RKFcomputers
ID: 37714552
@Farzanj Thanks! I'll try that today and see how it works out.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37714636
Good luck!!  And for your reference, here is the documentation of various modes to boot, including rescue.  You can also boot at run level emergency, or single user or run level 1, all of these are different.

http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-rescuemode.html
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

Author Comment

by:RKFcomputers
ID: 37718269
I just received the server from the client this evening, and it's actually CentOS 6, not 5.

When I boot from a CentOS 6.1 DVD 1 I get the following options:
Install or upgrade...
Install system with basic video
Rescue installed system
Boot from local drive
Memory test

I chose Rescue Installed System from the menu, but it started an installation wizard that didn't resemble your instructions so I bailed. Is there a trick to get the command line boot like what you're describing?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37718273
You chose the right thing.  It will start like a wizard.  Will ask you if you have network options like NFS, HTTP or FTP. It takes some time and then it would tell you where it mounted your current OS.  One thing that it would not do is trying to partition or trying to install software.  Other than these options, you should not worry.
0
 

Author Closing Comment

by:RKFcomputers
ID: 37721317
Great answer, with prompt follow up
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question