I recently installed CentOS5.5, and needed to modify /boot/grub/menu.lst to allow me to boot from hdd instead of usb.

title Microsoft Windows XP
rootnoverify (hd0,0)
chainloader +1

The above is what I was told to put into the /boot/grub/menu.lst to continue to be able to boot windows, but it only starts up my recovery partition (windows installer)

How do I find the correct partition to place into the file to boot windows?

Using fdisk -l I got this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         637     5116671   12  Compaq diagnostics
/dev/sda2   *        5481       14593    73200172+   7  HPFS/NTFS
/dev/sda3             638         650      104422+  83  Linux
/dev/sda4             651        5480    38796975    5  Extended
/dev/sda5             651        5112    35840983+  83  Linux
/dev/sda6            5113        5243     1052226   82  Linux swap / Solaris

It seems that /dev/sda2 is your windows partition. Try:

rootnoverify (hd0,1)
  • Lol I actually tried this right before you posted it. I swear I tried it before and it didn't work. Perhaps I forgot to save the file. Thanks, though. (Posting from Windows) – Rob Nov 14 '10 at 16:11
  • :) Cool, glad it worked. – icyrock.com Nov 14 '10 at 16:14

you can run as root:

cfdisk -l

and see the list of partitions you have, along with their types. e.g, you should see /dev/hda0 as NTFS, according to the sample you gave, as this is the representation for (hd0, 0). search for another NTFS partition, as it is most likely the Windows partition.

  • [root@localhost dev]# cfdisk -l bash: cfdisk: command not found – Rob Nov 14 '10 at 15:52
  • it should be fdisk and not cfdisk – Moshe Nov 14 '10 at 16:17

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.