GRUB2 and Windows

Hi all,
I took a leap of faith (or folly, yet to be seen) and installed
grub2. I did this in an attempt to move from Lilo to Grub (as I prefer
grub). However, I didn't realize that Grub2 is vastly different! It
seems to be installed correctly as I have a grub.cfg file that looks
correct for booting all of my Linux kernel images. What I don't have
though is an entry for WindowsXP. How do I add this entry? Can grub
find it automatically?

I haven't rebooted yet to test whether it works or not, and I'm a
little leery in doing so until I have an entry for WindowsXP.

Thanks!

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

GRUB2 and Windows

> I took a leap of faith (or folly, yet to be seen) and installed
> grub2. I did this in an attempt to move from Lilo to Grub (as I prefer
> grub). However, I didn't realize that Grub2 is vastly different! It
> seems to be installed correctly as I have a grub.cfg file that looks
> correct for booting all of my Linux kernel images. What I don't have
> though is an entry for WindowsXP. How do I add this entry? Can grub
> find it automatically?

I don't what's the current status, but I know that grub2's support for
booting things like Windows was somewhere between lacking and partly working
at some point in the past (a year maybe?).

Stefan

--

GRUB2 and Windows

On 7/19/07, Stefan Monnier wrote:
> > I took a leap of faith (or folly, yet to be seen) and installed
> > grub2. I did this in an attempt to move from Lilo to Grub (as I prefer
> > grub). However, I didn't realize that Grub2 is vastly different! It
> > seems to be installed correctly as I have a grub.cfg file that looks
> > correct for booting all of my Linux kernel images. What I don't have
> > though is an entry for WindowsXP. How do I add this entry? Can grub
> > find it automatically?
>
> I don't what's the current status, but I know that grub2's support for
> booting things like Windows was somewhere between lacking and partly working
> at some point in the past (a year maybe?).
>
>
> Stefan

Well, I'm using debian unstable, and with the latest version of grub2
I can boot windows XP. However, it's not automatically. Apparently
there's a bug in grub itself which doesn't allow setting a global root
directory, and then try to set a different one in the menu entry.
Nice thing is that on unstable the menus are generated by scripts in
/etc/grub.d.

So 1st thing is to comment the following lines out, as shown bellow:

#if [ "x${GRUB_DRIVE}" = "x" ] ; then : ; else
# echo "set root=${GRUB_DRIVE}"
#fi

>From /etc/grub.d/00_header. The 2nd thing is to add a script for the
windows XP, which is not included by default, I named it
/etc/grub.d/10_windows. The scripts are looked up by alphanumeric
order I believe.

I'm attaching both files for your consideration. I don't know if a
bug needs to be filed, because I don't really know if grub needs to be
fixed for the root thing, or if it's just debian script which is
wrong. At any rate I found the work around I needed...

I hope this helps...

--
Javier

GRUB2 and Windows

On Thu, 19 Jul 2007 13:16:27 -0600
"Javier Vasquez" wrote:

> On 7/19/07, Stefan Monnier wrote:
> > > I took a leap of faith (or folly, yet to be seen) and
> > > installed grub2. I did this in an attempt to move from Lilo to
> > > Grub (as I prefer grub). However, I didn't realize that Grub2 is
> > > vastly different! It seems to be installed correctly as I have a
> > > grub.cfg file that looks correct for booting all of my Linux
> > > kernel images. What I don't have though is an entry for
> > > WindowsXP. How do I add this entry? Can grub find it
> > > automatically?
> >
> > I don't what's the current status, but I know that grub2's support
> > for booting things like Windows was somewhere between lacking and
> > partly working at some point in the past (a year maybe?).
> >
> >
> > Stefan
>
> Well, I'm using debian unstable, and with the latest version of grub2
> I can boot windows XP. However, it's not automatically. Apparently
> there's a bug in grub itself which doesn't allow setting a global root
> directory, and then try to set a different one in the menu entry.
> Nice thing is that on unstable the menus are generated by scripts in
> /etc/grub.d.
>
> So 1st thing is to comment the following lines out, as shown bellow:
>
> #if [ "x${GRUB_DRIVE}" = "x" ] ; then : ; else
> # echo "set root=${GRUB_DRIVE}"
> #fi
>
> >From /etc/grub.d/00_header. The 2nd thing is to add a script for the
> windows XP, which is not included by default, I named it
> /etc/grub.d/10_windows. The scripts are looked up by alphanumeric
> order I believe.
>
> I'm attaching both files for your consideration. I don't know if a
> bug needs to be filed, because I don't really know if grub needs to be
> fixed for the root thing, or if it's just debian script which is
> wrong. At any rate I found the work around I needed...
>
> I hope this helps...

