All of lore.kernel.org
 help / color / mirror / Atom feed
* Windows boot
@ 2008-08-07 14:30 Viswesh S
  2008-08-07 22:26 ` Javier Martín
  0 siblings, 1 reply; 10+ messages in thread
From: Viswesh S @ 2008-08-07 14:30 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 900 bytes --]

Hi,
I installed ubuntu in the same harddisk(hda) as windows.
After installing ubuntu, using grub legacy, I was able to log in to windows, using the entries, rootnoverify and chainloader +1.
But when I install grub2 and then modify the grub.cfg with the following, statements, it is not working, says ...A disk read error occurred ,Press Ctrl+Alt+Del .
This is my grub.cfg
menuentry "Windows" {
    set root=(hd0,3)
    chainloader +1
}
My windows file sytem is in NTFS and not vfat
One more thing to check with is, the need of ntfs mod present as part of grub2.So where exactly that is getting used,though I have tried to load the module ntfs and ntfscomp in grub using insmod in grub menu,...but no positive results.
What might be in grub2, which prevents windows to boot.
Viswesh


      Add more friends to your messenger and enjoy! Go to http://in.messenger.yahoo.com/invite/

[-- Attachment #2: Type: text/html, Size: 1578 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
  2008-08-07 14:30 Viswesh S
@ 2008-08-07 22:26 ` Javier Martín
  0 siblings, 0 replies; 10+ messages in thread
From: Javier Martín @ 2008-08-07 22:26 UTC (permalink / raw)
  To: The development of GRUB 2

Hi again,

2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
> Hi,
>
> I installed ubuntu in the same harddisk(hda) as windows.
>
> After installing ubuntu, using grub legacy, I was able to log in to windows,
> using the entries, rootnoverify and chainloader +1.
>
> But when I install grub2 and then modify the grub.cfg with the following,
> statements, it is not working, says ...A disk read error occurred ,Press
> Ctrl+Alt+Del .
>
> This is my grub.cfg
>
> menuentry "Windows" {
>     set root=(hd0,3)
>     chainloader +1
>
> }
>
> My windows file sytem is in NTFS and not vfat
>
> One more thing to check with is, the need of ntfs mod present as part of
> grub2.So where exactly that is getting used,though I have tried to load the
> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
> positive results.
The FS only matters if you try to access files on the volume, but
chainloader just reads raw sectors from disk, so the FS module does
not matter: you could have an SFS partition for the sake of it and it
would work if the superblock was executable.
>
> What might be in grub2, which prevents windows to boot.
Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
MBR instead of its boot sector directly. I'll be back in town tomorrow
night and then I'll be able to look at my own GRUB config file, but
Windows has always been a wild beast to master. For the record, my
tests were with Windows XP Home in an Athlon X2 and with Windows XP
x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
my code (improbable, because it runs on QEMU) or if Windows Vista
(which has a changed boot process) works with it.
>
> Viswesh
>
>
> ________________________________
> Unlimited freedom, unlimited storage. Get it now
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
@ 2008-08-08  1:58 Viswesh S
  2008-08-08  3:43 ` Bean
  0 siblings, 1 reply; 10+ messages in thread
From: Viswesh S @ 2008-08-08  1:58 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 2672 bytes --]





----- Original Message ----
From: Javier Martín <lordhabbit@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Friday, 8 August, 2008 3:56:35 AM
Subject: Re: Windows boot

Hi again,

2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
> Hi,
>
> I installed ubuntu in the same harddisk(hda) as windows.
>
> After installing ubuntu, using grub legacy, I was able to log in to windows,
> using the entries, rootnoverify and chainloader +1.
>
> But when I install grub2 and then modify the grub.cfg with the following,
> statements, it is not working, says ...A disk read error occurred ,Press
> Ctrl+Alt+Del .
>
> This is my grub.cfg
>
> menuentry "Windows" {
>    set root=(hd0,3)
>    chainloader +1
>
> }
>
> My windows file sytem is in NTFS and not vfat
>
> One more thing to check with is, the need of ntfs mod present as part of
> grub2.So where exactly that is getting used,though I have tried to load the
> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
> positive results.
The FS only matters if you try to access files on the volume, but
chainloader just reads raw sectors from disk, so the FS module does
not matter: you could have an SFS partition for the sake of it and it
would work if the superblock was executable.
>
> What might be in grub2, which prevents windows to boot.
Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
MBR instead of its boot sector directly. I'll be back in town tomorrow
night and then I'll be able to look at my own GRUB config file, but
Windows has always been a wild beast to master. For the record, my
tests were with Windows XP Home in an Athlon X2 and with Windows XP
x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
my code (improbable, because it runs on QEMU) or if Windows Vista
(which has a changed boot process) works with it.
Hi,
Windows I am trying to boot is Windows Server 2003, but anyway that doesnt matter, as from legacy grub,I am able to boot.This makes it more interesting, as I feel we are missing some small intricacy in grub2 in this case.
Let me also have a look.
Viswesh

>
> Viswesh
>
>
> ________________________________
> Unlimited freedom, unlimited storage. Get it now
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Check out the all-new face of Yahoo! India. Go to http://in.yahoo.com/

[-- Attachment #2: Type: text/html, Size: 6007 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
  2008-08-08  1:58 Viswesh S
@ 2008-08-08  3:43 ` Bean
  0 siblings, 0 replies; 10+ messages in thread
