• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Centos Boot Error

Say, Raid reports functional - no errors.
Getting this after sudden power failure.
How can I repair please?
Centos-Error.jpg
0
shaunwingin
Asked:
shaunwingin
  • 21
  • 17
  • +2
1 Solution
 
LizaMolyCommented:
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
 
shaunwinginAuthor Commented:
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
 
Seth SimmonsSr. Systems AdministratorCommented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
shaunwinginAuthor Commented:
I'm able to boot into Grub .... can one do this form there?
0
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
I've installed Elastix 2.2 and not sure what their distribution removes  - perhaps you can check - not simple to boot off CD.
0
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
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
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
You need CentOS5U11 CD1 to recover

Instructions here:
https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html
0
 
shaunwinginAuthor Commented:
Did you see: ID: 40599134
0
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
I've got the Elastix CD's - will these do the trick?  What method do I then follow?
0
 
gheistCommented:
NO, you told "NO CD DRIVE" - remember?
Please use CentOS disk image that is known to boot off USB
0
 
shaunwinginAuthor Commented:
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
 
shaunwinginAuthor Commented:
Say, Any ideas please?
0
 
gheistCommented:
You need to run fsck against / filesystem because your skinny RHEL5 clone does not include e2fsck
0
 
shaunwinginAuthor Commented:
Say, How do I execute this? Attached is fsck / filesystem
and df
IMG-20150216-155210.jpg
0
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
It ran, but dropped to the shell - was unable to locate any linux installation!
0
 
shaunwinginAuthor Commented:
0
 
gheistCommented:
try the next superbloc as suggested.

8193
24577
0
 
Daniel McAllisterPresident, IT4SOHO, LLCCommented:
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
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
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
 
gheistCommented:
btw - is your disk array aacraid from adaptec? Here the documentation on it.
0
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
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
 
shaunwinginAuthor Commented:
Tx, but how do I access the Raid drive?
0
 
shaunwinginAuthor Commented:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     232665848   2083956 218572420   1% /
0
 
gheistCommented:
Same way as before - scan for LVM, look for LVs look for filesystems.
0
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
You need to use your freshly acquired LVM recovery skill to bring old / to /mnt
0
 
shaunwinginAuthor Commented:
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
 
gheistCommented:
Ohh its already 2 of you...
0
 
shaunwinginAuthor Commented:
Still not resolved....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 21
  • 17
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now