This looks to be exactly the solution I was looking for. I'll see you
after a reboot (Hopefully!).

Thanks a bunch!

>
>

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

--

GRUB2 and Windows

On Thu, 19 Jul 2007 13:16:27 -0600
"Javier Vasquez" wrote:

> On 7/19/07, Stefan Monnier wrote:
> > > I took a leap of faith (or folly, yet to be seen) and
> > > installed grub2. I did this in an attempt to move from Lilo to
> > > Grub (as I prefer grub). However, I didn't realize that Grub2 is
> > > vastly different! It seems to be installed correctly as I have a
> > > grub.cfg file that looks correct for booting all of my Linux
> > > kernel images. What I don't have though is an entry for
> > > WindowsXP. How do I add this entry? Can grub find it
> > > automatically?
> >
> > I don't what's the current status, but I know that grub2's support
> > for booting things like Windows was somewhere between lacking and
> > partly working at some point in the past (a year maybe?).
> >
> >
> > Stefan
>
> Well, I'm using debian unstable, and with the latest version of grub2
> I can boot windows XP. However, it's not automatically. Apparently
> there's a bug in grub itself which doesn't allow setting a global root
> directory, and then try to set a different one in the menu entry.
> Nice thing is that on unstable the menus are generated by scripts in
> /etc/grub.d.
>
> So 1st thing is to comment the following lines out, as shown bellow:
>
> #if [ "x${GRUB_DRIVE}" = "x" ] ; then : ; else
> # echo "set root=${GRUB_DRIVE}"
> #fi
>
> >From /etc/grub.d/00_header. The 2nd thing is to add a script for the
> windows XP, which is not included by default, I named it
> /etc/grub.d/10_windows. The scripts are looked up by alphanumeric
> order I believe.
>
> I'm attaching both files for your consideration. I don't know if a
> bug needs to be filed, because I don't really know if grub needs to be
> fixed for the root thing, or if it's just debian script which is
> wrong. At any rate I found the work around I needed...
>
> I hope this helps...
>
>

I think it's on the right track, but I seem to still have a problem.
When I select Windows in list I get sent back to the Grub menu. Any
ideas on why or where to look for a clue?

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

--

GRUB2 and Windows

On 7/19/07, Travis Crook wrote:
> On Thu, 19 Jul 2007 13:16:27 -0600
> "Javier Vasquez" wrote:
>
> > On 7/19/07, Stefan Monnier wrote:
> > > > I took a leap of faith (or folly, yet to be seen) and
> > > > installed grub2. I did this in an attempt to move from Lilo to
> > > > Grub (as I prefer grub). However, I didn't realize that Grub2 is
> > > > vastly different! It seems to be installed correctly as I have a
> > > > grub.cfg file that looks correct for booting all of my Linux
> > > > kernel images. What I don't have though is an entry for
> > > > WindowsXP. How do I add this entry? Can grub find it
> > > > automatically?
> > >
> > > I don't what's the current status, but I know that grub2's support
> > > for booting things like Windows was somewhere between lacking and
> > > partly working at some point in the past (a year maybe?).
> > >
> > >
> > > Stefan
> >
> > Well, I'm using debian unstable, and with the latest version of grub2
> > I can boot windows XP. However, it's not automatically. Apparently
> > there's a bug in grub itself which doesn't allow setting a global root
> > directory, and then try to set a different one in the menu entry.
> > Nice thing is that on unstable the menus are generated by scripts in
> > /etc/grub.d.
> >
> > So 1st thing is to comment the following lines out, as shown bellow:
> >
> > #if [ "x${GRUB_DRIVE}" = "x" ] ; then : ; else
> > # echo "set root=${GRUB_DRIVE}"
> > #fi
> >
> > >From /etc/grub.d/00_header. The 2nd thing is to add a script for the
> > windows XP, which is not included by default, I named it
> > /etc/grub.d/10_windows. The scripts are looked up by alphanumeric
> > order I believe.
> >
> > I'm attaching both files for your consideration. I don't know if a
> > bug needs to be filed, because I don't really know if grub needs to be
> > fixed for the root thing, or if it's just debian script which is
> > wrong. At any rate I found the work around I needed...
> >
> > I hope this helps...
> >
> >
>
> I think it's on the right track, but I seem to still have a problem.
> When I select Windows in list I get sent back to the Grub menu. Any
> ideas on why or where to look for a clue?
>
>
>
> --
> Travis Crook
> Visions Beyond
> www.VisionsBeyond.com
> 208-478-7836