From: Bean @ 2008-08-08  3:43 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Aug 8, 2008 at 9:58 AM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>
>
> ----- Original Message ----
> From: Javier Martín <lordhabbit@gmail.com>
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Sent: Friday, 8 August, 2008 3:56:35 AM
> Subject: Re: Windows boot
>
> Hi again,
>
> 2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
>> Hi,
>>
>> I installed ubuntu in the same harddisk(hda) as windows.
>>
>> After installing ubuntu, using grub legacy, I was able to log in to
>> windows,
>> using the entries, rootnoverify and chainloader +1.
>>
>> But when I install grub2 and then modify the grub.cfg with the following,
>> statements, it is not working, says ...A disk read error occurred ,Press
>> Ctrl+Alt+Del .
>>
>> This is my grub.cfg
>>
>> menuentry "Windows" {
>>    set root=(hd0,3)
>>    chainloader +1
>>
>> }
>>
>> My windows file sytem is in NTFS and not vfat
>>
>> One more thing to check with is, the need of ntfs mod present as part of
>> grub2.So where exactly that is getting used,though I have tried to load
>> the
>> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
>> positive results.
> The FS only matters if you try to access files on the volume, but
> chainloader just reads raw sectors from disk, so the FS module does
> not matter: you could have an SFS partition for the sake of it and it
> would work if the superblock was executable.
>>
>> What might be in grub2, which prevents windows to boot.
> Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
> MBR instead of its boot sector directly. I'll be back in town tomorrow
> night and then I'll be able to look at my own GRUB config file, but
> Windows has always been a wild beast to master. For the record, my
> tests were with Windows XP Home in an Athlon X2 and with Windows XP
> x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
> my code (improbable, because it runs on QEMU) or if Windows Vista
> (which has a changed boot process) works with it.
>
>
> Hi,
>
> Windows I am trying to boot is Windows Server 2003, but anyway that doesnt
> matter, as from legacy grub,I am able to boot.This makes it more
> interesting, as I feel we are missing some small intricacy in grub2 in this
> case.
>
> Let me also have a look.

Hi,

What's the command you use in grub legacy ?

BTW, you should know that device number of grub2 is not the same as
grub legacy, the first partition is (hd0,1) instead of (hd0,0).
Anyway, you can use ls to list the current devices.

