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.

share|improve this question

closed as off-topic by Undo Aug 29 '16 at 2:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – Undo
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Kernel panics happen for a variety of reasons. Often due to hardware failure... You'll need to check out /var/log/dmesg and /var/log/syslog to get more info about what actually happened. – hsanders Oct 12 '12 at 21:58
1  
You should try to boot using a "Live CD", and then mount the HDD partition that held / and /lib. Then try to restore the libc files. – sawdust Oct 12 '12 at 23:43
6  
This isn't really the right forum for this question. You're better off asking on superuser.com or ubuntu.stackexchange.com. This question looks like it'll be migrated to superuser.com shortly. – Craig Ringer Oct 13 '12 at 7:40
    
I've same issue while I dist upgrade from 14.04, I'm even not able to boot with old kernel and rescue more, how did you solve it. ???? – Nullpointer Oct 27 '16 at 15:08
    
I have the same problem. Did you found a solution? Thanks. – Pascut Jul 13 '17 at 14:42

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 (linux firewall) 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 !

share|improve this answer
18  
selinux != linux firewall! – mtahmed Nov 28 '13 at 23:15
    
The second does not work when using qemu 2.6.0 for an ARM debian (rasbian) system. – dotslash Jun 30 '16 at 2:34
  1. Mount the centos live cd and boot
  2. Go into rescue mode and wait for it load up
  3. Read the terminal to see where it mounted the OS
  4. Go into OS
  5. vim or nano /etc/selinux/config
  6. Make sure SELINUX=enforcing or disabled
share|improve this answer

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).

share|improve this answer

Mount remount the /
Eg.

  1. mount -o remount,rw /dev/xyz /
  2. sed -i 's/1 1/0 0/' /etc/fstab
  3. sed -i 's/1 2/0 0/' /etc/fstab
  4. reboot
share|improve this answer

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

share|improve this answer

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

share|improve this answer

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

share|improve this answer
1  
On a Debian based system such as Ubuntu, it would be the .deb's rather than the rpm's. If recovering the system fails, copying off the user data directories before reinstall is another option. Actually, that is the first thing that should be done BEFORE any further attempt at repair. Go to your local office supply, get an external hard drive, boot from a liveCD and back up the user data. Then think about repair. – Chris Stratton Dec 21 '12 at 16:43

Solution is :-

  1. Restart
  2. Go to advanced menu and then click on 'e'(edit the boot parameters)
  3. Go down to the line which starts with linux and press End
  4. Press space
  5. Add the following at the end -> kernel.panic=1
  6. Press F10 to restart

This basically forces your PC to restart because by default it does not restart after a kernel panic.

share|improve this answer
    
This didn't work for me on Ubuntu 14.04 – zanbri Jul 15 '16 at 17:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.