Dual Boot Problem: F16 grub2 boots HP recovery partition
I installed F16 on the internal USB drive of my HP Pavilion m7480n PC. WinXP is installed on the C-drive. The C-drive labeled HPPavilion has an 8 GB partition labeled HPRecovery. In F16 fdisk -l I can identify the partitions as follows:
Windows Drive:
HP-Pavilion /dev/sda1 *Boot ID=7 size=292 GB
HP_Recovery /dev/sda2 ID=c size=8GB
USB drive with Fedora 16:
/dev/sdb1 *Boot ID=83 size=500 MB
/dev/sdb2 ID=8E size=300 GB
When I boot the PC the grub2 menu comes up. If I select Fedora 16 it boots fine, but if I select Windows, grub2 boots HP-Recovery instead of WinXP. I've read the grub2 documentation but it's either outdated or not applicable to F16. I would appreciate any help toward fixing this problem. Thank you!
Nov. 26, 2011 OK. The output of os-prober is:
[root@localhost grub.d]# os-prober rmdir: failed to remove `/var/lib/os-prober/mount': Device or resource busy /dev/sda2:Windows NT/2000/XP:Windows:chain
The contents of /boot/grub2/device.map is:
this device map was generated by anaconda
(hd0) /dev/sda (hd1) /dev/sdf (hd1,1) /dev/sdf1
December 5, 2011 OK. I followed the suggestion and it worked - sort of. When I rebooted and the GRUB menu came up, lo and behold there was an entry for Windows XP! But when I selected Windows XP, GRUB came back with an error: "Error file not found". I have no idea who or what was looking for a file. The following is an excerpt from the "fdisk -l" command: [root@localhost Documents]# fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 Disk identifier: 0xcab10bee
Device Boot Start End Blocks Id System /dev/sda1 * 63 607610429 303805183+ 7 HPFS/NTFS/exFAT /dev/sda2 607610493 625137344 8763426 c W95 FAT32 (LBA)
I assume the disk uuid (as per the suggestion) for my case is "cab10bee". This is the value I used in my MenuEntry in 40_custom. I did a grub-mkconfig command. It worked and the new entry showed up in the grub.cfg file.
December 7, 2011 Well, we seem to be making progress. I put the correct uuid in 40_custom and then recreated grub.cfg as follows:
grub2-mkconfig -o /boot/grub2/grub.cfg
I then rebooted, the Grub menu came up and I selected Windows XP. I was then prompted: "Press any key to continue...". So i pressed the enter key and the Grub menu came back. At this point, as long as I choose Windows XP the only thing that happens is the "Press any key to continue..." prompt. If I choose Fedora 16, then Fedora 16 will boot normally. So I still can't boot Windows XP using grub2.
December 10, 2011 Here is the listing ...