Page 13 of 26 FirstFirst ... 3111213141523 ... LastLast
Results 121 to 130 of 255

Thread: HOWTO: Restore GRUB (if your MBR is messed up)

  1. #121
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    5,926
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    did you somehow overwrite your Ubuntu partition with your windows install? Where was you ubuntu installed to previously? What you can do is use the live cd and view the folders that contain your ubuntu installation, most likely in /media/ and if they aren't there, you can mount them yourself to any folder that you create anywhere and see if your ubuntu installation is still there. if not, then I am sorry to say but you overwrote it within windows. are you maybe chosing the wrong disk? do you have more than 1 disk?
    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  2. #122
    Join Date
    Jan 2005
    Location
    Czech Republic
    Beans
    65

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    I guess this howto is no more valid for 6.10 and 7.04! Can anyone advise for these two?

  3. #123
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    5,926
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by jan View Post
    I guess this howto is no more valid for 6.10 and 7.04! Can anyone advise for these two?
    if you read a few more posts in, you would see that they is more ways to skin the cat. I am not aware of how fiesty's live cd install works but you can reinstall grub from the live cd BUT WITHOUT doing the install and then quitting. Here's what works with any distribution:

    Don't forget that this method, as described, puts GRUB back on the MBR (master boot record) of the hard drive instead of in the root parititon. This is fine for most people, but not if you already have an alternative boot manager.

    In other words, if you use something like Boot Magic or System Commander, the commands you've just read will overwrite what you've got.

    If you've installed GRUB into the Root Partition instead of the MBR, the commands are a little different. Here's are the instructions that I have for my system:

    How to Restore the Grub Menu after a Re-Ghosting:

    1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.

    2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary.

    3. Type "grub" which makes a GRUB prompt appear.

    4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.

    5. Type "root (hd0,3)".

    6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".

    7. Type "quit".

    8. Restart the system. Remove the bootable CD.

    Hope this helps. Since I use Norton Ghost to make regular backups and restores (I do a lot of testing), I do this all the time...
    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  4. #124
    Join Date
    May 2006
    Beans
    29
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    small question: if i reinstall grub, will it still detect my "other" os ? or do i have to do something to tell him that ubuntu is not alone on my pc ?

  5. #125
    Join Date
    Jul 2007
    Beans
    90

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    It should detect I think. But don't take my word as gospel.

  6. #126
    Join Date
    Jun 2007
    Location
    Bilthoven, NL
    Beans
    106
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by dannyboy79 View Post
    if you read a few more posts in, you would see that they is more ways to skin the cat. I am not aware of how fiesty's live cd install works but you can reinstall grub from the live cd BUT WITHOUT doing the install and then quitting. Here's what works with any distribution:

    Don't forget that this method, as described, puts GRUB back on the MBR (master boot record) of the hard drive instead of in the root parititon. This is fine for most people, but not if you already have an alternative boot manager.

    In other words, if you use something like Boot Magic or System Commander, the commands you've just read will overwrite what you've got.

    If you've installed GRUB into the Root Partition instead of the MBR, the commands are a little different. Here's are the instructions that I have for my system:

    How to Restore the Grub Menu after a Re-Ghosting:

    1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.

    2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary.

    3. Type "grub" which makes a GRUB prompt appear.

    4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.

    5. Type "root (hd0,3)".

    6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".

    7. Type "quit".

    8. Restart the system. Remove the bootable CD.

    Hope this helps. Since I use Norton Ghost to make regular backups and restores (I do a lot of testing), I do this all the time...

    Output of terminal:

    grub> find /boot/grub/stage1

    Error 15: File not found

    grub>
    Checked the directory though, the file is there. Where do I go wrong ?

    >OK figured it out. Did not go Superuser.
    Last edited by tomaasj; July 21st, 2007 at 11:13 PM. Reason: solved

  7. #127
    Join Date
    Apr 2006
    Location
    Nova Scotia
    Beans
    123

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by jan View Post
    I guess this howto is no more valid for 6.10 and 7.04! Can anyone advise for these two?
    I know for 7.04, if you use the alternate install CD, you have the option to "Rescue a broken system". Pick this option and follow the language and keyboard prompts thru to the end. Then after the aoutodetection is thru, pick the partition that has your existing install on it. Then you get several rescue options, one of which is , TA DA, "reinstall GRUB bootloader". Pick where you had your old GRUB, hd0 for MBR (it has some explanatory material here to help you pick), and it's easy peasy from there. When you reboot, you're fixed.

  8. #128
    Join Date
    Aug 2007
    Beans
    109

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by remmelt View Post
    Isn't it easier to do this:

    1. Pop in the Live CD, boot from it until you reach the desktop.
    2. Open a terminal window or switch to a tty.
    3. Type "grub"
    4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
    5. Type "setup (hd0)", ot whatever your harddisk nr is.
    6. Quit grub by typing "quit".
    7. Reboot.

    I may be missing your point though, if so, please forgive me


    i dont have the live cd , i just downloaded installation cd , and my installation stop for some errors, now i am not able to boot into my win also , and its giving error "unable to boot operating system"

    ps: how to open a terminal or tty , when i m using installation cd and i have just put the cd inside and before starting my installation ??
    Last edited by cherry316316; August 12th, 2007 at 01:38 AM.

  9. #129
    Join Date
    May 2006
    Location
    Milwaukee,WI
    Beans
    5,926
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Quote Originally Posted by cherry316316 View Post
    i dont have the live cd , i just downloaded installation cd , and my installation stop for some errors, now i am not able to boot into my win also , and its giving error "unable to boot operating system"

    ps: how to open a terminal or tty , when i m using installation cd and i have just put the cd inside and before starting my installation ??
    unless you downloaded the "alternate" install cd than every install cd is a live cd. meaning you boot it up, it gives you a menu, you click on the first choice which is to run in live cd mode or install it. When you pick the first choice you will be presented with a normal looking desktop of ubuntu, there will be a icon on the desktop that says "Install" but just don't click on that yet. THen follow the instructions.

    Otherwise the Super Grub Disk (SGD) can be downloaded and burned to a cd, then boot to that and it can get you into your Win install very easily.
    Check out my Blog about my life and computer software and hardware. http://ubuntuaddicted.blogspot.com/
    My YouTube channel:
    http://www.youtube.com/ubuntuaddicted

  10. #130
    Join Date
    Oct 2006
    Location
    Olympia WA USA
    Beans
    53
    Distro
    Ubuntu 6.06 Dapper

    Re: HOWTO: Restore GRUB (if your MBR is messed up)

    Will restoring GRUB make it work consistently?

    See, my dual boot computer boots up fine sometimes, but often hangs at the GRUB prompt. So GRUB works intermittently. So what I want to know is: will restoring grub according to the advice in this thread likely fix it?

    And, since I can occasionally boot into Ubuntu, what commands do I use to restore GRUB from a normally booted session? Are these commands any different from those used from a live CD?

Page 13 of 26 FirstFirst ... 3111213141523 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •