Solved

Centos Boot Error

Posted on 2015-02-08
42
114 Views
Last Modified: 2015-03-11
Say, Raid reports functional - no errors.
Getting this after sudden power failure.
How can I repair please?
Centos-Error.jpg
0
Comment
Question by:shaunwingin
  • 21
  • 17
  • +2
42 Comments
 

Expert Comment

by:LizaMoly
ID: 40596806
To solve  this, just boot off the same CD that you used to install the OS, choose Rescue and answer the first few questions normally, then when it drops you into a shell use:

vi /mnt/sysimage/etc/selinux/config
Set Selinux to 0
0
 

Author Comment

by:shaunwingin
ID: 40596842
No CD drive - but usb port available. Any simple way to boot system to edit this file?

Pls also explain why above is required and what it does.
0
 
LVL 34

Expert Comment

by:Seth Simmons
ID: 40596845
selinux has nothing to do with this; the error message clearly indicates a file system issue
you will have to boot either in rescue mode or a live cd to work on this
unfortunately i have not done much with lvm so hopefully someone else can follow up with more on this
0
 

Author Comment

by:shaunwingin
ID: 40596874
I'm able to boot into Grub .... can one do this form there?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40597209
The situation indicates that you were short-sighted enough to remove e2fsutils package, so automatic fsck cannot fix / volume.
No - GRUB is of no help. You need at least CentOS 5.11 CD1 or CentOS 6U6 -minimal to run fsck on / filesystem.
0
 

Author Comment

by:shaunwingin
ID: 40599014
I've installed Elastix 2.2 and not sure what their distribution removes  - perhaps you can check - not simple to boot off CD.
0
 
LVL 61

Expert Comment

by:gheist
ID: 40599054
There are no numbers in the screen you have.
Can you add vga=791 to boot line to have more boot messages in the picture.

You need to image-transfer (look for suse studio image writer) either CentOS 5 or 6 or 7 1st disks to open the LVM and fsck / filesystem. After that your system will boot.
Try to install ext2 utils to prevent problem from repeating.

What kernel version you get at boot? 2.6.18->RHEL5 2.6.32->RHEL6 3.10.0-> RHEL7
0
 

Author Comment

by:shaunwingin
ID: 40599129
Kernel: 2.6.18-348.6.1.el5
Please can you give a searchable phrase to isolate error so as to search Centos forums as they must have though of a way to deal with this. Centos 2.6 is version in boot.
0
 

Author Comment

by:shaunwingin
ID: 40599134
Continues - pls give exact link to download usb boot disk for the kernal - affraid not too familiar with this all
IMG-20150209-01370.jpg
0
 
LVL 61

Expert Comment

by:gheist
ID: 40599138
You need CentOS5U11 CD1 to recover

Instructions here:
https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
0
 

Author Comment

by:shaunwingin
ID: 40599148
Did you see: ID: 40599134
0
 
LVL 61

Expert Comment

by:gheist
ID: 40599166
Yes - you need to take centos image and boot it as USB drive. It is the sort of hybrid CD that has partition table, so you can boot it as USB too.
0
 

Author Comment

by:shaunwingin
ID: 40599183
Can you check Elastix site please? I refered to Centos 2.6 - it should have read Elastix 2.2.
http://www.elastix.org/index.php/en/
0
 
LVL 61

Expert Comment

by:gheist
ID: 40599202
Your system is CentOS 5 derivative.
You can use CentOS 5/ RHEL5 recovery to fsck / filesystem.
And make sure you let elastix support know about fscking you had to do with your system, so that future updates has enough fsck power included.
0
 

Author Comment

by:shaunwingin
ID: 40600098
I've got the Elastix CD's - will these do the trick?  What method do I then follow?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40600118
NO, you told "NO CD DRIVE" - remember?
Please use CentOS disk image that is known to boot off USB
0
 

Author Comment

by:shaunwingin
ID: 40610160
Say, Ive installed CD Rom drive. Tried Linux Rescue with CentOS 5.4 CD and Elastix 2.4 (offers linux rescue)
Chose search  for partition to repair - but can't find any. Drops me to shell.

How do I proceed?

The Hardware Raid shows fundtional....
0
 

Author Comment

by:shaunwingin
ID: 40611452
Say, Any ideas please?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40612064
You need to run fsck against / filesystem because your skinny RHEL5 clone does not include e2fsck
0
 

Author Comment

by:shaunwingin
ID: 40612114
Say, How do I execute this? Attached is fsck / filesystem
and df
IMG-20150216-155210.jpg
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 61

Expert Comment

by:gheist
ID: 40612129
Did you succeed this step in rescure mode:

The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage. You can then make any changes required to your system. If you want to proceed with this step choose 'Continue'. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command shell.
0
 

Author Comment

by:shaunwingin
ID: 40612138
It ran, but dropped to the shell - was unable to locate any linux installation!
0
 
LVL 61

Expert Comment

by:gheist
ID: 40612142
0
 

Author Comment

by:shaunwingin
ID: 40613612
0
 
LVL 61

Expert Comment

by:gheist
ID: 40614407
try the next superbloc as suggested.

8193
24577
0
 
LVL 20

Expert Comment

by:Daniel McAllister
ID: 40614874
The images sent lead me to believe that your device mapping has changed... that is, the device that used to be /dev/sda is no longer there (instead being /dev/sdb, sdc, or some other letter). This is not uncommon if you've run updates or made ANY changes in BIOS.

I further suspect that the reason you're seeing file system errors is that you're looking at the right partition on the wrong hardware. (e.g. /dev/sda2 is no longer the right hard drive... instead, it should be /dev/sde2 or some other letter -- but the number won't change).

You can see a list of the disk partitions with commands like fdisk -l or parted -l (those are both L's, not 1's).

I'll echo that you're going to need a rescue disk, and the CentOS install disks are quite suitable candidates. You can boot into rescue mode -- which will guide you into a chrooted shell in the discovered system... but this is rather advanced stuff, though not exactly rocket-science. You may be better off looking for a Linux consultant to help you (probably on-site)... potentially expensive, true... maybe ask for Linux help from your local college or university? A student far enough in their studies might be willing and able to help for "beer money").

When you've completed fixing your RAID mapping so that you're getting the right drives in the right places, you might want to consider changing the fstab entries AWAY from using device ids like /dev/sda1 to using UUIDs

For example:
/dev/sda1                                                                     /                       ext4    defaults        1 1
becomes:
UUID=68b009b0-ec0c-404f-9b5a-300d76000bb8 /                       ext4    defaults        1 1

You can see the CURRENT mappings in /dev/disk/by-uuid/ (use ls -l).

Good Luck!

Dan
IT4SOHO
0
 

Author Comment

by:shaunwingin
ID: 40614911
Say pls see attachments with info ID: 40614874 and attempt ID: 40614407

it4soho did you see ID: 40612114?
IMG-20150217-205341.jpg
IMG-20150217-205635.jpg
IMG-20150217-205925.jpg
0
 
LVL 61

Expert Comment

by:gheist
ID: 40616061
You restored LVM2 well and there is no problem with /dev/sdb1 (but it leaves me guessing what is /dev/sda in your system, normally you should have installed on first disk called sda, maybe the USB you use, but does not matter, it will not mess up UUIDs for system)

run
fsck -f /dev/sdb1 (should not hurt, just prove chkdsk works fine)
then
fsck -f -b 8193 /dev/VolGroup00/LogVol00
Should this fail - try next superblock copies. even one in good order will fix filesystem and put you back on the feet.
There are no more options - reinstall, losing data and restoring from backups if any.
0
 

Author Comment

by:shaunwingin
ID: 40616073
Afraid hasn't resolved error.
Could it not just be a corrupt swap file.
error : "No suspend signature on swap, not resuming" makes me think this.
How can I delete the swap file?
0
 
LVL 61

Expert Comment

by:gheist
ID: 40617262
That is normal output after crash or normal shutdown. Suspend signature means kernel should resume previous system state from swap.
Did fsck -b 8193 said same?
Here is more advanced writeup on what can be done before giving up:
https://kezhong.wordpress.com/2009/06/27/linux-ext2ext3-superblock-recovery/
Just more theorethical guess:
*bsd has utility to seek filesystems on normal partitions, but yours are jammed by LVM, so it will not be work. Namely you check each block with "file" until you find superblock, then try to recover from that.
remeber - one good superblock = VICTORY
0
 
LVL 61

Expert Comment

by:gheist
ID: 40617270
btw - is your disk array aacraid from adaptec? Here the documentation on it.
0
 

Author Comment

by:shaunwingin
ID: 40617357
Tx - but a little beyond me...I've installed a new drive and all I need is the mysql database on the raid drive.
How can I access this and copy to dev/sda1
The mysql is in /dev/mapper/VolGroup00-LogVol00
[root@a1 ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     232665848   2083956 218572420   1% /
/dev/sda1               101086     12446     83421  13% /boot
tmpfs                   968488         0    968488   0% /dev/shm
0
 
LVL 61

Expert Comment

by:gheist
ID: 40617369
it is in /var/lib/mysql
or in /opt/rh/scl/mysql55/var/lib/mysql
Or in some custom location that i dont know of
0
 

Author Comment

by:shaunwingin
ID: 40617379
Tx, but how do I access the Raid drive?
0
 

Author Comment

by:shaunwingin
ID: 40617380
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     232665848   2083956 218572420   1% /
0
 
LVL 61

Expert Comment

by:gheist
ID: 40617472
Same way as before - scan for LVM, look for LVs look for filesystems.
0
 

Author Comment

by:shaunwingin
ID: 40618523
Pls remind me how:
[root@a1 ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       30401   244091610   8e  Linux LVM

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14       30272   243055417+  8e  Linux LVM

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          13      104391   83  Linux
/dev/sdc2              14       30272   243055417+  8e  Linux LVM
[root@a1 ~]#
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 40618809
You need to use your freshly acquired LVM recovery skill to bring old / to /mnt
0
 

Author Comment

by:shaunwingin
ID: 40618829
Afraid I've not acquired this skill - you will have to give me step by step.... see also:
http://www.experts-exchange.com/OS/Linux/Q_28619613.html#a40618752
0
 
LVL 61

Expert Comment

by:gheist
ID: 40618877
Ohh its already 2 of you...
0
 

Author Closing Comment

by:shaunwingin
ID: 40659399
Still not resolved....
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now