If you modified the header script, then I'm kind of clueless, becasue
that was affecting me big time, and after removing such thing
everything went OK when performing update-grub (still the same command
to regenerate the menu, now grub.conf).

Now the other thing... Grub 2 now went back to partitions starting at
1 instead of 0. In my case the windows partition is the 2nd primary
one, because the 1st one is used by the hibernation raw dell
partition. So in my case the windows partition is 2 for grub as well.
If windows were placed in the 1st partition, then the partition
number for grub should be 1 instead. The later is the most common
configuration, having windows as the main 1st partition. The devices
kept the same numbering though, so the master disk will be ususally
hd0...

The failure most likely indicates your suffering from partition
numbering. But 1st make sure you took care of the root thing...

--
Javier

--

GRUB2 and Windows

On Thu, 19 Jul 2007 15:16:06 -0600
"Javier Vasquez" wrote:

> On 7/19/07, Travis Crook wrote:
> > On Thu, 19 Jul 2007 13:16:27 -0600
> > "Javier Vasquez" wrote:
> >
>
> If you modified the header script, then I'm kind of clueless, becasue
> that was affecting me big time, and after removing such thing
> everything went OK when performing update-grub (still the same command
> to regenerate the menu, now grub.conf).
>
> Now the other thing... Grub 2 now went back to partitions starting at
> 1 instead of 0. In my case the windows partition is the 2nd primary
> one, because the 1st one is used by the hibernation raw dell
> partition. So in my case the windows partition is 2 for grub as well.
> If windows were placed in the 1st partition, then the partition
> number for grub should be 1 instead. The later is the most common
> configuration, having windows as the main 1st partition. The devices
> kept the same numbering though, so the master disk will be ususally
> hd0...
>
> The failure most likely indicates your suffering from partition
> numbering. But 1st make sure you took care of the root thing...
>

I have tried several different partition numbers, especially 1 since
that is the partition that Windows resides on. I'll attach my files so
you can see if I'm missing something.

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

GRUB2 and Windows

On Thu, 19 Jul 2007 15:39:36 -0600
Travis Crook wrote:

> On Thu, 19 Jul 2007 15:16:06 -0600
> "Javier Vasquez" wrote:
>
> > On 7/19/07, Travis Crook wrote:
> > > On Thu, 19 Jul 2007 13:16:27 -0600
> > > "Javier Vasquez" wrote:
> > >
> >
> > If you modified the header script, then I'm kind of clueless,
> > becasue that was affecting me big time, and after removing such
> > thing everything went OK when performing update-grub (still the
> > same command to regenerate the menu, now grub.conf).
> >
> > Now the other thing... Grub 2 now went back to partitions starting
> > at 1 instead of 0. In my case the windows partition is the 2nd
> > primary one, because the 1st one is used by the hibernation raw dell
> > partition. So in my case the windows partition is 2 for grub as
> > well. If windows were placed in the 1st partition, then the
> > partition number for grub should be 1 instead. The later is the
> > most common configuration, having windows as the main 1st
> > partition. The devices kept the same numbering though, so the
> > master disk will be ususally hd0...
> >
> > The failure most likely indicates your suffering from partition
> > numbering. But 1st make sure you took care of the root thing...
> >
>
> I have tried several different partition numbers, especially 1 since
> that is the partition that Windows resides on. I'll attach my files
> so you can see if I'm missing something.

