I have two hard drives, one with fedora and another with Windows XP and 7 on two partitions.

When I boot my machine, GRUB sees Windows 7 bootloader and allows me to boot windows by going through chained bootloaders.

How can I add Windows 7 and XP as different menu items and get rid of Windows 7 bootloader (at least while booting?

I looked at grub.cfg, and I found the following entry for windows bootloader:

menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-A8F8C04CF8C01B08' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  A8F8C04CF8C01B08
      search --no-floppy --fs-uuid --set=root A8F8C04CF8C01B08
    chainloader +1

I would edit this myself, but some of the code in there makes no sense to me.

  • If you got rid of the Windows 7 bootload you would be able to boot to it. – Ramhound Jan 31 '14 at 0:39
  • @Ramhound Ok, then can I at least avoid chainloading it? – ayane Jan 31 '14 at 0:41

I did this by restoring Windows XP's bootloader (overwriting Windows 7 loader) and then scanning with OS-prober again. This time, both showed up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.