On Tue, Jul 1, 2008 at 2:05 AM, Jamie Lokier 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 > > >