From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KE8Ab-0001I1-PO for qemu-devel@nongnu.org; Wed, 02 Jul 2008 15:39:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KE8AZ-0001GP-Qf for qemu-devel@nongnu.org; Wed, 02 Jul 2008 15:39:13 -0400 Received: from [199.232.76.173] (port=37534 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KE8AZ-0001GJ-LT for qemu-devel@nongnu.org; Wed, 02 Jul 2008 15:39:11 -0400 Received: from an-out-0708.google.com ([209.85.132.241]:50964) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KE8AZ-0003B5-6S for qemu-devel@nongnu.org; Wed, 02 Jul 2008 15:39:11 -0400 Received: by an-out-0708.google.com with SMTP id d18so150241and.130 for ; Wed, 02 Jul 2008 12:39:08 -0700 (PDT) Message-ID: <478c82f00807021239g1b136ec7qe636f0c2813976ae@mail.gmail.com> Date: Wed, 2 Jul 2008 22:39:08 +0300 From: "Alexander (Sasha) Sirotkin" Subject: Re: [Qemu-devel] "A disk read error occurred" In-Reply-To: <20080702143424.GC2993@shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <478c82f00806281242q52a7fa55qcd458c9915e0c5a7@mail.gmail.com> <4867061B.2090309@qumranet.com> <20080630230542.GD20187@shareable.org> <478c82f00807011437t5e667351o14799cb9ad6ec88a@mail.gmail.com> <20080702143424.GC2993@shareable.org> 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 On Wed, Jul 2, 2008 at 5:34 PM, Jamie Lokier wrote: > 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. qemu does not allow h numbers above 16, so I cannot use 255. 16 does not work... > > -- Jamie > > >