Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have just updated my Ubuntu linux to Ubuntu 10.4, not my grub menu isnt letting me boot to Windows Partition.

The problem seems to be with grubs new update from using an editable menu.lst file to using a non editable grub.cfg file. Everywhere I look it states "DO NOT EDIT THE GRUB.CGF FILE". I am at a loss as what to do. I figured that the new configuration has screwed up the Windows Boot File. Anyone have any suggestions on how to fix this. I am not sure if it is a windows issue or an issue with the Grub boot menu. Any help would be great. Thanks

-Chris Flynn

share|improve this question

migrated from serverfault.com May 24 '10 at 16:30

This question came from our site for professional system and network administrators.

    
Please show your grub config and your partition layout. –  gogiel May 24 '10 at 16:32
add comment

3 Answers

I can only be of partial help here. I don't use Ubuntu but I do run Debian "Squeeze" which has the same updated Grub. The new Grub system creates it's configuration file from a series of files that you can edit. On my Debian system they are located in "/etc/grub.d/". You should notice that these files have names that correspond to the various header sections in the grub.cfg file. The header sections begin with the word "#BEGIN" and are followed by the path to one of the files. You should be able to find the file that deals with booting Windows partitions and make whatever changes you need there. Once you've done that you need to run the grub-mkconfig command to create the new/updated grub.cfg file.

I don't run Windows so I can't help with dual booting that OS. Sorry if this is only half an answer.

share|improve this answer
add comment

Is the windows OS listed in grub's menu.lst file? Is there a timeout value that a human can work with in the menu.lst file? Examine the file menu.lst in grub's directory (don't know what it is in Ubuntu: /boot/grub/menu.lst ?)

Be calm, it is unlikely that Ubuntu installer/updater messed with your other partitions.

share|improve this answer
add comment

Grub under normal circumstances wont damage partitions. At worst you would just have to rewrite the Main MBR. grub acts much like the bios would and searches the partition you ask it to boot for normal boot files. when you specify chainloader +1 for windows it searches the partition you specified for files like ntldr or msdos.sys etc that are windows boot files. when you ask it to boot a nix system you tell it the kernel is at /boot/... so it loads that file. Ive installed linux, bsd, solaris... thousands of times on many machines. I have never seen it destroy any thing nor heard of it doing so. theres always a fluke posibility but its far more likely for you to have drive failure that grub to break things.

/etc/grub.d/ is where ubuntu puts the files as well. I suspect grub requires that location.

/etc/grub.d# ls
00_header        10_linux      20_memtest86+  40_custom  README
05_debian_theme  20_linux_xen  30_os-prober   41_custom

Above is a listing of my grub.d/ 40 and 41 are ment for windows partitions etc

the os prober found my primary win partition and added it in your 40_custom would need to be similer to below you would need to use blkid to find the uuid of your win partition to fix the search line and let you change the set root line correctly

menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(/dev/sdb,msdos1)'
    search --no-floppy --fs-uuid --set=root D8C0FF3EC0FF2204
    drivemap -s (hd0) ${root}
    chainloader +1

Above is what it put in to my grub.cfg automagicly. Also fyi if you just have to get win back and will get to linux later using a bartPE or other similer disk. Run a mbr repair utility to set it back to a win mbr. From there you can either use a boot cd/usb drive that has grub on it to boot to the linux partitions. Make sure to copy off the information in the grub.cfg for that linux partition. the live usb drives are very handy that way. they often come with grub installed so you can usually just add to their grub.cfg the lines needed to make a "emergency boot" menu option for linux. just make sure to use uuid's for setting root and such.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.