Thursday, February 24, 2011

Windows XP in Grub 2

When I installed Debian 6.0 (Squeeze) on my laptop, I found that Debian Installer had not added Windows XP entry in the GRUB 2. You might also face same issue, then you can add following lines in /boot/grub/grub.cfg



## (1) Windows XP in /dev/sda1
menuentry "Windows XP" {
set root=(hd0,1)
chainloader +1
}




Here are few tips how to set root in the grub.cfg



# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,2)
# /dev/sda3 (hd0,3)
#


2 comments:

Anonymous said...

thanks man it helps!!..

really appreciate

RL

Anonymous said...

I believe the name conversions depend on exactly which version of Grub you use. For instance, my system (Grub 1.98 on Squeeze) uses (hd0,msdos1) as the first partition on my single hard drive. Also, consider placing your code in the /etc/grub.d/40_custom file.
Keith Ostertag