I have an Ubuntu 15.04 machine. I installed docker in this machine. After installation I was trying to run the test image of docker which comes by default. But it did not ran. Then I tried to shutdown the machine.
But the machine was not shutting down. It just hanged in the middle and was consuming all of the cpu resources. I waited for 10-15 mins but state did not change and nothing happened. So I went ahead and shutdown the machine by pressing the power-on button in laptop for a while. This way the machine went off.
After this event, now when I am trying to boot into the machine, it is throwing me following error at the time of boot.
Target filesystem doesn't hvae requested /sbin/init.
/bin/sh: 0: Can't open splash
[4.458446] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[4.458479] CPU: 1 PID: 1 Comm: sh not tainted 3.13.0-46-generic #79-Ubuntu
Machine has three os: Windows, Centos, Ubuntu-15.04.
I have tried the fsck solution on the boot device with network boot. But it does not solve this problem.
Here I don't know if docker package is part of the problem. It could have been any package installation for that matter.
The output of fsck is as follows:
$ fsck /dev/sda5 fsck from util-linux 2.25.2 e2fsck 1.42.12 (29-Aug-2014) /dev/sda5: clean, 885843/1313280 files, 3569836/5242880 blocks.
I have also tried -f option of fsck, output for that is:
$ fsck /dev/sda5 -f fsck /dev/sda5 -f fsck from util-linux 2.25.2 e2fsck 1.42.12 (29-Aug-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/sda5: 885843/1313280 files (0.1% non-contiguous), 3569836/5242880 blocks
Running fdisk -l command prints following message, along with printing device details.
Partition 5 does not start on physical sector boundary.
I mounted the device using mount -o ro /dev/sda5 /media/boot command.
And the output of ls -l /media/boot is as follows:
total 116 drwxr-xr-x 2 root root 4096 Jan 26 07:01 bin drwxr-xr-x 3 root root 4096 Dec 26 07:10 boot drwxr-xr-x 2 root root 4096 Jan 4 2015 cdrom drwxr-xr-x 4 root root 4096 Apr 17 2014 dev drwxr-xr-x 164 root root 12288 Jan 26 07:04 etc drwxr-xr-x 2 root root 4096 Jan 4 2015 home lrwxrwxrwx 1 root root 33 Feb 27 2015 initrd.img -> boot/initrd.img-3.13.0-46-generic lrwxrwxrwx 1 root root 33 Feb 4 2015 initrd.img.old -> boot/initrd.img-3.13.0-45-generic drwxr-xr-x 25 root root 4096 Jan 26 07:01 lib drwxr-xr-x 2 root root 4096 Dec 26 06:49 lib32 drwxr-xr-x 2 root root 4096 Dec 26 06:28 lib64 drwx------ 2 root root 16384 Jan 4 2015 lost+found drwxr-xr-x 3 root root 4096 Jan 4 2015 media drwxr-xr-x 2 root root 4096 Apr 10 2014 mnt drwxr-xr-x 6 root root 4096 Oct 2 14:15 opt drwxr-xr-x 2 root root 4096 Apr 10 2014 proc drwx------ 11 root root 4096 Jan 26 10:30 root drwxr-xr-x 12 root root 4096 Apr 17 2014 run drwxr-xr-x 2 root root 12288 Jan 26 07:03 sbin drwxr-xr-x 2 root root 4096 Apr 17 2014 srv drwxr-xr-x 2 root root 4096 Mar 13 2014 sys drwxrwxrwt 6 root root 4096 Jan 26 22:01 tmp drwxr-xr-x 11 root root 4096 Oct 2 14:14 usr drwxr-xr-x 15 root root 4096 Jan 9 02:05 var lrwxrwxrwx 1 root root 30 Feb 27 2015 vmlinuz -> boot/vmlinuz-3.13.0-46-generic lrwxrwxrwx 1 root root 30 Feb 4 2015 vmlinuz.old -> boot/vmlinuz-3.13.0-45-generic
For testing apt-get install --reinstall
For testing apt-get install --reinstall upstart command, I created an Ubuntu 15.04 container in OpenVz mahine. In this Ubuntu machine I executed apt-get install --reinstall upstart command and it prints the following message:
$ apt-get install --reinstall upstart Reading package lists... Done Building dependency tree... Done Package upstart is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: systemd-sysv mountall init-system-helpers lsb-baseE: Package 'upstart' has no installation candidate
Running the same command inside Ubuntu-14.04 machine prints following message:
$ apt-get install --reinstall upstart Reading package lists... Done Building dependency tree... Done Reinstallation of upstart is not possible, it cannot be downloaded. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Note: Problem is not with openvz container but with earlier described machine.