Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Cannot dual-boot Windows 7 and Ubuntu?

My set up is 1 PC 2 Disks disk1 ext4 ubuntu disk2 NTFS windows 7 and am wanting to dual boot with grub 2.

With grub I used to be able to set-up a menu item like this

title Windows 7 
map (hd0) (hd1) 
map (hd1) (hd0) 
rootnoverify (hd0,0) 
chainloader +1 

My install method was I installed win7 on disk 1 some time ago and to install ubuntu I cleared my 2nd drive and then disconnected drive 1 completely plugged drive 2 in as drive 1 and installed linux.

The logic behind the above grub entry was to keep both OS intact i.e. disconnect either drive and the remaining drives OS would/could boot because the windows boot loader remains in tack on disk 2 and grub takes care of disk 1.

I understand I can add the above to the 40_custom in /etc/grub.d/ but am not sure if update-grub will still go of and attempt anything I do not intend

Any help or assistance would be appreciated as it stands I can boot both O/S via boot device selection form BIOS but in the old days with a gentoo install I was able to do so with grub.

share|improve this question

marked as duplicate by Takkat, James Apr 29 '12 at 18:44

This question was marked as an exact duplicate of an existing question.

To setup a dual boot Grub2 needs to "see" Windows while installing. This of course was not possible after you unplugged the drive.

Plug the drive in and run

sudo update-grub

in a terminal should fix this.

share|improve this answer
Yes I am aware grub won't have seen windows with device unplugged ubuntu is very clever after all it found my network printer/scanner but even that would be stretching things a bit. The point of my question is I don't want to end up with an unbootable windows drive because grub has over written anything the method in code snippet hides the ubuntu drive during windows boot and uses the windows bootloader to boot windows – Ascompltd Apr 28 '12 at 8:38
update-grub will not touch your windows boot partition because grub resides on your Ubuntu partition. – Takkat Apr 28 '12 at 9:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.