Solved

CentOS 5 forcefsck loop

Posted on 2012-03-12
6
688 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

749 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