0

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:

  1. Adding selinux=0 or enforcing=0 at kernel parameter during boot
  2. Using a liveCD to boot into rescue mode and checked the config, there are no typos in the config
  3. Changed the SELINUX=disabled back to SELINUX=enforcing and boot again, still reaches a kernel panic
  4. Adding selinux=0 to /mnt/sysimage/boot/grub/grub.conf in rescue mode
  5. 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...)
Lok.K.
  • 31
  • 1
  • 5
  • It seems unlikely that SELinux is the issue here. Have you tried booting an earlier version of the kernel from the grub menu ? – user9517 Jul 07 '16 at 08:27
  • You could be experiencing a hardware failure, that happened to match the time you rebooted to perform the SELINUX change - run a SMART disk check and ask for a RAM test to be performed by your provider (if they don't provide KVM access) – kamihack Jul 07 '16 at 11:06
  • @Iain This problem happened right at the reboot after I changed the selinux settings. I have not run any yum updates or updated the kernel before and I tried checking the settings it seems I don't have other kernel to boot from – Lok.K. Jul 08 '16 at 01:51
  • @kamihack Ah sorry I forgot to mention I am running this on a virtual environment. I have other servers presumably sharing the same host so the chance of a hardware failure might be slimmer than usual. I have no control over the host though. I do have a virtual console access which simulates the KVM. – Lok.K. Jul 08 '16 at 01:54
  • Force an fsck, other than kernel image corruption, I can't think of anything else – kamihack Jul 08 '16 at 02:09
  • You two are absolutely correct, it is not SELinux problem. Thanks again for your time and effort! – Lok.K. Jul 08 '16 at 02:47

1 Answers1

1

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.

Lok.K.
  • 31
  • 1
  • 5