* [Qemu-devel] "A disk read error occurred"
@ 2008-06-28 19:42 Alexander (Sasha) Sirotkin
2008-06-29 3:48 ` Avi Kivity
0 siblings, 1 reply; 10+ messages in thread
From: Alexander (Sasha) Sirotkin @ 2008-06-28 19:42 UTC (permalink / raw)
To: qemu-devel
For some reason when I try to boot qemu with -hda /dev/sda (or -hda
/dev/hda), i.e. to use the whole disk, it fails with the above error
"A disk read error occurred". This happens only on IBM/Lenovo laptops
(tried a few models), while it works just fine on any desktop I can
get my hands on. Probably has something to do with bios...
Any suggestions ?
Thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-06-28 19:42 [Qemu-devel] "A disk read error occurred" Alexander (Sasha) Sirotkin
@ 2008-06-29 3:48 ` Avi Kivity
2008-06-30 23:05 ` Jamie Lokier
0 siblings, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2008-06-29 3:48 UTC (permalink / raw)
To: qemu-devel
Alexander (Sasha) Sirotkin wrote:
> For some reason when I try to boot qemu with -hda /dev/sda (or -hda
> /dev/hda), i.e. to use the whole disk, it fails with the above error
> "A disk read error occurred". This happens only on IBM/Lenovo laptops
> (tried a few models), while it works just fine on any desktop I can
> get my hands on. Probably has something to do with bios...
>
>
Can you add some printfs displaying the sector numbers being read? Some
disks have trouble accessing the last sector.
Also, an strace can help show the problem.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-06-29 3:48 ` Avi Kivity
@ 2008-06-30 23:05 ` Jamie Lokier
2008-07-01 9:03 ` Mark Cave-Ayland
2008-07-01 21:37 ` Alexander (Sasha) Sirotkin
0 siblings, 2 replies; 10+ messages in thread
From: Jamie Lokier @ 2008-06-30 23:05 UTC (permalink / raw)
To: qemu-devel
Avi Kivity wrote:
> Alexander (Sasha) Sirotkin wrote:
> >For some reason when I try to boot qemu with -hda /dev/sda (or -hda
> >/dev/hda), i.e. to use the whole disk, it fails with the above error
> >"A disk read error occurred". This happens only on IBM/Lenovo laptops
> >(tried a few models), while it works just fine on any desktop I can
> >get my hands on. Probably has something to do with bios...
> >
> >
>
> Can you add some printfs displaying the sector numbers being read? Some
> disks have trouble accessing the last sector.
>
> Also, an strace can help show the problem.
Also, sometimes when booting the BIOS can print a disk read error
message, and an appropriate -hdachs will fix it. I found that out
when rebooting Windows 2000 after installing it from CD (both in
QEMU), on a virtual disk 1GB in size.
-- Jamie
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-06-30 23:05 ` Jamie Lokier
@ 2008-07-01 9:03 ` Mark Cave-Ayland
2008-07-01 9:08 ` Jamie Lokier
2008-07-01 21:37 ` Alexander (Sasha) Sirotkin
1 sibling, 1 reply; 10+ messages in thread
From: Mark Cave-Ayland @ 2008-07-01 9:03 UTC (permalink / raw)
To: qemu-devel
Jamie Lokier wrote:
> Also, sometimes when booting the BIOS can print a disk read error
> message, and an appropriate -hdachs will fix it. I found that out
> when rebooting Windows 2000 after installing it from CD (both in
> QEMU), on a virtual disk 1GB in size.
>
> -- Jamie
The message "A disk read error occurred" comes from the NT bootloader
when it is unable to boot, typically caused by an incorrect drive geometry.
It sounds as if you are experiencing a similar problem to the one I
blogged about here:
http://www.ilande.co.uk/index.php?/archives/6-Migrating-an-NT4-VM-from-VMWare-to-NT4-Part-1.html.
In other words, in order to run an existing NT4 image under QEMU I had
to halve the number of heads in the NTFS BPB in order for things to work
properly. I suspect that this is a bug in either QEMU/BIOS, but I have
no idea where to even start looking.
HTH,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-07-01 9:03 ` Mark Cave-Ayland
@ 2008-07-01 9:08 ` Jamie Lokier
2008-07-01 9:31 ` Mark Cave-Ayland
0 siblings, 1 reply; 10+ messages in thread
From: Jamie Lokier @ 2008-07-01 9:08 UTC (permalink / raw)
To: qemu-devel
Mark Cave-Ayland wrote:
> >Also, sometimes when booting the BIOS can print a disk read error
> >message, and an appropriate -hdachs will fix it. I found that out
> >when rebooting Windows 2000 after installing it from CD (both in
> >QEMU), on a virtual disk 1GB in size.
> >
> >-- Jamie
>
> The message "A disk read error occurred" comes from the NT bootloader
> when it is unable to boot, typically caused by an incorrect drive geometry.
>
> It sounds as if you are experiencing a similar problem to the one I
> blogged about here:
> http://www.ilande.co.uk/index.php?/archives/6-Migrating-an-NT4-VM-from-VMWare-to-NT4-Part-1.html.
> In other words, in order to run an existing NT4 image under QEMU I had to
> halve the number of heads in the NTFS BPB in order for things to work
> properly. I suspect that this is a bug in either QEMU/BIOS, but I have no
> idea where to even start looking.
Yes, very similar, except I saw the problem _without_ migrating
anything. Windows 2000 was installed _inside_ QEMU (with no special
-hdachs setting) from its CD installer. It couldn't boot its own
install after restarting QEMU.
I looked at the partition with fdisk, then copied the c,h,s values to
-hdachs...
...and QEMU said the values were out of range and refused to start!
So I guessed some values which were not what fdisk reported, and it
worked and booted fine.
-- Jamie
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-07-01 9:08 ` Jamie Lokier
@ 2008-07-01 9:31 ` Mark Cave-Ayland
0 siblings, 0 replies; 10+ messages in thread
From: Mark Cave-Ayland @ 2008-07-01 9:31 UTC (permalink / raw)
To: qemu-devel
Jamie Lokier wrote:
> Yes, very similar, except I saw the problem _without_ migrating
> anything. Windows 2000 was installed _inside_ QEMU (with no special
> -hdachs setting) from its CD installer. It couldn't boot its own
> install after restarting QEMU.
>
> I looked at the partition with fdisk, then copied the c,h,s values to
> -hdachs...
>
> ...and QEMU said the values were out of range and refused to start!
>
> So I guessed some values which were not what fdisk reported, and it
> worked and booted fine.
Yeah, I went through exactly the same process with -hdachs myself :) If
you still have the broken image around, it would be interesting to
compare the CHS settings between the MBR and VBR on your QEMU-installed
copy to see what values you were getting...
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-06-30 23:05 ` Jamie Lokier
2008-07-01 9:03 ` Mark Cave-Ayland
@ 2008-07-01 21:37 ` Alexander (Sasha) Sirotkin
2008-07-02 14:34 ` Jamie Lokier
1 sibling, 1 reply; 10+ messages in thread
From: Alexander (Sasha) Sirotkin @ 2008-07-01 21:37 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
On Tue, Jul 1, 2008 at 2:05 AM, Jamie Lokier <jamie@shareable.org> wrote:
> Avi Kivity wrote:
>> Alexander (Sasha) Sirotkin wrote:
>> >For some reason when I try to boot qemu with -hda /dev/sda (or -hda
>> >/dev/hda), i.e. to use the whole disk, it fails with the above error
>> >"A disk read error occurred". This happens only on IBM/Lenovo laptops
>> >(tried a few models), while it works just fine on any desktop I can
>> >get my hands on. Probably has something to do with bios...
>> >
>> >
>>
>> Can you add some printfs displaying the sector numbers being read? Some
>> disks have trouble accessing the last sector.
There are no printfs, no sector numbers, nothing. Just the above error.
>>
>> Also, an strace can help show the problem.
The whole strace is too big, attaching last 1000 lines
>
> Also, sometimes when booting the BIOS can print a disk read error
> message, and an appropriate -hdachs will fix it. I found that out
> when rebooting Windows 2000 after installing it from CD (both in
> QEMU), on a virtual disk 1GB in size.
>
I must say that I don't understand what chs values I should give to
qemu. hdparm shows 9729/255/63, but fdisk insists on 10337,240,63.
Both versions do not work with qemu, it says "invalid physical CHS
format"
BTW, hdparm -i shows yet another version - RawCHS=16383/16/63
BTW, the disk is HTS541080G9SA00
> -- Jamie
>
>
>
[-- Attachment #2: strace.last1000.txt.gz --]
[-- Type: application/x-gzip, Size: 5533 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-07-01 21:37 ` Alexander (Sasha) Sirotkin
@ 2008-07-02 14:34 ` Jamie Lokier
2008-07-02 19:39 ` Alexander (Sasha) Sirotkin
2008-07-02 19:47 ` Alexander (Sasha) Sirotkin
0 siblings, 2 replies; 10+ messages in thread
From: Jamie Lokier @ 2008-07-02 14:34 UTC (permalink / raw)
To: qemu-devel
Alexander (Sasha) Sirotkin wrote:
> On Tue, Jul 1, 2008 at 2:05 AM, Jamie Lokier <jamie@shareable.org> wrote:
> > Avi Kivity wrote:
> >> Alexander (Sasha) Sirotkin wrote:
> >> >For some reason when I try to boot qemu with -hda /dev/sda (or -hda
> >> >/dev/hda), i.e. to use the whole disk, it fails with the above error
> >> >"A disk read error occurred". This happens only on IBM/Lenovo laptops
> >> >(tried a few models), while it works just fine on any desktop I can
> >> >get my hands on. Probably has something to do with bios...
> >> >
> >> >
> >>
> >> Can you add some printfs displaying the sector numbers being read? Some
> >> disks have trouble accessing the last sector.
> There are no printfs, no sector numbers, nothing. Just the above error.
> >>
> >> Also, an strace can help show the problem.
> The whole strace is too big, attaching last 1000 lines
> >
> > Also, sometimes when booting the BIOS can print a disk read error
> > message, and an appropriate -hdachs will fix it. I found that out
> > when rebooting Windows 2000 after installing it from CD (both in
> > QEMU), on a virtual disk 1GB in size.
> >
>
> I must say that I don't understand what chs values I should give to
> qemu. hdparm shows 9729/255/63, but fdisk insists on 10337,240,63.
> Both versions do not work with qemu, it says "invalid physical CHS
> format"
> BTW, hdparm -i shows yet another version - RawCHS=16383/16/63
Try -hdachs 1023,16,63,lba.
If that doesn't work, try it without lba.
If those don't work, try 255 for the middle number, with/without lba.
-- Jamie
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-07-02 14:34 ` Jamie Lokier
@ 2008-07-02 19:39 ` Alexander (Sasha) Sirotkin
2008-07-02 19:47 ` Alexander (Sasha) Sirotkin
1 sibling, 0 replies; 10+ messages in thread
From: Alexander (Sasha) Sirotkin @ 2008-07-02 19:39 UTC (permalink / raw)
To: qemu-devel
On Wed, Jul 2, 2008 at 5:34 PM, Jamie Lokier <jamie@shareable.org> wrote:
> Alexander (Sasha) Sirotkin wrote:
>> On Tue, Jul 1, 2008 at 2:05 AM, Jamie Lokier <jamie@shareable.org> wrote:
>> > Avi Kivity wrote:
>> >> Alexander (Sasha) Sirotkin wrote:
>> >> >For some reason when I try to boot qemu with -hda /dev/sda (or -hda
>> >> >/dev/hda), i.e. to use the whole disk, it fails with the above error
>> >> >"A disk read error occurred". This happens only on IBM/Lenovo laptops
>> >> >(tried a few models), while it works just fine on any desktop I can
>> >> >get my hands on. Probably has something to do with bios...
>> >> >
>> >> >
>> >>
>> >> Can you add some printfs displaying the sector numbers being read? Some
>> >> disks have trouble accessing the last sector.
>> There are no printfs, no sector numbers, nothing. Just the above error.
>> >>
>> >> Also, an strace can help show the problem.
>> The whole strace is too big, attaching last 1000 lines
>> >
>> > Also, sometimes when booting the BIOS can print a disk read error
>> > message, and an appropriate -hdachs will fix it. I found that out
>> > when rebooting Windows 2000 after installing it from CD (both in
>> > QEMU), on a virtual disk 1GB in size.
>> >
>>
>> I must say that I don't understand what chs values I should give to
>> qemu. hdparm shows 9729/255/63, but fdisk insists on 10337,240,63.
>> Both versions do not work with qemu, it says "invalid physical CHS
>> format"
>> BTW, hdparm -i shows yet another version - RawCHS=16383/16/63
>
> Try -hdachs 1023,16,63,lba.
> If that doesn't work, try it without lba.
> If those don't work, try 255 for the middle number, with/without lba.
qemu does not allow h numbers above 16, so I cannot use 255. 16 does not work...
>
> -- Jamie
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] "A disk read error occurred"
2008-07-02 14:34 ` Jamie Lokier
2008-07-02 19:39 ` Alexander (Sasha) Sirotkin
@ 2008-07-02 19:47 ` Alexander (Sasha) Sirotkin
1 sibling, 0 replies; 10+ messages in thread
From: Alexander (Sasha) Sirotkin @ 2008-07-02 19:47 UTC (permalink / raw)
To: qemu-devel
On Wed, Jul 2, 2008 at 5:34 PM, Jamie Lokier <jamie@shareable.org> wrote:
> Alexander (Sasha) Sirotkin wrote:
>> On Tue, Jul 1, 2008 at 2:05 AM, Jamie Lokier <jamie@shareable.org> wrote:
>> > Avi Kivity wrote:
>> >> Alexander (Sasha) Sirotkin wrote:
>> >> >For some reason when I try to boot qemu with -hda /dev/sda (or -hda
>> >> >/dev/hda), i.e. to use the whole disk, it fails with the above error
>> >> >"A disk read error occurred". This happens only on IBM/Lenovo laptops
>> >> >(tried a few models), while it works just fine on any desktop I can
>> >> >get my hands on. Probably has something to do with bios...
>> >> >
>> >> >
>> >>
>> >> Can you add some printfs displaying the sector numbers being read? Some
>> >> disks have trouble accessing the last sector.
>> There are no printfs, no sector numbers, nothing. Just the above error.
>> >>
>> >> Also, an strace can help show the problem.
>> The whole strace is too big, attaching last 1000 lines
>> >
>> > Also, sometimes when booting the BIOS can print a disk read error
>> > message, and an appropriate -hdachs will fix it. I found that out
>> > when rebooting Windows 2000 after installing it from CD (both in
>> > QEMU), on a virtual disk 1GB in size.
>> >
>>
>> I must say that I don't understand what chs values I should give to
>> qemu. hdparm shows 9729/255/63, but fdisk insists on 10337,240,63.
>> Both versions do not work with qemu, it says "invalid physical CHS
>> format"
>> BTW, hdparm -i shows yet another version - RawCHS=16383/16/63
>
> Try -hdachs 1023,16,63,lba.
> If that doesn't work, try it without lba.
> If those don't work, try 255 for the middle number, with/without lba.
>
According to the DiskEXplorer for NTFS the correct heads number is
240, however qemu does not allow to set it. Any idea why ? Can I just
remove this limitation in the source code ?
> -- Jamie
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-07-02 19:47 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-28 19:42 [Qemu-devel] "A disk read error occurred" Alexander (Sasha) Sirotkin
2008-06-29 3:48 ` Avi Kivity
2008-06-30 23:05 ` Jamie Lokier
2008-07-01 9:03 ` Mark Cave-Ayland
2008-07-01 9:08 ` Jamie Lokier
2008-07-01 9:31 ` Mark Cave-Ayland
2008-07-01 21:37 ` Alexander (Sasha) Sirotkin
2008-07-02 14:34 ` Jamie Lokier
2008-07-02 19:39 ` Alexander (Sasha) Sirotkin
2008-07-02 19:47 ` Alexander (Sasha) Sirotkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).