I was trying to update libc in our Ubuntu server but it failed and now when I reboot the server I get a error message:
Kernel panic - not syncing - Attempted to kill init!
and it just hangs.
What is the solution to this problem? The server is used by 10 people so I don't want to reinstall erasing their data.
if the full message is:
kernel panic - not syncing: Attempted to kill inint !
PId: 1, comm: init not tainted 2.6.32.-279-5.2.e16.x86_64 #1
then you should have disabled selinux and after that you have rebooted the system.
The easier is to use a live OS and re-enable it
vim /etc/selinux/config
...
SELINUX=enforcing
...
Second choise is to disable selinux in the kernel arguments by adding selinux=0
vim /boot/grub/grub.conf
...
kernel /boot/vmlinuz-2.4.20-selinux-2003040709 ro root=/dev/hda1 nousb selinux=0
...
source kernel panic - not syncing: Attempted to kill inint !
I just came across this problem when I replaced a failing disk. I had copied over the system files to the new disk, and was good about replacing the old disk's UUID entry with the new disk's UUID in fstab.
However I had not replaced the UUID in the grub.conf (sometimes menu.lst) file in /boot/grub. So check your grub.conf file, and if the "kernel" line has something like
kernel ... root=UUID=906eaa97-f66a-4d39-a39d-5091c7095987
it likely has the old disk's UUID. Replace it with the new disk's UUID and run grub-install (if you're in a live CD rescue you may need to chroot or specify the grub directory).
Booting from CD to rescue the installation and editing /etc/selinux/config: changed SELINUX from enforcing to permissive. Rebooted and system booted
/etc/selinux/config
before change:
SELINUX=enforcing and SELINUXTYPE=permissive
/etc/selinux/config
after change:
SELINUX=permissive and SELINUXTYPE=permissive
At grub screen goto boot in recovery.
As booting hold ESC
It should take you into a gui menu. Open command and fix selinux.
Also I suggest run the clean broken packages
Use Rescue mode with cd and mount the filesystem. Try to check if any binary files or folder are deleted. If deleted you will have to manually install the rpms to get those files back.
https://askubuntu.com/questions/92946/cannot-boot-because-kernel-panic-not-syncing-attempted-to-kill-init
Solution is :-
- Restart
- Go to advanced menu and then click on 'e'(edit the boot parameters)
- Go down to the line which starts with linux and press End
- Press space
- Add the following at the end -> kernel.panic=1
- Press F10 to restart
This basically forces your PC to restart because by default it does not restart after a kernel panic.