1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

how to rebuild the ubuntu boot loader

Discussion in 'Linux / BSD / Mac OS X' started by Ubuntusario, Aug 16, 2012.

  1. Ubuntusario

    Joined:
    Nov 12, 2011
    Messages:
    208 (0.21/day)
    Thanks Received:
    5
    Location:
    UT,US
    I was using the boot loader that ubuntu installed to load linux and windows xp individually, but after I tried to reinstall xp using a bootable usb drive it erased my boot loader information leaving xp as the only os to boot.

    I want to know what are the commands that I need to input maybe inside a live ubuntu so I can use my existing ubuntu instalation as well as xp like it was before this accident.
  2. temp02 New Member

    Joined:
    Mar 18, 2009
    Messages:
    493 (0.25/day)
    Thanks Received:
    166
  3. ThE_MaD_ShOt

    ThE_MaD_ShOt

    Joined:
    Nov 29, 2011
    Messages:
    4,817 (4.84/day)
    Thanks Received:
    3,358
    Location:
    Hi! I'm from the Internet
    Yes grub will work.
    Crunching for Team TPU
  4. Drone

    Drone

    Joined:
    Sep 1, 2010
    Messages:
    2,571 (1.77/day)
    Thanks Received:
    1,274
    If you have problems with grub here's a straightforward guide from ubuntu forums:

    Open terminal and type

    sudo grub

    This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter this

    find /boot/grub/stage1

    This will return a location. If you have more than one, select the installation that you want to provide the grub files. THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)

    root (hd?,?)

    Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1). Next enter the command to install grub to the mbr

    setup (hd0)

    Finally exit the grub shell

    quit

    That is it. Grub will be installed to the mbr.
    When you reboot, you will have the grub menu at startup.

    http://ubuntuforums.org/showthread.php?t=224351
  5. GoFigureItOut

    Joined:
    Dec 13, 2011
    Messages:
    187 (0.19/day)
    Thanks Received:
    9
    For simplicity, sake I use a CD called Boot-Repair-disk.
  6. SIGSEGV

    SIGSEGV

    Joined:
    Mar 31, 2012
    Messages:
    505 (0.58/day)
    Thanks Received:
    107
    boot with the ubuntu installation cd, open terminal, find root hdd for linux booting and mbr hdd partition then mounting and re-mapping it to grub, finally re-installing grub by typing #grub-install /mount-dir/mapped-mbr-partition /dev/orig-mbr-partition.

    note : if you have 2 different disk locations for linux partition and windows mbr partition, while on successfully grub booting you should edit grub parameter by pressing 'e' then do manual re-map linux root partition

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page