Page 1 of 2

Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 18:18
by felipeam86
I have Windows XP installed in a virtual machine under Ubuntu 8.10. Today I tried to launch windows but immediately I got the message:

FATAL: Could note read from the boot medium! System halted.

Actually I dont care if I lose Windows but I have a very important file in one of the two virtual hard drives associated so I launched a live linux distribution (puppy 4.2) that enables to mount ntfs hard drives so that I can recuperate my file. I was able to mount the secondary hard drive but note the principal hard drive where I have windows installed and the file that I need. So, thats why I put as a topic that the virtual machine is not reading the virtual hard drive... I think it's messed up

I've seen various posts regarding the same error message but they didn't helped a lot, I think they had different problems. I tried to mount the VDI as another partition but apparently as my VDI is dynamic its not that easy to accomplish.

Does anybody has a solution? Remember that I only care for that file in particular I dont need to recuperate windows.

Thanks in advance.

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 19:02
by vbox4me2
Boot the VM with knoppix or such liveCD's.

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 20:24
by felipeam86
vbox4me2 wrote:Boot the VM with knoppix or such liveCD's.
I already tried with Puppy but it didn't recognised the VDI, anyway I will give it a try.

Thanks!

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 20:33
by Sasquatch
Check the size of the VDI file. Is it still a big file, or has it dropped?

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 22:54
by felipeam86
Sasquatch wrote:Check the size of the VDI file. Is it still a big file, or has it dropped?
Its still a big file (8.9 GB)... and I tried various Live Linux distributions like vbox4me2 said but still doesn't work

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 23:26
by Sasquatch
Within the live enviroment, how does your /dev look like? Do you have two hard drives (/dev/sda and /dev/sdb or /dev/hda and /dev/hdb)? Tried a check on both drives? Most distro's have ntfs-progs in their repo, which allows you to check ntfs drives.

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 23:28
by vbox4me2
Most likely the distro's can't read it cause you're using the SATA toggle, try setting IDE only or try the recovery console from the xp install cd/iso and run a chkdsk.

Re: Virtual machine is not reading the virtual hard drive

Posted: 28. Apr 2009, 23:46
by jfschafer
I had a similar issue. Due to a problem I decided to delete a VM and it's VDI and import the same VM/VDI again. Everything appeared to import fine but when I tried to run the VM I got the fatal error "can't read VDI".
I discovered that Virtualbox did not remove the deleted VM/VDI instances from the virtualbox.xml config file. It just added a number to the end of the file name and created another entry in the xml file.
Once I removed all of the old/bad entries in the xml, everything worked fine. Not sure if it is related to your issue but it's worth a look.

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 09:39
by felipeam86
Sasquatch wrote:Within the live enviroment, how does your /dev look like? Do you have two hard drives (/dev/sda and /dev/sdb or /dev/hda and /dev/hdb)? Tried a check on both drives? Most distro's have ntfs-progs in their repo, which allows you to check ntfs drives.
There are lots of files, I don't know if its normal, but I did find as you said two files: /dev/hda and /dev/hdb. Anyway, How do I check them? I'm not shure if I understand what you want to say.

Thank you for your help

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 09:53
by felipeam86
vbox4me2 wrote:Most likely the distro's can't read it cause you're using the SATA toggle, try setting IDE only or try the recovery console from the xp install cd/iso and run a chkdsk.
I dont know what SATA toggle is, neither how to set it to IDE only. I did run the recovery console and ran a chkdsk and I got a message. My XP is in french so as the message but in english it would be something like this:

"The specified reader is not valid or there are no hard drives in the reader"

"Le lecteur spécifié n'est pas valide ou aucun disque n'est présent dans le lecteur"