-- 
Bean



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
@ 2008-08-08  6:22 Viswesh S
  2008-08-08  6:40 ` Bean
  0 siblings, 1 reply; 10+ messages in thread
From: Viswesh S @ 2008-08-08  6:22 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 4061 bytes --]





----- Original Message ----
From: Bean <bean123ch@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Friday, 8 August, 2008 9:13:09 AM
Subject: Re: Windows boot

On Fri, Aug 8, 2008 at 9:58 AM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>
>
> ----- Original Message ----
> From: Javier Martín <lordhabbit@gmail.com>
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Sent: Friday, 8 August, 2008 3:56:35 AM
> Subject: Re: Windows boot
>
> Hi again,
>
> 2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
>> Hi,
>>
>> I installed ubuntu in the same harddisk(hda) as windows.
>>
>> After installing ubuntu, using grub legacy, I was able to log in to
>> windows,
>> using the entries, rootnoverify and chainloader +1.
>>
>> But when I install grub2 and then modify the grub.cfg with the following,
>> statements, it is not working, says ...A disk read error occurred ,Press
>> Ctrl+Alt+Del .
>>
>> This is my grub.cfg
>>
>> menuentry "Windows" {
>>    set root=(hd0,3)
>>    chainloader +1
>>
>> }
>>
>> My windows file sytem is in NTFS and not vfat
>>
>> One more thing to check with is, the need of ntfs mod present as part of
>> grub2.So where exactly that is getting used,though I have tried to load
>> the
>> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
>> positive results.
> The FS only matters if you try to access files on the volume, but
> chainloader just reads raw sectors from disk, so the FS module does
> not matter: you could have an SFS partition for the sake of it and it
> would work if the superblock was executable.
>>
>> What might be in grub2, which prevents windows to boot.
> Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
> MBR instead of its boot sector directly. I'll be back in town tomorrow
> night and then I'll be able to look at my own GRUB config file, but
> Windows has always been a wild beast to master. For the record, my
> tests were with Windows XP Home in an Athlon X2 and with Windows XP
> x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
> my code (improbable, because it runs on QEMU) or if Windows Vista
> (which has a changed boot process) works with it.
>
>
> Hi,
>
> Windows I am trying to boot is Windows Server 2003, but anyway that doesnt
> matter, as from legacy grub,I am able to boot.This makes it more
> interesting, as I feel we are missing some small intricacy in grub2 in this
> case.
>
> Let me also have a look.

Hi,

What's the command you use in grub legacy ?

BTW, you should know that device number of grub2 is not the same as
grub legacy, the first partition is (hd0,1) instead of (hd0,0).
Anyway, you can use ls to list the current devices.

-- 
Bean

Hi,
The partition number difference I am aware of.That difference was taken into account.
In the case of grub legacy,the grub.cfg was in this way.
menuentry "Windows" {
rootnoverify
chainloader +1
}
As windows is in the 3 partition, using ls (hd0,3) I could see windows files.
so the grub.cfg 
menuentry "Win" {
chainloader (hd0,3)+1
}
(or) 
menuentry "Win" {
set root=(hd0,3)
chainloader +1
}
Tried both the combinations.But not working, getting the message ." A disk read Error occurred
                                                                                                    Press Ctrl+Alt+Del to restart.
I am not sure whether this is a filesystem issue (ntfs) which grub2 is not able to identify as such (or) Grub2 is not able to read the boot sector correctly.( As  legacy grub was able to boot quite easily the same thing)
I am badly stuck and I dont want to go back to legacy grub also.
Viswesh


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Did you know? You can CHAT without downloading messenger. Go to http://in.webmessenger.yahoo.com/

[-- Attachment #2: Type: text/html, Size: 9739 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
  2008-08-08  6:22 Viswesh S
@ 2008-08-08  6:40 ` Bean
  0 siblings, 0 replies; 10+ messages in thread
