From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KkB9y-00028t-90 for mharc-grub-devel@gnu.org; Mon, 29 Sep 2008 01:19:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KkB9t-00025Z-Eu for grub-devel@gnu.org; Mon, 29 Sep 2008 01:18:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KkB9p-00022c-Lv for grub-devel@gnu.org; Mon, 29 Sep 2008 01:18:56 -0400 Received: from [199.232.76.173] (port=46704 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KkB9p-00022E-D3 for grub-devel@gnu.org; Mon, 29 Sep 2008 01:18:53 -0400 Received: from web31604.mail.mud.yahoo.com ([68.142.198.150]:30199) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KkB9p-0006MV-3N for grub-devel@gnu.org; Mon, 29 Sep 2008 01:18:53 -0400 Received: (qmail 53537 invoked by uid 60001); 29 Sep 2008 05:18:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=BpWCVeJEy9aYJcz0QWR9dUmGMmIflVvQRqL1pQSfcUCIDmpJRgRXbCfJpU8wdlJp1IfVSjUhaGOYb2Y7e0MJyKamAwpQI7xP12Ei1z1cRQ0ryyVR90LmQeAG5MW2SLk37/XbRXzsAGcDUZDV7aZT1og/C4icz/fkGfSf670EY/M=; X-YMail-OSG: tV85FX0VM1k4b1QajPEjra6GPmi2tc8EgSxTT8rKe9nQf58qNDbwijHF5_NA2j5OgA_biuwCY8004D.bEyo_MNN9mf8UXP2aoqJBhHgexX.Vh0zcWMNoL5GdDCdIxFVadqRSP4kNhoJenRQk8kkN4wBIGRqIAMh214B8wZAEezjiuUGoIQ-- Received: from [202.62.94.130] by web31604.mail.mud.yahoo.com via HTTP; Sun, 28 Sep 2008 22:18:51 PDT X-Mailer: YahooMailRC/1096.28 YahooMailWebService/0.7.218.2 Date: Sun, 28 Sep 2008 22:18:51 -0700 (PDT) From: Viswesh S To: The development of GRUB 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <756269.52536.qm@web31604.mail.mud.yahoo.com> X-detected-operating-system: by monty-python.gnu.org: FreeBSD 6.x (1) 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: Mon, 29 Sep 2008 05:18:58 -0000 Hi,=0A=0A=0A=0A----- Original Message ----=0A> From: Bean =0A> To: The development of GRUB 2 =0A> Sent: Tuesd= ay, 23 September, 2008 7:20:49 PM=0A> Subject: Re: Windows,grub and grub2= =0A> =0A> On Tue, Sep 23, 2008 at 4:23 PM, Viswesh S wrote:=0A> >=0A> >=0A>= >=0A> >=0A> > ----- Original Message ----=0A> >> From: Bean =0A> >> To: Th= e development of GRUB 2 =0A> >> Sent: Monday, 22 September, 2008 9:10:26 AM= =0A> >> Subject: Re: Windows,grub and grub2=0A> >>=0A> >> On Tue, Sep 9, 20= 08 at 2:00 PM, Viswesh S wrote:=0A> >> > Below is the dump of screen output= while chainloading the ntfsnew file.=0A> >> > ****************************= ***********=0A> >> > DI=3DCFF0 SI=3D07EE BP=3D1FF0 SP=3D1FE8 BX=3D0000 DX= =3D0000 CX=3D0000 AX=3D0000=0A> >> > CS=3D0000 SS=3D0000 DS=3D0000 ES=3D000= 0 FG=3D0246 IP=3D7C57=0A> >> >=0A> >> > DI=3D7FF0 SI=3D07EE BP=3D1FF0 SP=3D= 7BF4 BX=3D55AA DX=3D0000 CX=3D0000 AX=3D0100 CX=3D07C0=0A> >> > DS=3D07C0 E= S=3D0000 FG=3D0007 IP=3D0082=0A> >> > *************************************= *****=0A> >> > Could you please let me know the way to disassemble the bina= ry file without=0A> >> > any header.The way in which you decoded the boot r= ecord.=0A> >> >=0A> >> > Also one more thing to let you know is that,=0A> >= > >=0A> >> > with the grub-1.96 ( without the chainloader patch of disk->de= v->read() ) ,=0A> >> > with windows2003 in partition 1 and linux in partiti= on 3, when we =0A> chainload,=0A> >> > if we look at the partition table pa= ssed to another bootloader ie location=0A> >> > 0x7be - we can see that it = is junk, but the surprising point is that, in=0A> >> > this case as I have = mentioned in my first mail, windows boots up from=0A> >> > grub2.So it is t= hat the partition table is not required for the chainloader=0A> >> > thing = and just the boot record is sufficient=0A> >>=0A> >> Hi,=0A> >>=0A> >> Oh, = sorry for another long delay. I disassemble the file with ida,=0A> >> which= is an amazing tool. I don't know if there is open source=0A> >> alternativ= e, please let me know if you find one.=0A> >>=0A> >> The output from ida is= in masm format, I modify it a bit so that it=0A> >> can be compiled using = nasm. Please note that nasm doesn't generate the=0A> >> same binary file as= original one, but you can get an idea what it=0A> >> does.=0A> >>=0A> >> F= rom the output, the program fails at the second int 13 call, int=0A> >> 13/= ah =3D 48h. Although I notice that DL=3D0, which is not supposed to=0A> >> = happen. Perhaps you can add a grub_printf in grub_chainloader_boot to=0A> >= > show the value of boot drive:=0A> >>=0A> >> static grub_err_t=0A> >> grub= _chainloader_boot (void)=0A> >> {=0A> >> grub_printf ("boot_drive=3D%d\n"= , boot_drive);=0A> >> grub_chainloader_real_boot (boot_drive, boot_part_a= ddr);=0A> >>=0A> >> /* Never reach here. */=0A> >> return GRUB_ERR_NON= E;=0A> >> }=0A> >>=0A> >> --=0A> >> Bean=0A> >>=0A> >>=0A> >=0A> > Hi,=0A> = >=0A> > The value of boot drive is 0x80.=0A> >=0A> > This was the same valu= e in disk->drive also.=0A> =0A> Hi,=0A> =0A> Interesting, perhaps %dx is ch= anged somewhere. Please try the=0A> following patch, it dumps the value of = %dx just before jumping to the=0A> boot sector.=0A> =0A> -- =0A> Bean=0A=0A= The patch works and now Windows is booting perfectly fine from Grub2. =0A= =0AI will go through the assembly and try to understand what modifications = you have done.So there is a problem in Grub2 code, which needs to be fixed = ?=0A=0ATill this point, I was chainloading grub from Grub2 and then chainlo= ading Windows2008 from it.=0A=0AThanks for the consistent help till this po= int and for the future also.=0A=0AViswesh=0A=0A=0A=0A Connect with fri= ends all over the world. Get Yahoo! India Messenger at http://in.messenger.= yahoo.com/?wm=3Dn/