Page 1 of 1

Incorrect data returned when reading sectors at end of disk

Posted: 2. Apr 2015, 13:43
by Steve6375
I have a USB Flash drive which has a .vmdk file so that I can boot from the USB drive to grub4dos.
grub4dos uses the BIOS for disk access.
If I try to read the last sectors of the USB drive using grub4dos, it returns sector data containing all 00 bytes instead of the correct data.
Running the USB drive on a real system works OK.
Running the USB drive under QEMU works OK.
If I boot to Windows under VBox and then use a disk editor to read the disk sectors at the end of the USB drive, that works OK too.

So it seems to be a problem with the VBox BIOS.

See http://reboot.pro/topic/18736-virtual-m ... ntry191819

Re: Incorrect data returned when reading sectors at end of d

Posted: 2. Apr 2015, 13:54
by michaln
Please create a ticket on the bug tracker (see https://www.virtualbox.org/wiki/Bugtracker ) and include all steps required to reproduce the problem.

Re: Incorrect data returned when reading sectors at end of d

Posted: 2. Apr 2015, 18:56
by Steve6375
It can't - it says TICKET_CREATE privileges are required.

I traced the problem to the HDD controller

If the controller is an an IDE controller in the VM and the USB .vmdk is attached to it, then it works OK.
If the controller is a SATA controller then I get the wrong data returned.

This problem also occurs using a VHD mounted as a virtual disk in Windows and using a .vmdk file to attach the virtual disk to the VM (i.e. the last sector of the .vhd disk is read) - so it is not dependent on the target drive being a USB drive.

Re: Incorrect data returned when reading sectors at end of d

Posted: 2. Apr 2015, 19:52
by Steve6375

Re: Incorrect data returned when reading sectors at end of d

Posted: 2. Apr 2015, 20:01
by michaln
Thanks!