From: Bean @ 2008-08-08  6:40 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Aug 8, 2008 at 2:22 PM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>
>
> ----- Original Message ----
> From: Bean <bean123ch@gmail.com>
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Sent: Friday, 8 August, 2008 9:13:09 AM
> Subject: Re: Windows boot
>
> On Fri, Aug 8, 2008 at 9:58 AM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>>
>>
>> ----- Original Message ----
>> From: Javier Martín <lordhabbit@gmail.com>
>> To: The development of GRUB 2 <grub-devel@gnu.org>
>> Sent: Friday, 8 August, 2008 3:56:35 AM
>> Subject: Re: Windows boot
>>
>> Hi again,
>>
>> 2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
>>> Hi,
>>>
>>> I installed ubuntu in the same harddisk(hda) as windows.
>>>
>>> After installing ubuntu, using grub legacy, I was able to log in to
>>> windows,
>>> using the entries, rootnoverify and chainloader +1.
>>>
>>> But when I install grub2 and then modify the grub.cfg with the following,
>>> statements, it is not working, says ...A disk read error occurred ,Press
>>> Ctrl+Alt+Del .
>>>
>>> This is my grub.cfg
>>>
>>> menuentry "Windows" {
>>>    set root=(hd0,3)
>>>    chainloader +1
>>>
>>> }
>>>
>>> My windows file sytem is in NTFS and not vfat
>>>
>>> One more thing to check with is, the need of ntfs mod present as part of
>>> grub2.So where exactly that is getting used,though I have tried to load
>>> the
>>> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
>>> positive results.
>> The FS only matters if you try to access files on the volume, but
>> chainloader just reads raw sectors from disk, so the FS module does
>> not matter: you could have an SFS partition for the sake of it and it
>> would work if the superblock was executable.
>>>
>>> What might be in grub2, which prevents windows to boot.
>> Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
>> MBR instead of its boot sector directly. I'll be back in town tomorrow
>> night and then I'll be able to look at my own GRUB config file, but
>> Windows has always been a wild beast to master. For the record, my
>> tests were with Windows XP Home in an Athlon X2 and with Windows XP
>> x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
>> my code (improbable, because it runs on QEMU) or if Windows Vista
>> (which has a changed boot process) works with it.
>>
>>
>> Hi,
>>
>> Windows I am trying to boot is Windows Server 2003, but anyway that doesnt
>> matter, as from legacy grub,I am able to boot.This makes it more
>> interesting, as I feel we are missing some small intricacy in grub2 in
>> this
>> case.
>>
>> Let me also have a look.
>
> Hi,
>
> What's the command you use in grub legacy ?
>
> BTW, you should know that device number of grub2 is not the same as
> grub legacy, the first partition is (hd0,1) instead of (hd0,0).
> Anyway, you can use ls to list the current devices.
>
> --
> Bean
> Hi,
>
> The partition number difference I am aware of.That difference was taken into
> account.
>
> In the case of grub legacy,the grub.cfg was in this way.
>
> menuentry "Windows" {
>
> rootnoverify
> chainloader +1
> }
>
> As windows is in the 3 partition, using ls (hd0,3) I could see windows
> files.
>
> so the grub.cfg
>
> menuentry "Win" {
>
> chainloader (hd0,3)+1
> }
>
> (or)
>
> menuentry "Win" {
> set root=(hd0,3)
> chainloader +1
> }
>
> Tried both the combinations.But not working, getting the message ." A disk
> read Error occurred
>
>                         Press Ctrl+Alt+Del to restart.
>
> I am not sure whether this is a filesystem issue (ntfs) which grub2 is not
> able to identify as such (or) Grub2 is not able to read the boot sector
> correctly.( As  legacy grub was able to boot quite easily the same thing)
>
> I am badly stuck and I dont want to go back to legacy grub also.

Hi,

I think it's not related to ntfs, chainloader command read the first
sector, it doesn't matter what file system is used.

But I do remember a small issue with chainloader command of grub2, the
partition entry pointed to by %esi is not correct, I wonder if this
have something to do with your problem.