Maybe something else to think about is that I'm currently running
Lenny, but added repositories for Sid to update Grub2 (only).
>
>
>
>

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

--

GRUB2 and Windows

On 7/19/07, Travis Crook wrote:
> On Thu, 19 Jul 2007 15:39:36 -0600
> Travis Crook wrote:
>
> > On Thu, 19 Jul 2007 15:16:06 -0600
> > "Javier Vasquez" wrote:
> >
> > > On 7/19/07, Travis Crook wrote:
> > > > On Thu, 19 Jul 2007 13:16:27 -0600
> > > > "Javier Vasquez" wrote:
> > > >
> > >
> > > If you modified the header script, then I'm kind of clueless,
> > > becasue that was affecting me big time, and after removing such
> > > thing everything went OK when performing update-grub (still the
> > > same command to regenerate the menu, now grub.conf).
> > >
> > > Now the other thing... Grub 2 now went back to partitions starting
> > > at 1 instead of 0. In my case the windows partition is the 2nd
> > > primary one, because the 1st one is used by the hibernation raw dell
> > > partition. So in my case the windows partition is 2 for grub as
> > > well. If windows were placed in the 1st partition, then the
> > > partition number for grub should be 1 instead. The later is the
> > > most common configuration, having windows as the main 1st
> > > partition. The devices kept the same numbering though, so the
> > > master disk will be ususally hd0...
> > >
> > > The failure most likely indicates your suffering from partition
> > > numbering. But 1st make sure you took care of the root thing...
> > >
> >
> > I have tried several different partition numbers, especially 1 since
> > that is the partition that Windows resides on. I'll attach my files
> > so you can see if I'm missing something.
>
>
> Maybe something else to think about is that I'm currently running
> Lenny, but added repositories for Sid to update Grub2 (only).
> >
>
> --
> Travis Crook
> Visions Beyond
> www.VisionsBeyond.com
> 208-478-7836
>

Hmm,

The numbering is OK, it should be 1, if your windows partition is the
1st primary one.

The only thing I can think of, is that I'm running on intel, and
you're running on amd apparently. I imagine the binaries are
different, but beyond that the versions seem OK [1] [2]. But that's
my last desperate guess. Maybe someone else might try to provide
input for either processor, and confirm is things work for him/her. I
can just confirm things work for me with the work around indicated...

[1] http://packages.debian.org/cgi-bin/search_packages.pl?keywords=grub&searchon=names&subword=1&version=unstable&release=all
[2] http://packages.debian.org/unstable/admin/grub-pc

--
Javier

--

GRUB2 and Windows

On Thu, 19 Jul 2007 16:01:50 -0600
"Javier Vasquez" wrote:

> On 7/19/07, Travis Crook wrote:
> > On Thu, 19 Jul 2007 15:39:36 -0600
> > Travis Crook wrote:
> >
> > > On Thu, 19 Jul 2007 15:16:06 -0600
> > > "Javier Vasquez" wrote:
> > >
> > > > On 7/19/07, Travis Crook wrote:
> > > > > On Thu, 19 Jul 2007 13:16:27 -0600
> > > > > "Javier Vasquez" wrote:
> > > > >
> > > >
> > > > If you modified the header script, then I'm kind of clueless,
> > > > becasue that was affecting me big time, and after removing such
> > > > thing everything went OK when performing update-grub (still the
> > > > same command to regenerate the menu, now grub.conf).
> > > >
> > > > Now the other thing... Grub 2 now went back to partitions
> > > > starting at 1 instead of 0. In my case the windows partition
> > > > is the 2nd primary one, because the 1st one is used by the
> > > > hibernation raw dell partition. So in my case the windows
> > > > partition is 2 for grub as well. If windows were placed in the
> > > > 1st partition, then the partition number for grub should be 1
> > > > instead. The later is the most common configuration, having
> > > > windows as the main 1st partition. The devices kept the same
> > > > numbering though, so the master disk will be ususally hd0...
> > > >
> > > > The failure most likely indicates your suffering from partition
> > > > numbering. But 1st make sure you took care of the root thing...
> > > >
> > >
> > > I have tried several different partition numbers, especially 1
> > > since that is the partition that Windows resides on. I'll attach
> > > my files so you can see if I'm missing something.
> >
> >
> > Maybe something else to think about is that I'm currently running
> > Lenny, but added repositories for Sid to update Grub2 (only).
> > >
> >
> > --
> > Travis Crook
> > Visions Beyond
> > www.VisionsBeyond.com
> > 208-478-7836
> >
>
> Hmm,
>
> The numbering is OK, it should be 1, if your windows partition is the
> 1st primary one.
>
> The only thing I can think of, is that I'm running on intel, and
> you're running on amd apparently. I imagine the binaries are
> different, but beyond that the versions seem OK [1] [2]. But that's
> my last desperate guess. Maybe someone else might try to provide
> input for either processor, and confirm is things work for him/her. I
> can just confirm things work for me with the work around indicated...
>
> [1]
> http://packages.debian.org/cgi-bin/search_packages.pl?keywords=grub&searchon=names&subword=1&version=unstable&release=all
> [2] http://packages.debian.org/unstable/admin/grub-pc

