# Unable to boot XP from GRUB2 - Urgent help needed



## Sathish (Apr 14, 2010)

i have two hdd dual booting with xp and ubuntu 

i have installed both the os in the 1st hard disk (hd0)
sda1= winxp
sda6 = ubuntu 10.4 (beta2) 


my config

---------------------------------------
Disk /dev/sda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 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: 0xe3657373

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/sda3            7019        9730    21784140    5  Extended
/dev/sda5            7020        7262     1951897+  82  Linux swap /  Solaris
/dev/sda6            7263        9730    19824178+  83  Linux

Disk /dev/sdb: 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: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2        7013    56323890    f  W95 Ext'd (LBA)
/dev/sdb2            7014       46532   317436367+   7  HPFS/NTFS
/dev/sdb3   *       46533       49082    20480000    7  HPFS/NTFS
/dev/sdb4           49082       60801    94134816+   7  HPFS/NTFS
/dev/sdb5               2        7013    56323858+   7  HPFS/NTFS

--------------------------------------------------------------------

details of my HDD UID

/dev/sda1: LABEL="WINXP" UUID="6270DE7670DE5101" TYPE="ntfs" 
/dev/sda5: UUID="0c78843e-a8d9-4a05-b197-d94b6d911455" TYPE="swap" 
/dev/sda6: UUID="ae702955-2b5f-4f4d-a7d0-c7ff2dfeea9c" TYPE="ext4" 
/dev/sdb2: LABEL="GAMEZ" UUID="70A4BA86A4BA4DFA" TYPE="ntfs" 
/dev/sdb3: LABEL="DUMP2" UUID="469820589820492F" TYPE="ntfs" 
/dev/sdb4: LABEL="DUMP" UUID="7CA006E1A006A1AE" TYPE="ntfs" 
/dev/sdb5: LABEL="MUSIX" UUID="F0C8E71FC8E6E338" TYPE="ntfs" 

-----------------------------------------------------------


after day long googling, i edit grub2 loader as follows;

add the following line in 40_custom file in order to add winxp boot  entry;

-----------------------

menuentry "Windows xp (loader) (on /dev/sda1)" {
    insmod ntfs
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set 6270DE7670DE5101
    drivemap -s (hd0) %{root}    
    chainloader +1
}

---------------------------
while updating grub2, grub.cfg found the xp partition successfully.
but after rebooting and loading xp, it left blank and returned grub boot  loader menu instantly..

i cant boot xp and i am totally out of world 

anybody have an idea about what happend..
pl i need urgent help.


----------



## khmadhu (Apr 14, 2010)

instead of  set root=(hd0,1) add rootnoverify (hd0,1) or rootnoverify (hd0,0)
 and try.

otherwise best option is reinstall grub boot loader

1)boot  from ubuntu CD/DVD
2)go to recovery console,u will get a console
3)type chroot /mnt/sysimage
3)then type grub-install /dev/sda

it will automatically detect all OS and reinstall's boot loader.


----------



## Sathish (Apr 14, 2010)

khmadhu said:


> 3)then type grub-install /dev/sda
> 
> it will automatically detect all OS and reinstall's boot loader.



10.4 support only grub2?..can i install grub instead of grub2?
my ubutnu 9.10 cd doest not contian recovery console menu.
is there any way create recovery console from existing os.?


----------



## ico (Apr 14, 2010)

^ Just boot through the Ubuntu 9.10 Live CD and open terminal. Then do what khmadhu has posted.


----------



## Sathish (Apr 14, 2010)

I already told that boot menu does not contain anything like recovery console or terminal or command prompt  then how can i get console/terminal window in boot menu?

i am using ubuntu 9.10 Live CD shipped from canonical.


----------



## ico (Apr 14, 2010)

Sathish said:


> I already told that boot menu does not contain anything like recovery console or terminal or command prompt  then how can i get console/terminal window in boot menu?
> 
> i am using ubuntu 9.10 Live CD shipped from canonical.


And I've written that just boot through the live CD and "get to the desktop" just the way you run a live CD "normally".


----------



## Sathish (Apr 14, 2010)

while entering chroot  /mnt/sysimage..
returned with the following error..
"cannot change root directory to /mnt/sysimage  no such file or directory "

i have execute this command as root


----------



## ico (Apr 14, 2010)

Do this: *wiki.ubuntu.com/Grub2#Recover Grub 2 via LiveCD


----------



## Sathish (Apr 15, 2010)

hey, my problem is not recovering grub2 boot loader.. i already done it and now ubuntu 10.4 successfully boot..
but im not able to boot winxp which is resided at sda1. that is the problem.
i have done everything in the wiki page .but still i struck. so that i came to this forum.


----------



## khmadhu (Apr 15, 2010)

> but im not able to boot winxp which is resided at sda6.


i think u should give 
rootnoverify (hd0,6) if u r windows is in sda6.!


----------



## Sathish (Apr 15, 2010)

khmadhu said:


> i think u should give
> rootnoverify (hd0,6) if u r windows is in sda6.!


 
I tried.. but no use..

i would like to say that Xp was booting perfectly without any problem from grub loader while i working last week..

but one thing i missed to inform.. Sorry guys. 

Actually i have 3 OS xp. win7 rc and ubutnu 9.10 as follows 
xp and ubuntu are in first hard disk (xp is sda1 and ubuntu is sda5)
win7 was on second hard disk (i.e. sdb3)

Ubutnu 9.10
Ubuntu 9.10 recovry
Mem test
windows 7 

xp was booting through win7 boot loader.

even i removed win7 rc from hard disk and delete the partition, xp still loaded from win7 boot loader.
after i upgarding ubuntu 9.10 to 10.4 beta, the above problem has arrived and i am unable to boot xp through win7 boot loader. 

can u Understand my problem right way .?


----------



## khmadhu (Apr 15, 2010)

do one thing..

boot from xp cd. dont install ,choose recovery console,and u will get a dos prompt.
there u type

fdisk /mbr

this will try to rewrite the bootloader.. restart and see the difference.


----------



## Sathish (Apr 15, 2010)

i have done Too. it creates another problem.  

as i have xp professional OEM disk (original), setup cannot proceed and ended with pci.sys error (bsod). 
after searching google, i have found that  unless sp2 slipstreamed installaton disk used, setup will not succeed in new motherboards and ending with various blue screen of death error.

i dont have standby system to slipstream sp3 to the oem edition..
is there any way to do slipstream in ubuntu.?
or is there any third party software to repair the xp..?


----------



## khmadhu (Apr 15, 2010)

well in that case u could try "hirens boot cd". google around to download.

i extensively use this tool for all this type of mess . i am sure u gonna love it.


----------