-- 
Bean



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
@ 2008-08-08  6:50 Viswesh S
  2008-08-08 10:30 ` Bean
  0 siblings, 1 reply; 10+ messages in thread
From: Viswesh S @ 2008-08-08  6:50 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 4902 bytes --]





----- Original Message ----
From: Bean <bean123ch@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Friday, 8 August, 2008 12:10:24 PM
Subject: Re: Windows boot

On Fri, Aug 8, 2008 at 2:22 PM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>
>
> ----- Original Message ----
> From: Bean <bean123ch@gmail.com>
> To: The development of GRUB 2 <grub-devel@gnu.org>
> Sent: Friday, 8 August, 2008 9:13:09 AM
> Subject: Re: Windows boot
>
> On Fri, Aug 8, 2008 at 9:58 AM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
>>
>>
>> ----- Original Message ----
>> From: Javier Martín <lordhabbit@gmail.com>
>> To: The development of GRUB 2 <grub-devel@gnu.org>
>> Sent: Friday, 8 August, 2008 3:56:35 AM
>> Subject: Re: Windows boot
>>
>> Hi again,
>>
>> 2008/8/7 Viswesh S <viswesh_vichu@yahoo.com>:
>>> Hi,
>>>
>>> I installed ubuntu in the same harddisk(hda) as windows.
>>>
>>> After installing ubuntu, using grub legacy, I was able to log in to
>>> windows,
>>> using the entries, rootnoverify and chainloader +1.
>>>
>>> But when I install grub2 and then modify the grub.cfg with the following,
>>> statements, it is not working, says ...A disk read error occurred ,Press
>>> Ctrl+Alt+Del .
>>>
>>> This is my grub.cfg
>>>
>>> menuentry "Windows" {
>>>    set root=(hd0,3)
>>>    chainloader +1
>>>
>>> }
>>>
>>> My windows file sytem is in NTFS and not vfat
>>>
>>> One more thing to check with is, the need of ntfs mod present as part of
>>> grub2.So where exactly that is getting used,though I have tried to load
>>> the
>>> module ntfs and ntfscomp in grub using insmod in grub menu,...but no
>>> positive results.
>> The FS only matters if you try to access files on the volume, but
>> chainloader just reads raw sectors from disk, so the FS module does
>> not matter: you could have an SFS partition for the sake of it and it
>> would work if the superblock was executable.
>>>
>>> What might be in grub2, which prevents windows to boot.
>> Hmm... you could try booting (hd1) instead of (hd1,1), i.e. Windows'
>> MBR instead of its boot sector directly. I'll be back in town tomorrow
>> night and then I'll be able to look at my own GRUB config file, but
>> Windows has always been a wild beast to master. For the record, my
>> tests were with Windows XP Home in an Athlon X2 and with Windows XP
>> x64 on an Athlon 64. Thus, I don't know if Intel CPUs triple-fault on
>> my code (improbable, because it runs on QEMU) or if Windows Vista
>> (which has a changed boot process) works with it.
>>
>>
>> Hi,
>>
>> Windows I am trying to boot is Windows Server 2003, but anyway that doesnt
>> matter, as from legacy grub,I am able to boot.This makes it more
>> interesting, as I feel we are missing some small intricacy in grub2 in
>> this
>> case.
>>
>> Let me also have a look.
>
> Hi,
>
> What's the command you use in grub legacy ?
>
> BTW, you should know that device number of grub2 is not the same as
> grub legacy, the first partition is (hd0,1) instead of (hd0,0).
> Anyway, you can use ls to list the current devices.
>
> --
> Bean
> Hi,
>
> The partition number difference I am aware of.That difference was taken into
> account.
>
> In the case of grub legacy,the grub.cfg was in this way.
>
> menuentry "Windows" {
>
> rootnoverify
> chainloader +1
> }
>
> As windows is in the 3 partition, using ls (hd0,3) I could see windows
> files.
>
> so the grub.cfg
>
> menuentry "Win" {
>
> chainloader (hd0,3)+1
> }
>
> (or)
>
> menuentry "Win" {
> set root=(hd0,3)
> chainloader +1
> }
>
> Tried both the combinations.But not working, getting the message ." A disk
> read Error occurred
>
>                        Press Ctrl+Alt+Del to restart.
>
> I am not sure whether this is a filesystem issue (ntfs) which grub2 is not
> able to identify as such (or) Grub2 is not able to read the boot sector
> correctly.( As  legacy grub was able to boot quite easily the same thing)
>
> I am badly stuck and I dont want to go back to legacy grub also.

Hi,

I think it's not related to ntfs, chainloader command read the first
sector, it doesn't matter what file system is used.

But I do remember a small issue with chainloader command of grub2, the
partition entry pointed to by %esi is not correct, I wonder if this
have something to do with your problem.

Hi,
Thanks,let me have a look at the chainloader command in grub2 and in legacy grub.
Could you let me know the issue which you faced in the chainloader command.
Viswesh

-- 
Bean



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[-- Attachment #2: Type: text/html, Size: 8604 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
  2008-08-08  6:50 Viswesh S
@ 2008-08-08 10:30 ` Bean
  0 siblings, 0 replies; 10+ messages in thread
