4

I'm using VirtualBox, and have a vdi. It works fine on the virtual machine I originally configured for it, but if I clone it (with VBoxManage clonehd) or just copy it, create a new VM and boot it, I always get the same errors:

mount: could not find filesystem '/dev/root'
...
Kernel panic - not syncing: Attempted to kill init!

Anyone know how I can fix this?

The VDI is an image of a clean system that I want to keep reusing to save me having to keep installing the OS into a new empty VDI.

4
  • Confirm that you are using EXACTLY the same settings in your new VM as in the old one. One missed checkbox on one screen can cause this.
    – CarlF
    Sep 1, 2010 at 15:32
  • I don't think so. I can't even mount the VDI - surely nothing to do with how the machine is configured in terms of RAM, CPU, networking, etc. I can't even get GRUB to enter single user mode
    – Andy
    Sep 1, 2010 at 16:01
  • What you're saying here is not consistent. Is it refusing to mount, or is GRUB loading but not booting an OS? Try mounting your new VDI as a second hard drive on a known good VM. Can you access it?
    – CarlF
    Sep 1, 2010 at 17:34
  • GRUB is loading but not booting the OS - it's during the init process CentOS can't mount /dev/root...
    – Andy
    Sep 2, 2010 at 9:31

2 Answers 2

9

The problem is the layout of the hard disks changed. This is probably because the .vdi hard disk is now attached to the sata controller instead of the ide controller. just disconnect from the sata controller in the settings and reconnect to the ide controller then reboot.

3
  • Wow Peter McNeil's comment definitely worked for me: Go to the Oracle VM VirtualBox Manager, right-click your CentOs Machine and click on "Settings". Go to Storage -> Right-click the vdi in SATA Controller and click on "Remove attachment. Go to the IDE Controller and click on Add Hard Disk. Retrieve your vdi file from your hard drive and boot your CentOS machine :)
    – user64698
    Jan 25, 2011 at 15:02
  • It happens to me too after leaving them open for 1-2 days. I've applied this fix and waiting to see if the panic still happens. Thanks! Apr 16, 2013 at 11:18
  • I had the same problem when using vmdk imags in virtual box, your solution helped me too.
    – twobeers
    Feb 9, 2017 at 7:56
0

Probably an unfixed bug:

http://www.virtualbox.de/ticket/2813

2
  • Probably not, since you also created VDI dupes using filesystem copies. This would cause other problems (duplicate UUID) but wouldn't invoke that bug.
    – CarlF
    Sep 1, 2010 at 17:33
  • The disk I copied wasn't associated with a VM, so no UUID dupes occurred.
    – Andy
    Sep 2, 2010 at 9:30

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.