This question is similar to Server won't boot, kernel panic - not syncing
Background:
I have set /etc/selinux/config
and changed the line SELINUX=enforcing
to SELINUX=disabled
After rebooting it keeps reaching a kernel panic status...
I have tried all the suggestions from the internet:
- Adding
selinux=0
orenforcing=0
at kernel parameter during boot - Using a liveCD to boot into rescue mode and checked the config, there are no typos in the config
- Changed the
SELINUX=disabled
back toSELINUX=enforcing
and boot again, still reaches a kernel panic - Adding
selinux=0
to/mnt/sysimage/boot/grub/grub.conf
in rescue mode - For some reason, I have tried
adding kernel.panic = 1
in/etc/sysctl.conf
, but everytime when I reaches a kernel panic it never reboots on itself. I need to hard boot (which I need to call the operators in the data centre...)
Solved my own problem... @Iain and @kamihack from the comments were right, it is not SELinux problem.
As I have mentioned in my own comments before, my servers are running in a virtual environment. After I finished setting up my first server, the server is then cloned to multiple servers. I realized the provider actually typed the server name as the name of the VG. So about half a month ago, I used the vgrename function to change the VG name to the current server name, and I did not reboot afterwards.
So fast forward to two days ago, I have just changed the selinux settings and rebooted my server. Now my /etc/grub.conf and /etc/fstab are all using old VG names, so naturally all those VGs could not be found and thus leading to the kernel panic. Searching online returns results all about selinux leading to kernel panics, thus it really led me the wrong way for a long time.
After changing /etc/grub.conf and /etc/fstab to use the correct VG names using a Linux Rescue CD, my servers are now back and running. Thank you all for helping me solve my problem.