Announcement

Collapse
No announcement yet.

putting back grub to hda

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    putting back grub to hda

    i dual boot winxp and kubuntu
    windows is on the the first disk and first partition (hda)

    here is my situation i need to format the windows partition
    this weekend and reload it due to the way windows work (unreliable).

    when i do re-install winxp how do i recreate the grub menu
    so that kubuntu and windows will work and be shown in
    the menu list


    #2
    Re: putting back grub to hda

    incase some one else wants to know
    heres the answer


    Here's the quick and easy way to re-enable Grub.

    1) Boot off the LiveCD

    2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub "prompt", and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

    sudo grub

    > root (hd0,0)

    > setup (hd0)

    > exit

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

    Only read below if Windows is now missing from the boot menu

    If you installed Ubuntu before you installed Windows, then Ubuntu will not have anything in the grub configuration for Windows. This is where you'll have to do a bit of manual editing to the grub boot menu file.

    If you open the file /boot/grub/menu.lst with the following command:

    sudo gedit /boot/grub/menu.lst

    You'll see a sample section for Windows, which you'll want to uncomment and add to the boot menu list in whatever position you want it in. (uncomment by removing the #'s)

    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1

    Note that you should also verify that hd0,0 is the correct location for Windows. If you had installed Windows on the 4th partition on the drive, then you should change it to (hd0,3)

    Comment

    Working...
    X