From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KE3Ph-0007CT-Sn for qemu-devel@nongnu.org; Wed, 02 Jul 2008 10:34:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KE3Pg-0007Bv-II for qemu-devel@nongnu.org; Wed, 02 Jul 2008 10:34:29 -0400 Received: from [199.232.76.173] (port=40287 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KE3Pg-0007Bp-A6 for qemu-devel@nongnu.org; Wed, 02 Jul 2008 10:34:28 -0400 Received: from mail2.shareable.org ([80.68.89.115]:59115) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KE3Pf-0001PM-Ui for qemu-devel@nongnu.org; Wed, 02 Jul 2008 10:34:28 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1KE3Pc-0000yE-Ml for qemu-devel@nongnu.org; Wed, 02 Jul 2008 15:34:24 +0100 Date: Wed, 2 Jul 2008 15:34:24 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] "A disk read error occurred" Message-ID: <20080702143424.GC2993@shareable.org> References: <478c82f00806281242q52a7fa55qcd458c9915e0c5a7@mail.gmail.com> <4867061B.2090309@qumranet.com> <20080630230542.GD20187@shareable.org> <478c82f00807011437t5e667351o14799cb9ad6ec88a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <478c82f00807011437t5e667351o14799cb9ad6ec88a@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Alexander (Sasha) Sirotkin wrote: > 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 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