Linux – Ubuntu 10.04 on virtualbox gives error: Target filesystem doesn’t have /sbin/init \ No init found. Try passing init= bootarg

linuxUbuntuvirtualbox

I'm a linux newbie and the only reason I have it installed is so I can stop having Windows incompatibility issues with Ruby on Rails. Having said that, it sure has been nice, and much faster, and I don't think I'll be doing any Winrails stuff anytime soon.

So I created a virtualmachine using virtualbox and have had ubuntu on it for the last 3 weeks. Recently ubuntu asked if it could update a few things, I clicked 'ok'.

Now it won't boot and I get this error: *mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory … Target filesystem doesn't have /sbin/init. No init found. Try passing init= bootarg

BusyBox v1.13.3…

(initramfs) _ *

So I cruised the forums and there are a variety of solutions, but they all have to do with booting from the live cd. (which I assume is the ISO image I used to install ubuntu in the first place). But when I boot from that CD, it just hangs on the ubuntu screen, and the little dots keep cycling white to red, but it hung there for an hour so I think it was stuck. Not sure what I can do; can I do anything from the busybox shell (or whatever that is) to fix things?

The thing is, it took about 10 hours to get everything the way I needed with all the gems and whatnot. And I didn't really write down what I tweaked, and I'm middle aged, so all that information has leaked out by now and I don't want to do it again. I'd really like to repair my existing install.

One question you might have is, is there something wrong with the ISO? I don't think so, because I made a new virtual machine and used that same iso file to install a fresh ubuntu.

Any help much appreciated.

Phil

Best Answer

Everything looks normal on the bootloader prompt. So I fear that the filesystem has been damaged.

I suggest the following process:

  1. Create a new virtual machine, and make fresh Ubuntu installation.
  2. Install the etckeeper package, and run etckeeper init. This will put /etc under version control. If you have a favorite version control tool amongst Bazaar, Darcs, Git and Mercury, select it in /etc/etckeeper/etckeeper.conf before running etckeeper commit.
  3. Your changes under /etc will be automatically committed before and after package management tasks, and once per day. You can commit manually by running etckeeper commit or invoking the underlying version control tool directly.
  4. Now is the time to try to save the old VM. Shut down the new VM, then add the disk of the old VM to the new VM and boot the new VM.
  5. Try mounting /dev/sdb2. If you're prompted to run fsck, do so.
  6. Recover what you can from the old VM.
  7. Remember to include the repository for /etc, as well as anything you might do in /usr/local and /home in the VM, in your backup setup.