Kernel Panic after fsck
Posted on 2008-10-11
I've got a machine running CentOS 5. There are 2 hard drives in the machine, they are running on RAID 1 so I'm mirroring everything so that if one fails I have a backup on the other drive. I'm running Apache, PHP, MySQL and some FTP services on the machine.
I just installed a 1TB disk and I had to move the other 2 disks from sdb to sda because the computer wouldn't start with the 1TB disk on sda even though I tried to change the grub.conf file to make it use hd1,0 instead of hd0,0. That worked fine. So then I had 2 disks on sda (sda1 and sda2) and one on sdb.
I wanted to have only one partition on sdb so I used fdisk and deleted sdb1 and sdb2. I created a new partition set to primary and number 1 with default block settings. I pressed T and selected 83 (Linux) for ext2. Then I pressed W to write the changes and fdisk told me I had to restart because sdb was still in use by the system. I didn't understand that because sdb was not in use by anything, I mean, the 2 hard drives running /boot where on sda.
I restarted and the machine didn't answer ping so I went down to the engine room and saw that there was an error. It said that there where some bad blocks (or something like that) on /dev/VolGroup00/Log00 and that I should run fsck manually to fix it. I ran fsck -y and it restarted the computer.
Now, when it finished starting up it had a new error with "Kernel Panic" :-/
no fstab.sys, mounting internal defaults
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
audit(1223665793.629:2) enforcing=1 old_enforcing=0 ...
libsepol.policydb_read: policydb magic number ********* does not match expected magic number ********* or *********
libsepol.policydb_from_image: policy image is invalid
security: policydb macig number ******** does not match expected magic number **********
Unable to load SELinux Policy. Machine is in enforcing mode. Halting now.
Kernel panic - not syncing: Attempted to kill init!
So my question is; What is wrong? How can I fix it without destroying anything on the machine? Can I somehow run the Live CD and fix this there?