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.

I'm using Debian 6.0.6 Squeeze at the moment, I installed it over Windows XP.

It's just one hard drive where I first installed Windows XP and than used some Windows tool to make partition where I later installed Debian

Now, I can easily boot in Debian but there is no sign of Windows. I tried few things recommended on line, but still I couldn't get it working

I tried os-prober, tried to edit grub.cfg (I managed to add Windows XP to menu but this is just empty link, when I enter nothing happens (blank screen), where should it link to?)


also this, after fdisk -l:

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 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: 0x000c0014

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2        4663    37447484+   f  W95 Ext'd (LBA)
/dev/sda2            4664        4864     1614532+  82  Linux swap / Solaris
/dev/sda5               2        2032    16313976    7  HPFS/NTFS
/dev/sda6            2033        4663    21133476   83  Linux

update-grub

Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
done
share|improve this question
    
Looking for Bootloader isn't quite what you're looking for, eh? –  Ariane Jan 13 '13 at 0:14
    
i'm not sure, do you mean tweaking bios? maybe I need to link to some file which windows uses to boot, don't know –  zarkoz Jan 13 '13 at 0:16
1  
You need to create a chainloader entry. –  Tom Wijsman Jan 13 '13 at 0:23
    
@TomWijsman, update-grub should take care of that. –  terdon Jan 13 '13 at 1:05

3 Answers 3

From the previous answer I gathered, that you are probably using grub2. The correct way to manually add a menu entry is through the /etc/grub.d/ directory.

Create a file 01_windows_xp (change the number according to the ordering you want, linux got the 10_) and add the following to it:

echo "Adding Windows XP to the Menu..."
cat << EOF
menuentry "Windows XP"
        set root=(hd0,5)
        chainloader +1
}
EOF

Then rerun update-grub. You can look at the generated /boot/grub/grub.cfg afterwards. This way the new menu entry will survive a kernel update, where update-grub will be run automatically.

share|improve this answer

Assuming you did not overwrite your windows installation (you said you installed "over" windows XP?), the following commands should be enough. If not, please update your question with their output:

sudo update-grub
Sudo grub-install /dev/sda
share|improve this answer
    
xp is alive on partition for sure, thanks for reply, I will try this –  zarkoz Jan 13 '13 at 0:40
    
still not showing up, I updated question with more infos, any help appreciated :) –  zarkoz Jan 13 '13 at 0:53
    
@zarkoz, could you post the output of the update-grub command? Does it detect windows? –  terdon Jan 13 '13 at 1:05
    
tried that few times before, doesn't help –  zarkoz Jan 13 '13 at 1:08
    
/dev/sda5 2 2032 16313976 7 HPFS/NTFS -- this is your Windows installation. change your grub manually adding sda5 with a chainloader, then, sudo update-grub and Sudo grub-install /dev/sda –  Lorenzo Von Matterhorn Jan 13 '13 at 1:14

edit your /boot/grub/menu.lst using your preferred text editor with sudo. add the lines:

title Microsoft Windows XP
root (hd0,5)
chainloader +1

run:

sudo update-grub
sudo grub-install /dev/sda

reboot & done

if using grub2:

the configuration file is located here:

/boot/grub/grub.cfg

and the lines added should be:

menuentry "Microsoft Windows XP" {
set root=(hd0,5)
chainloader +1
}

run:

sudo update-grub
sudo grub-install /dev/sda
share|improve this answer
    
menu.lst doesn't exist, I created it, paste the code, update and install, reboot, still nothing :( –  zarkoz Jan 13 '13 at 1:29
    
@zarkoz you are probably using grub2. i updated my answer. –  Lorenzo Von Matterhorn Jan 13 '13 at 1:31
    
still no dice. I noticed that whenever I run update-grub, grub.cfg restores changes, like i didn't write anything in this file –  zarkoz Jan 13 '13 at 1:36
    
try not doing update-grub then. add it using sudo grub-install /dev/sda and reboot. –  Lorenzo Von Matterhorn Jan 13 '13 at 1:37
    
Microsoft Windows xp shows up, but when I enter it's just blank screen with cursor blinking –  zarkoz Jan 13 '13 at 1:47

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.