From: Bean @ 2008-08-08 10:30 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Aug 8, 2008 at 2:50 PM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
> Hi,
>
> Thanks,let me have a look at the chainloader command in grub2 and in legacy
> grub.
>
> Could you let me know the issue which you faced in the chainloader command.

Hi,

The problem is in loader/i386/pc/chainloader.c (grub_chainloader_cmd):

  /* Obtain the partition table from the root device.  */
  dev = grub_device_open (0);
  if (dev)
    {
      grub_disk_t disk = dev->disk;

      if (disk)
	{
	  grub_partition_t p = disk->partition;
	
	  /* In i386-pc, the id is equal to the BIOS drive number.  */
	  drive = (int) disk->id;

	  if (p)
	    {
	      grub_disk_read (disk, p->offset, 446, 64,
			      (char *) GRUB_MEMORY_MACHINE_PART_TABLE_ADDR);
	      part_addr = (void *) (GRUB_MEMORY_MACHINE_PART_TABLE_ADDR
				    + (p->index << 4));
	    }
	}

      grub_device_close (dev);
    }

p->offset is the offset of the start of the partition, but actually,
we need to read the sector that contain the partition table, which is
the mbr for primary. But replace p->offset with 0 doesn't fix this, as
grub_disk_read is related to the beginning of partition, not the disk.
You need to use the low level api:

disk->dev->read (disk, 0, 1, (char *) GRUB_MEMORY_MACHINE_PART_TABLE_ADDR);

But this fix only apply to primary partition, for logical partition,
the partition table is not in mbr, and this quick patch doesn't work.
But I remember someone send a patch to allow for loading of syslinux
in logical partition, you can search the list if you're interested.

BTW, if this doesn't work, you can try loadbin. It can be used to
chainload ntldr/bootmgr directly.

