help getting grub to see Windows 7 on second drive



Dear Debian Folks,

I think this query is better sent to this list not debian amd64 so I
have relayed it here.....

I run Lenny AMD64 on an AMD64 box with 8GB RAM and have two SATA
drives. The first drive has the Lenny on it. I installed the other
drive the other day so I could put Windows 7 on it that I need for
some numerical integration calculations.

I am trying to avoid reinstalling the Debian if I can but dual booting
the two Oses e.g. using Grub in some way......

I tried installing the Windows on the new disk but it wouldn't install
with the first drive present. It said it couldn't create or locate an
existing partition or something..... The cure here according to
Windows folks seemed to be to disconnect the other drive (with the
Linux on it) from the motherboard and then reboot and install the
Windows.

This worked a treat. It couldn't see the other drive with the funny
primary logical partition and swap space (to Windows but not to Linux
folks) because it wasn't there..... It just saw one lonely
unformatted unallocated unused SATA drive and installed itself on it.
It was simple enough that it went for it without grumbling.

After I finished the installation, I then rebooted the machine after
reconnecting the other hard drive with Debian on it to the
motherboard. I then rebooted the PC to find out what on earth would
happen then........ (brave eh?!! maybe just foolhardy.....)

Then the PC rebooted and Grub fired up and only saw the first drive
(sda) and Debian booted up just fine. I didn't look like grub had
seen the new drive with the Windows on it. (I had actually run the
Debian installer the other day just to see if it could detect the new
drive and it did do - so grub should have no problem booting it
providing I can encourage it to notice it a little bit but I'm not
quite sure how to get it do that just yet).

I have a feeling that if it could see the other drive it might end up
being known as /dev/sdb etc.....

But it needs a bit of a stage prompt here..... Can anyone suggest a
way to get grub to see the new drive and the Windows? I could try
mounting the Windows drive onto the Linux file tree..... Would that
encourage grub to see it on a reboot and allow me the option of
booting the Windows OS itself?

I looked around on google and read a few suggestions in this area and
wondered if I couldn't put something like this into the grub menu file
(by the way in what directory does the grub menu file live?) :

title Windows 7
map (sd0) (sd1)
map (sd1) (sd1)
rootnoverify (sd 0,0)
chainloader +1

I am not exactly sure if that would work or precisely what it does but
would it be helpful here?

Would it be helpful if I ran /sbin/grub-install --recheck

Suggestions welcome. If this works, then it could be a general way to
allow people to install Linux first, not Windows and not have to
reinstall the Linux to get grub to work or use e.g. EasyBCD or
Partition Magic on Windows to get a dual boot set up to fire up the
unreinstalled Linux from Windows and not use grub from then on etc.
What you want to be able to do is to start with Linux and Grub, add
the Windows and then get Grub to see both and give you the choice of
which to fire up. Then if you have to use Windows (I can't get around
this), Linux and grub are still taking precedence.

Regards

Michael Fothergill
















Date: Wed, 8 Dec 2010 09:58:43 -0200
From: eduardo@xxxxxxxxxxxxxxxxx
To: debian-amd64@xxxxxxxxxxxxxxxx
Subject: Re: dumb question about dual booting debian and Windows 7 on separate drives.....

There's nothing amd64 specific in this question, debian-user would
have been better.

On Qua, 08 Dez 2010, Michael Fothergill wrote:
I bought an extra SATA drive and hooked it up so now I have two one
with Debian on it. My plan is to install Windows on the new
drive...... If you installed Windows on the new drive and then
installed Debian grub would see the Windows on the other drive and
create a boot option for you to fire it up if you wanted to when you
boot the PC up.....

But if you installed debian first as I have on one disk and then add
Windows on the other one then if you boot up the machine it will load
Windows and you won't get a choice to fire up Linux (at least I don't
expect it).

Yeah, installing Windows will probably overwrite you MBR and make you
linux unbootable.

But that's easy to recover. Just boot any linux CD (the debian
installer CD will probably work, or use some live distro) and recover
grub:

http://www.cyberciti.biz/tips/restore-debian-linux-grub-boot-loader.html

There are many other similar guides.

It is possible I think to modify the bootloader in Windows (without
using e.g. Partition Magic) to sniff out the Linux and allow you to
choice of booting it when you boot up the PC......

That is possible, but I have never tried. I personally don't like that
solution much, I'd rather trust grub to boot Windows that trust
Windows to boot anything that is not Windows.


--
I don't get no respect.

Eduardo M KALINOWSKI
eduardo@xxxxxxxxxxxxxxxxx


--
To UNSUBSCRIBE, email to debian-amd64-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/20101208095843.829477nnfbmrxvy8@xxxxxxxxxxxxxxxxxxxxxx



--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/AANLkTi=GSnK93zNqVZFE97jCx4e2AvzV7kbwLLFyyLCu@xxxxxxxxxxxxxx



Relevant Pages

  • Re: How to shift Grub left from a prior Linux Install?
    ... the fdisk from Win98 CD and Windows 7's FIXMBR and ... re-booted with the Win98 CD and ran the FDisk /mbr ... at least the blasted GRUB is gone. ... Would FDISK understand NTFS formatted drives? ...
    (microsoft.public.windows.file_system)
  • Re: help getting grub to see Windows 7 on second drive
    ... I think this query is better sent to this list not debian amd64 so I ... drives. ... I tried installing the Windows on the new disk but it wouldn't install ... Then the PC rebooted and Grub fired up and only saw the first drive ...
    (Debian-User)
  • Re: Weird problem booting
    ... Set up grub to boot windows. ... > drives are all showing twice and there are 2 drives that I guess ... I haven't done the install in the order you have - but I probably would ...
    (comp.os.linux.misc)
  • Re: GRUB problem (double windows + linux)
    ... numbers as when I;m in linux (and start grub manually). ... do not want Windows to see the other windows disks/partitions. ... When I set the bios to boot HD1, ... Are the two Windows drives Master on SEPARATE IDE controllers, ...
    (comp.os.linux.setup)
  • help getting grub to see Windows 7 on second drive
    ... I think this query is better sent to this list not debian amd64 so I ... drives. ... I tried installing the Windows on the new disk but it wouldn't install ... Then the PC rebooted and Grub fired up and only saw the first drive ...
    (Debian-User)