Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Ki8If-0002P8-Oz for mharc-grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ki8Ie-0002Oc-0K for grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ki8Id-0002OI-2B for grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:31 -0400 Received: from [199.232.76.173] (port=41759 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ki8Ic-0002OE-Rr for grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:30 -0400 Received: from mx20.gnu.org ([199.232.41.8]:39869) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ki8Ic-0000oC-At for grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:30 -0400 Received: from ti-out-0910.google.com ([209.85.142.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ki8IS-0004kT-DU for grub-devel@gnu.org; Tue, 23 Sep 2008 09:51:28 -0400 Received: by ti-out-0910.google.com with SMTP id u5so1489871tia.10 for ; Tue, 23 Sep 2008 06:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=U2MKLWm9IVEV51Wjx2xDSvSZ9W9zDUagX6ZBaVMqUGU=; b=n9Ye5c0tR+g8VCGJ41tYL5yteORSjGd0oCDLKqiZxXwOpCHxqUEWwjmNdMn4W83rAr r8zWcxcq7kMy5Rzjs2KMYRsUT9S97neGpAlQ7tgO+WC94XhXQcI98SCXdyQedcHcoO9s lFApM7k0Kw3HffuIUSgyDieU6b2iA1GEAXqSs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=cMxyq3y6d5riMsT2oMvK5a2mp1Tl6DbGxpYLD4Tp870SNaMe+GPpy4VL8eTXG3b44h /K5Obbbico1/OWYjXXijsUjnBEjO9xuqgoBjwidNm3LgBVrLfg7pIhPiLuuJWgDvlkCP KJySi15BjVV5Vqo6J9OjQi+IHRn92U+EEODcU= Received: by 10.110.57.6 with SMTP id f6mr7162604tia.38.1222177849496; Tue, 23 Sep 2008 06:50:49 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Tue, 23 Sep 2008 06:50:49 -0700 (PDT) Message-ID: Date: Tue, 23 Sep 2008 21:50:49 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <669465.74261.qm@web31608.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_114586_20049227.1222177849490" References: <669465.74261.qm@web31608.mail.mud.yahoo.com> X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: Windows,grub and grub2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 13:51:32 -0000 ------=_Part_114586_20049227.1222177849490 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Sep 23, 2008 at 4:23 PM, Viswesh S wrote: > > > > > ----- Original Message ---- >> From: Bean >> To: The development of GRUB 2 >> Sent: Monday, 22 September, 2008 9:10:26 AM >> Subject: Re: Windows,grub and grub2 >> >> On Tue, Sep 9, 2008 at 2:00 PM, Viswesh S wrote: >> > Below is the dump of screen output while chainloading the ntfsnew file. >> > *************************************** >> > DI=CFF0 SI=07EE BP=1FF0 SP=1FE8 BX=0000 DX=0000 CX=0000 AX=0000 >> > CS=0000 SS=0000 DS=0000 ES=0000 FG=0246 IP=7C57 >> > >> > DI=7FF0 SI=07EE BP=1FF0 SP=7BF4 BX=55AA DX=0000 CX=0000 AX=0100 CX=07C0 >> > DS=07C0 ES=0000 FG=0007 IP=0082 >> > ****************************************** >> > Could you please let me know the way to disassemble the binary file without >> > any header.The way in which you decoded the boot record. >> > >> > Also one more thing to let you know is that, >> > >> > with the grub-1.96 ( without the chainloader patch of disk->dev->read() ) , >> > with windows2003 in partition 1 and linux in partition 3, when we chainload, >> > if we look at the partition table passed to another bootloader ie location >> > 0x7be - we can see that it is junk, but the surprising point is that, in >> > this case as I have mentioned in my first mail, windows boots up from >> > grub2.So it is that the partition table is not required for the chainloader >> > thing and just the boot record is sufficient >> >> Hi, >> >> Oh, sorry for another long delay. I disassemble the file with ida, >> which is an amazing tool. I don't know if there is open source >> alternative, please let me know if you find one. >> >> The output from ida is in masm format, I modify it a bit so that it >> can be compiled using nasm. Please note that nasm doesn't generate the >> same binary file as original one, but you can get an idea what it >> does. >> >> From the output, the program fails at the second int 13 call, int >> 13/ah = 48h. Although I notice that DL=0, which is not supposed to >> happen. Perhaps you can add a grub_printf in grub_chainloader_boot to >> show the value of boot drive: >> >> static grub_err_t >> grub_chainloader_boot (void) >> { >> grub_printf ("boot_drive=%d\n", boot_drive); >> grub_chainloader_real_boot (boot_drive, boot_part_addr); >> >> /* Never reach here. */ >> return GRUB_ERR_NONE; >> } >> >> -- >> Bean >> >> > > Hi, > > The value of boot drive is 0x80. > > This was the same value in disk->drive also. Hi, Interesting, perhaps %dx is changed somewhere. Please try the following patch, it dumps the value of %dx just before jumping to the boot sector. -- Bean ------=_Part_114586_20049227.1222177849490 Content-Type: text/x-diff; name=aa.diff Content-Transfer-Encoding: base64 X-Attachment-Id: f_flgkzsmk0 Content-Disposition: attachment; filename=aa.diff ZGlmZiAtLWdpdCBhL2tlcm4vaTM4Ni9wYy9zdGFydHVwLlMgYi9rZXJuL2kzODYvcGMvc3RhcnR1 cC5TCmluZGV4IDE4ZjYxZDguLmE1MDk3N2MgMTAwNjQ0Ci0tLSBhL2tlcm4vaTM4Ni9wYy9zdGFy dHVwLlMKKysrIGIva2Vybi9pMzg2L3BjL3N0YXJ0dXAuUwpAQCAtNjM5LDEzICs2MzksNDYgQEAg RlVOQ1RJT04oZ3J1Yl9jaGFpbmxvYWRlcl9yZWFsX2Jvb3QpCiAKIAkvKiBzZXQgdXAgdG8gcGFz cyBib290IGRyaXZlICovCiAJcG9wbAklZWR4CisJbW92bAklZWR4LCAlZWRpCiAKIAkvKiBFU0kg bXVzdCBwb2ludCB0byBhIHBhcnRpdGlvbiB0YWJsZSBlbnRyeSAqLwogCXBvcGwJJWVzaQogCisK IAljYWxsCXByb3RfdG9fcmVhbAogCS5jb2RlMTYKKworCXB1c2gJJWR4CisJY2FsbAloZXhfb3V0 CisJcHVzaAklZGkKKwljYWxsCWhleF9vdXQKKwogCWxqbXAJJDAsICRHUlVCX01FTU9SWV9NQUNI SU5FX0JPT1RfTE9BREVSX0FERFIKKworaGV4X291dDoKKwlwdXNodwklYnAKKwltb3Z3CSVzcCwg JWJwCisJcHVzaGF3CisJbW92YgkkMHhFLCAlYWgKKyAJbW92dwkkNywgJWJ4CisJbW92dwkkNCwg JWN4CisJbW92dwk0KCVicCksICVkeAorMToKKwlyb2wJJDQsICVkeAorCW1vdmIJJWRsLCAlYWwK KwlhbmRiCSQweEYsICVhbAorCWNtcGIJJDEwLCAlYWwKKwlqYgkyZgorCXN1YmIJJCgnMCctJ0En KzEwKSwgJWFsCisyOgorCWFkZGIJJCcwJywgJWFsCisJaW50CSQweDEwCisJbG9vcAkxYgorCW1v dmIJJCcgJywgJWFsCisJaW50CSQweDEwCisJcG9wYXcKKwlwb3B3CSVicAorCXJldAkkMgogCS5j b2RlMzIKIAogI2luY2x1ZGUgIi4uL2xvYWRlci5TIgo= ------=_Part_114586_20049227.1222177849490--