I'm not shure if "reader" is a good translation... I hope you understand.

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 10:05
by felipeam86
jfschafer wrote:I had a similar issue. Due to a problem I decided to delete a VM and it's VDI and import the same VM/VDI again. Everything appeared to import fine but when I tried to run the VM I got the fatal error "can't read VDI".
I discovered that Virtualbox did not remove the deleted VM/VDI instances from the virtualbox.xml config file. It just added a number to the end of the file name and created another entry in the xml file.
Once I removed all of the old/bad entries in the xml, everything worked fine. Not sure if it is related to your issue but it's worth a look.
I looked at the virtualbox.xml config file but I didn't know what to do there... I have already tried to create a new virtual machine and mounted the VDI but it still doesn't work.

After all I've done I think that the VDI file is the problem... I can't get to read it with all the methods I've tried...

Thank you all for your help and I hope you have some new ideas.

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 11:56
by Sasquatch
felipeam86 wrote:
Sasquatch wrote:Within the live enviroment, how does your /dev look like? Do you have two hard drives (/dev/sda and /dev/sdb or /dev/hda and /dev/hdb)? Tried a check on both drives? Most distro's have ntfs-progs in their repo, which allows you to check ntfs drives.
There are lots of files, I don't know if its normal, but I did find as you said two files: /dev/hda and /dev/hdb. Anyway, How do I check them? I'm not shure if I understand what you want to say.

Thank you for your help
Ok, that's fine. It means that both drives are detected. Now, if you run sudo blkid in that enviroment, you should get something like this:

Code: Select all

/dev/sda1: UUID="6674D97974D94C85" LABEL="Windows" TYPE="ntfs"
And that on two lines, one for /dev/hda1, and one for /dev/hdb1. The most important part is the TYPE= field. If it doesn't mention a normal file system type, it means that the partition table is messed up. You somehow have to fix that, or force a mount of the drive with a given file system, like with this command:
sudo mount -t ntfs-3g /dev/hda1 /media/hda
Now you need to make sure that the destination folder exists ;).

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 12:58
by vbox4me2
felipeam86 wrote:I dont know what SATA toggle is, neither how to set it to IDE only.
These are VM settings.

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 14:16
by felipeam86
Sasquatch wrote: Ok, that's fine. It means that both drives are detected. Now, if you run sudo blkid in that enviroment, you should get something like this:

Code: Select all

/dev/sda1: UUID="6674D97974D94C85" LABEL="Windows" TYPE="ntfs"
I ran sudo blkid under ubuntus terminal and I get this:

Code: Select all

/dev/loop0: TYPE="squashfs"
/dev/sdb1: UUID="9CDCDC0BDCDBDE18" LABEL="Matlab" TYPE="ntfs"
I looked again at the /dev and I found /dev/sda, /dev/sdb and /dev/sdb1

I tried the ntfsprog in Ubuntu, (maybe I didn't used it as it is suposed to) and I got this message

Code: Select all

ubuntu@ubuntu:~$ sudo ntfsinfo -i 1 /dev/sda
Error reading bootsector: Input/output error.
Failed to startup volume: Input/output error.
Failed to mount '/dev/sda': Input/output error.
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
made to NTFS by this software.
Failed to open '/dev/sda'.
So I tried the chkdsk /f but it didn't work (maybe because I have the french version?). Anyway, I tried chkdsk like I said in a one of the posts and I got this
felipeam86 wrote:My XP is in french so as the message but in english it would be something like this:

"The specified reader is not valid or there are no hard drives in the reader"

"Le lecteur spécifié n'est pas valide ou aucun disque n'est présent dans le lecteur"

Re: Virtual machine is not reading the virtual hard drive

Posted: 29. Apr 2009, 14:34
by felipeam86
I forgot to say that I did try:

Code: Select all

sudo mount -t ntfs-3g /dev/hda1 /media/hda
For sdb1 (the drive that is working) it worked perfectly but for sdb it didnt, I got the following message:

Code: Select all

NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesnt seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a 
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
For the sda (I don't know if it is sda or sdb the the VDI I need to fix) I got:

Code: Select all

 Error reading bootsector: Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a 
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very 
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a differente device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.