Okay, thanks a bunch! This at least gets me going in the right
direction.
>

--
Travis Crook
Visions Beyond
www.VisionsBeyond.com
208-478-7836

--

GRUB2 and Windows

On 7/19/07, Travis Crook wrote:
> On Thu, 19 Jul 2007 16:01:50 -0600
> "Javier Vasquez" wrote:
>
> > On 7/19/07, Travis Crook wrote:
> > > On Thu, 19 Jul 2007 15:39:36 -0600
> > > Travis Crook wrote:
> > >
> > > > On Thu, 19 Jul 2007 15:16:06 -0600
> > > > "Javier Vasquez" wrote:
> > > >
> > > > > On 7/19/07, Travis Crook wrote:
> > > > > > On Thu, 19 Jul 2007 13:16:27 -0600
> > > > > > "Javier Vasquez" wrote:
> > > > > >
> > > > >
> > > > > If you modified the header script, then I'm kind of clueless,
> > > > > becasue that was affecting me big time, and after removing such
> > > > > thing everything went OK when performing update-grub (still the
> > > > > same command to regenerate the menu, now grub.conf).
> > > > >
> > > > > Now the other thing... Grub 2 now went back to partitions
> > > > > starting at 1 instead of 0. In my case the windows partition
> > > > > is the 2nd primary one, because the 1st one is used by the
> > > > > hibernation raw dell partition. So in my case the windows
> > > > > partition is 2 for grub as well. If windows were placed in the
> > > > > 1st partition, then the partition number for grub should be 1
> > > > > instead. The later is the most common configuration, having
> > > > > windows as the main 1st partition. The devices kept the same
> > > > > numbering though, so the master disk will be ususally hd0...
> > > > >
> > > > > The failure most likely indicates your suffering from partition
> > > > > numbering. But 1st make sure you took care of the root thing...
> > > > >
> > > >
> > > > I have tried several different partition numbers, especially 1
> > > > since that is the partition that Windows resides on. I'll attach
> > > > my files so you can see if I'm missing something.
> > >
> > >
> > > Maybe something else to think about is that I'm currently running
> > > Lenny, but added repositories for Sid to update Grub2 (only).
> > > >
> > >
> > > --
> > > Travis Crook
> > > Visions Beyond
> > > www.VisionsBeyond.com
> > > 208-478-7836
> > >
> >
> > Hmm,
> >
> > The numbering is OK, it should be 1, if your windows partition is the
> > 1st primary one.
> >
> > The only thing I can think of, is that I'm running on intel, and
> > you're running on amd apparently. I imagine the binaries are
> > different, but beyond that the versions seem OK [1] [2]. But that's
> > my last desperate guess. Maybe someone else might try to provide
> > input for either processor, and confirm is things work for him/her. I
> > can just confirm things work for me with the work around indicated...
> >
> > [1]
> > http://packages.debian.org/cgi-bin/search_packages.pl?keywords=grub&searchon=names&subword=1&version=unstable&release=all
> > [2] http://packages.debian.org/unstable/admin/grub-pc
>
> Okay, thanks a bunch! This at least gets me going in the right
> direction.
> >
>
>
> --
> Travis Crook
> Visions Beyond
> www.VisionsBeyond.com
> 208-478-7836

