2

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-base

E: 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.

yogeshagr
  • 151
  • 1
  • 2
  • 7
  • Did you use the `-f` option for `fsck` to force a full check even if the file system appears to be clean? What does `fsck` say when you run it? If a full check doesn't report any errors, you should try to mount the file system and run `ls -l` inside it. – kasperd Jan 29 '16 at 15:02
  • I have deleted the comment and added further information in the question itself. – yogeshagr Jan 29 '16 at 16:44
  • Could you try mounting `/dev/sda5` somewhere and do an `ls -l` of it. `mount -o ro /dev/sda5 /some/where ; ls -l /some/where`. – kasperd Jan 29 '16 at 16:48
  • Yeah I am able to mount `/dev/sda5` partition, and able to execute `ls -l`. Do you need to see the output of `ls -l` command ? – yogeshagr Jan 29 '16 at 16:54
  • The output of that `ls -l` command is important to allow us to debug the problem further. – kasperd Jan 29 '16 at 17:05
  • As far as I can tell all of the output from those commands is looking how it should. Which means unfortunately we still don't have any clear indication of where the problem lies. You can of course try `ls -l /media/boot/sbin/init` to look for the file it says is missing. In some cases a message about a missing executable can instead mean that a library needed by the executable is missing. You could try `file /media/boot/sbin/init` to look for clues. – kasperd Jan 29 '16 at 17:23
  • Command `ls -l /media/boot/sbin/init` says `No such file or directory`, as there is no such file. Did you mean some other file ? – yogeshagr Jan 29 '16 at 17:27
  • I don't have any Ubuntu 15.04 systems to check with. But that file exists on all other systems I work with, including Ubuntu 14.04. I don't know how that file disappeared from your system, but it is so crucial to the boot process that it is no surprise the system fails to boot when it isn't there. You could try `chroot /media/boot` and `dpkg-query -S /sbin/init` to look for some more clues. – kasperd Jan 29 '16 at 17:42
  • Did `chroot /media/boot`. Then executed `dpkg-query -S /sbin/init` and the output of this command is: `dpkg-query: no path found matching pattern /media/boot/sbin/init`. Is there a way I can get `/sbin/init` file back to my system, if that will solve the problem. – yogeshagr Jan 29 '16 at 17:54
  • Are you sure you typed the command correctly? The output `dpkg-query: no path found matching pattern /media/boot/sbin/init` is not what I would have expected. It shouldn't have said `/media/boot`. – kasperd Jan 29 '16 at 18:00
  • Yeah sorry after `chroot /media/boot `, `dpkg-query -S /sbin/init` command prints: `dpkg-query: no path found matching pattern /sbin/init`. Actually I tried `dpkg-query -S /media/boot/sbin/init` also without chroot which printed, `dpkg-query: no path found matching pattern /media/boot/sbin/init`. – yogeshagr Jan 29 '16 at 18:07
  • If that was an Ubuntu 14.04 system. I would try `apt-get install --reinstall upstart` from inside the `chroot`. But since I don't have any 15.04 system to compare against, I cannot tell you whether that command would be appropriate on a 15.04 system. – kasperd Jan 29 '16 at 19:27
  • I have executed `apt-get install --reinstall upstart` command in Ubuntu 14.04 and Ubuntu 15.04 test machine. Output is updated in question. Does these messages indicates something ? – yogeshagr Jan 30 '16 at 01:26

0 Answers0