Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The following is the list that I got when I executed the command sudo fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbf4c6203

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       13708   109998080    7  HPFS/NTFS
/dev/sda3           13708       35952   178676736    7  HPFS/NTFS
/dev/sda4           35952       60802   199606273    f  W95 Ext'd (LBA)
/dev/sda5           35952       58196   178676736    7  HPFS/NTFS
/dev/sda6           58196       58257      487424   82  Linux swap / Solaris
/dev/sda7           58257       60802    20440064   83  Linux

How can I add Windows 7 to my Grub menu?

share|improve this question
    
Use the auto-configuration tool grub-mkconfig –  Exensor Jul 6 at 23:27

2 Answers 2

First, you will need to know which of the NTFS partitions (I'm assuming the W95 partition isn't Windows, but some external storage). You can test by mounting each and see what they contain. Generally you're looking for whatever contains Windows/ .

Once you know which partition that is (i.e., /dev/sda5), reduce that number by one. That number will be replaced with the "4" in "rootnoverify (hd0,4)"

Then enter this into /boot/grub/grub.conf [if that doesn't show up, /boot/grub/menu.lst]

title Windows
rootnoverify (hd0,4)
makeactive
chainloader +1

This "chainloads" to the Windows bootloader.

share|improve this answer
    
Where do I enter this code ? –  Roshan George Mar 16 '12 at 8:57
    
This is located in "/boot/grub/grub.conf" Some distributions use a different name for it. So if that does not exist already, then it is most likely "/boot/grub/menu.lst" –  Travis Mar 16 '12 at 9:50

Try this:

title Find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies --ignore-cd /ntldr
map () (hd0)
map (hd0) ()
map --rehook
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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