I was having Ubuntu 16.04 and I was trying to dual my system to win7. While creating partition for win7 the partition got corrupted and resulted in a initramfs Problem. I cleared the issue by running fsck but now when I boot into my system I get stuck at the following stage, I tried attaching the image here but wasn't possible I'll try to write the boot display error message.

The boot up page get stuck at the below result once:

/dev/sda2: clean, 5230508/30023680 files, 4104481/120077056 blocks
run-init: /sbin/init No such file or directory
Target file system doesn’t have requested /sbin/init
run-init:/etc/init: permission denied
run-init: /bin/init: No such file or directory
run-init: /bin/sh: No such file or directory
[   ] kernel panic – not syncing : attempting to kill init! Exitcode=0x00000
CPU : 2 PID: 1 Comm : run-init Not tainted – generic
Hardware name: LENOVO 20255/Lenovo G505s, BIOS 83CN53WW
Call Trace
Kernel Offset: 0x2a0000000 from 0xffffffff8100000 (relocation range: 0xffffff8000000-0xfffffffbffffffff)
end Kernel panic – not synching : Attempted to ill init! Exitcode=0x0000000100
[    8.300857] CR2: 00007ffdb4e04cd8 CR3: 00000001bcc0a000 CR4: 00000000406e0

Your system has suffered from catastrophic data loss. (Hopefully this hasn't occurred in your /home partition as well.) You could try to recover it, but I don't have the experience to suggest how. Instead, please follow these instructions to make sure your data is safe:

  1. Obtain a Ubuntu Live CD / Live USB. You probably already have one of these somewhere, but if not you can follow this guide.
  2. Boot from the Live CD. If you don't know how to do this, look it up based on your computer model. If you don't know your computer model, try mashing all of the Fn keys while the computer is starting up but before it reaches Ubuntu.
  3. While you're waiting, ensure that a large external drive is plugged in.
  4. Choose Try Ubuntu.
  5. Open a file manager.
  6. Select the partition containing your /home folder or its contents.
    Picture of the file manager
    You might find an empty /home folder; don't panic – it just means that your files are stored on another partition.
  7. Copy the files that you want to keep.

Now that you have recovered your files, you can make the system bootable again:

  1. Find the /bin folder of your computer (not of the live CD).
  2. Start a terminal in this folder.
  3. Run the command:

    cp -L /bin/sh .
  4. If this prompts to overwrite a file, stop; an assumption I made about exactly how your system was broken has been proven wrong.

  5. Restart your computer, this time booting normally.
  6. You should be greeted to a recovery console. If not, see step 11.

From here, you might be able to get your system up and running. I doubt it though; it's probably easiest to reinstall once you've verified that you have all of your files.

  • 1. I understand that my system undergone catastrophic data loss. 2. Till step 6 I had previously followed the procedures which you have mentioned and you are right my /home folder is empty and you have mentioned "don't panic – it just means that your files are stored on another partition." 3. and you have concluded in step 7 by saying "Copy the files that you want to keep." so to copy which files are you referring here. 4. In my gparted the file system size consumed statistics is same as before the corruption occured. 5. I will try the remaining steps and get back, thanks – Rajath c S Apr 9 '18 at 10:16
  • @RajathcS Don't try those until you've recovered your files! – wizzwizz4 Apr 9 '18 at 10:25
  • If you remember your username, look for a partition with a /username folder in it. – wizzwizz4 Apr 9 '18 at 10:25
  • I am not able to locate the files (i.e my personal files) but i could locate the user which is locked but i could get into my user directory via terminal as a super user but it looks empty – Rajath c S Apr 9 '18 at 11:01
  • @RajathcS Have you checked that partition's /lost+found directory? – wizzwizz4 Apr 9 '18 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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