First I would run sudo os-prober
and see if it finds the Windows installation. If it is not installed run sudo apt-get install os-prober
then run it and if it finds Windows run sudo update-grub
and it should create the menu item.
If this doesn't work then I would run sudo fdisk -l
(-l is for List) and look for your hard drive. It will look something like this:
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000702fc
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 33554431 33552384 16G 83 Linux
/dev/sda2 33556478 41940991 8384514 4G 5 Extended
/dev/sda5 33556480 41940991 8384512 4G 82 Linux swap / Solaris
/dev/sda6 41940991 50950020 8250580 16G 0b FAT32
Again this is only an example yours will look different and may be labeled differently. I don't actually have a Windows XP partition on the system so I 'faked' it on this example.
For this I would assume that my Windows XP is installed on /dev/sda6
This will be important for the following step.
Now we need to create a custom menu item for GRUB
Open terminal and type:
sudo gedit /etc/grub.d/40_custom
you can substitute gedit with your favorite editor but it needs to be run as sudo to be able to edit the file.
add the following to the very end of the 40_custom file (if the file is completely blank then you typed in something wrong or you don't have grub2 and these instructions will not work for you... double check to see if you have a /etc/grub.d folder)
menuentry "Windows XP" {
set root=(hd0,6)
chainloader (hd0,6)+1
}
Explanation for this entry... you will need to change the hd0,6
in the entries to match your Windows partition. The hd0 refers to sda, if you have more than one hard drive and your windows partition is on sdb then you would need to use hd1 instead but for you, I'm assuming that you are on sda which you determined by the fdisk command you ran earlier. The ,6 in my example is because we determined that the Windows installation was on /dev/sda6 - sda(hd0)6
Once you modified the 40_custom file it should look something like this
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#echo 'Adding 40_custom menu entries' >&2
menuentry "Windows XP" {
set root=(hd0,6)
chainloader (hd0,6)+1
}
save the file and run sudo update-grub
it should add a menu item for Windows XP ... try and reboot and check to make sure it boots into Windows
If you did everything correctly you should be all set.
From the new information giving the 40_custom file should look like this:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#echo 'Adding 40_custom menu entries' >&2
menuentry "Windows XP" {
set root=(hd0,1)
chainloader (hd0,1)+1
}
Due to problems with "Invalid Signature" we need to do some more work
You need to open terminal and enter sudo blkid
look for the UUID
for /dev/sda1
and copy it. then you will need to edit the 40_custom with the following:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#echo 'Adding 40_custom menu entries' >&2
menuentry "Windows XP" {
insmod ntfs
set root=(hd0,msdos1)
search --no-floppy --fs-uuid --set 822CB74E2CB73BCB
chainloader +1
}
(edited with the information given in comments)
save the file and sudo update-grub
again and try once more .. hopefully now you wont get the Invalid Signature
sudo update-grub
and see if it finds the windows install. – John Orion Jun 05 '16 at 21:44