As a last thing, see my last e-mail I sent (apparently yours got the
list 1st). I suggest moving the grub directory somewhere not in
/boot, and perform grub-install with the right parameters, so that you
get clean new grub stuff generated, then of course update-grub to get
the menu, :). Just my last suggestion, :).

--
Javier

--

GRUB2 and Windows

On 7/19/07, Javier Vasquez wrote:
> On 7/19/07, Travis Crook wrote:
> > On Thu, 19 Jul 2007 15:39:36 -0600
> > Travis Crook wrote:
> >
> > > On Thu, 19 Jul 2007 15:16:06 -0600
> > > "Javier Vasquez" wrote:
> > >
> > > > On 7/19/07, Travis Crook wrote:
> > > > > On Thu, 19 Jul 2007 13:16:27 -0600
> > > > > "Javier Vasquez" wrote:
> > > > >
> > > >
> > > > If you modified the header script, then I'm kind of clueless,
> > > > becasue that was affecting me big time, and after removing such
> > > > thing everything went OK when performing update-grub (still the
> > > > same command to regenerate the menu, now grub.conf).
> > > >
> > > > Now the other thing... Grub 2 now went back to partitions starting
> > > > at 1 instead of 0. In my case the windows partition is the 2nd
> > > > primary one, because the 1st one is used by the hibernation raw dell
> > > > partition. So in my case the windows partition is 2 for grub as
> > > > well. If windows were placed in the 1st partition, then the
> > > > partition number for grub should be 1 instead. The later is the
> > > > most common configuration, having windows as the main 1st
> > > > partition. The devices kept the same numbering though, so the
> > > > master disk will be ususally hd0...
> > > >
> > > > The failure most likely indicates your suffering from partition
> > > > numbering. But 1st make sure you took care of the root thing...
> > > >
> > >
> > > I have tried several different partition numbers, especially 1 since
> > > that is the partition that Windows resides on. I'll attach my files
> > > so you can see if I'm missing something.
> >
> >
> > Maybe something else to think about is that I'm currently running
> > Lenny, but added repositories for Sid to update Grub2 (only).
> > >
> >
> > --
> > Travis Crook
> > Visions Beyond
> > www.VisionsBeyond.com
> > 208-478-7836
> >
>
> Hmm,
>
> The numbering is OK, it should be 1, if your windows partition is the
> 1st primary one.
>
> The only thing I can think of, is that I'm running on intel, and
> you're running on amd apparently. I imagine the binaries are
> different, but beyond that the versions seem OK [1] [2]. But that's
> my last desperate guess. Maybe someone else might try to provide
> input for either processor, and confirm is things work for him/her. I
> can just confirm things work for me with the work around indicated...
>
> [1] http://packages.debian.org/cgi-bin/search_packages.pl?keywords=grub&searchon=names&subword=1&version=unstable&release=all
> [2] http://packages.debian.org/unstable/admin/grub-pc

I forgot to mention that I moved the original grub directory from
/boot, somewhere else (didn't just removed it in case something goes
wrong). Then I performed a clean grub-install. The reasons I did
this was that I noticed a grub version change, and I always do that to
avoid old stuff getting in the way. You can try that as well (at this
point I don't see why not trying)... Still maybe some other guys can
report their experiences, :).

--
Javier

--

Re: GRUB2 and Windows

Hi guys,

I'm currently looking to get my xp partition bootable too. I was wondering if it would be possible to repost those two files as I can't seem to see them in this thread anymore (or I'm totally blind...)

Edit :

Found them here :

http://linux.derkeiler.com/Mailing-Lists/Debian/2007-07/msg01789.html

Cheers,

Fred.

Re: GRUB2 and Windows

OK, guys, the way to get XP happening is to do this following :

apt-get install os-prober

I think it should be a dependency for grub2...

Fred.

Syndicate content