-- 
Bean



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
@ 2008-08-11  2:48 Viswesh S
  2008-08-11  4:15 ` Bean
  0 siblings, 1 reply; 10+ messages in thread
From: Viswesh S @ 2008-08-11  2:48 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 2852 bytes --]





----- Original Message ----
From: Bean <bean123ch@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Sent: Friday, 8 August, 2008 4:00:41 PM
Subject: Re: Windows boot

On Fri, Aug 8, 2008 at 2:50 PM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
> Hi,
>
> Thanks,let me have a look at the chainloader command in grub2 and in legacy
> grub.
>
> Could you let me know the issue which you faced in the chainloader command.

Hi,

The problem is in loader/i386/pc/chainloader.c (grub_chainloader_cmd):

  /* Obtain the partition table from the root device.  */
  dev = grub_device_open (0);
  if (dev)
    {
      grub_disk_t disk = dev->disk;

      if (disk)
    {
      grub_partition_t p = disk->partition;
    
      /* In i386-pc, the id is equal to the BIOS drive number.  */
      drive = (int) disk->id;

      if (p)
        {
          grub_disk_read (disk, p->offset, 446, 64,
                  (char *) GRUB_MEMORY_MACHINE_PART_TABLE_ADDR);
          part_addr = (void *) (GRUB_MEMORY_MACHINE_PART_TABLE_ADDR
                    + (p->index << 4));
        }
    }

      grub_device_close (dev);
    }

p->offset is the offset of the start of the partition, but actually,
we need to read the sector that contain the partition table, which is
the mbr for primary. But replace p->offset with 0 doesn't fix this, as
grub_disk_read is related to the beginning of partition, not the disk.
You need to use the low level api:

disk->dev->read (disk, 0, 1, (char *) GRUB_MEMORY_MACHINE_PART_TABLE_ADDR);

But this fix only apply to primary partition, for logical partition,
the partition table is not in mbr, and this quick patch doesn't work.
But I remember someone send a patch to allow for loading of syslinux
in logical partition, you can search the list if you're interested.

BTW, if this doesn't work, you can try loadbin. It can be used to
chainload ntldr/bootmgr directly.

Hi,
I tried the loadbin,according to the instructions which you had given in osdir.com
" 
linux loadbin.bin
initrd ntldr

This method is not limited to grub2, it can also be used in boot
loaders which support the linux kernel format, such as
syslinux/lilo/grub.

To compile loadbin.bin, use the following commands:

gcc -nostdlib -DLOADBIN -Wl,-N -o lnxhdr lnxhdr.S
objcopy -O binary lnxhdr lnxhdr.bin
"
Are you sure, this is the procedure ? Dont we need to generate loadbin ?
Could you please confirm ?
Regards,
Viswesh

-- 
Bean


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



      Add more friends to your messenger and enjoy! Go to http://in.messenger.yahoo.com/invite/

[-- Attachment #2: Type: text/html, Size: 7190 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Windows boot
  2008-08-11  2:48 Windows boot Viswesh S
@ 2008-08-11  4:15 ` Bean
  0 siblings, 0 replies; 10+ messages in thread
From: Bean @ 2008-08-11  4:15 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, Aug 11, 2008 at 10:48 AM, Viswesh S <viswesh_vichu@yahoo.com> wrote:
> Hi,
>
> I tried the loadbin,according to the instructions which you had given in
> osdir.com
>
> "
> linux loadbin.bin
> initrd ntldr
>
> This method is not limited to grub2, it can also be used in boot
> loaders which support the linux kernel format, such as
> syslinux/lilo/grub.
>
> To compile loadbin.bin, use the following commands:
>
> gcc -nostdlib -DLOADBIN -Wl,-N -o lnxhdr lnxhdr.S
> objcopy -O binary lnxhdr lnxhdr.bin
> "
>
> Are you sure, this is the procedure ? Dont we need to generate loadbin ?
>
> Could you please confirm ?

Hi,

You don't need to do this manually, just download the latest version
from http://download.gna.org/grubutil/, then use make to compile it.

-- 
Bean



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-08-11  4:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-11  2:48 Windows boot Viswesh S
2008-08-11  4:15 ` Bean
  -- strict thread matches above, loose matches on Subject: below --
2008-08-08  6:50 Viswesh S
2008-08-08 10:30 ` Bean
2008-08-08  6:22 Viswesh S
2008-08-08  6:40 ` Bean
2008-08-08  1:58 Viswesh S
2008-08-08  3:43 ` Bean
2008-08-07 14:30 Viswesh S
2008-08-07 22:26 ` Javier Martín

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.