How to solve “Kernel panic - not syncing - Attempt

2019-01-23 02:08发布

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.

8条回答
Bombasti
2楼-- · 2019-01-23 02:38
  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
查看更多
3楼-- · 2019-01-23 02:43

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

查看更多
孤傲高冷的网名
4楼-- · 2019-01-23 02:56

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

查看更多
Evening l夕情丶
5楼-- · 2019-01-23 02:58

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
查看更多
\"骚年 ilove
6楼-- · 2019-01-23 03:00

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 !

查看更多
看我几分像从前
7楼-- · 2019-01-23 03:00

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.

查看更多
登录 后发表回答