1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Window 7 and Ubuntu problem

Discussion in 'Windows 7' started by Tomween1, Apr 1, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. Tomween1

    Tomween1 Thread Starter

    Joined:
    Mar 22, 2009
    Messages:
    111
    Forum admin, please bump this if you feel it is in the wrong local:grin:

    I recently tried loading Ubuntu onto a separate drive on my computer. All went well except for the boot process. Upon booting I no longer was brought to the normal dual boot screen, instead I now got what I beleive to be the Linux boot screen. From here I was able to still load windows, with a few more steps. What didn't like was the thought that Ubuntu took over. I did some research and figured I should reinstall it. I went to the Windows partition and formatted the section that had Ubuntu on it. Much to my surprise Ubuntu loaded itself on the same HDD as Windows 7. I formatted the section holding Ubuntu and restarted the system to this problem: grub loading error: unknown filesystem grub rescue So here I' stuck. The only ability I have is to get into bios and change my boot devive. I need help retrieving Windows.

    Thank you, Tom
     
  2. techkid

    techkid

    Joined:
    Sep 1, 2004
    Messages:
    2,339
    First Name:
    David
    I know that in WinXP you can run the fixboot and fixmbr commands from the Recovery Console (accessible from the Windows XP CD), but I don't yet know if Windows 7 has similar or same functionality, hence the reason I haven't yet installed Ubuntu on my computer.

    But, the thing is, you can configure the GRUB bootloader to what OS is the default to boot, how long before it does load the default OS, and all sorts of things. It actually isn't a bad system, and you can set it up the way you want it to work. You just have to give it a try.

    I wouldn't try doing these fixes with a Windows XP CD on a Windows 7 system. There are probably massive differences in the boot process, and I don't know what can happen if you try, but my guess is that it will leave your system unbootable.

    Just wait for further advice, but to get it up and running at least temporarily, reinstall Ubuntu on the second drive. You never know.
     
  3. TerryNet

    TerryNet Moderator

    Joined:
    Mar 23, 2005
    Messages:
    79,886
    First Name:
    Terry
    You should be able to fix the Windows boot manager with the Windows 7 installation DVD, but it will not do anything for the Linux installations. Otherwise, I think techkid covered it all.
     
  4. Tomween1

    Tomween1 Thread Starter

    Joined:
    Mar 22, 2009
    Messages:
    111
    I was given great steps on Ubuntu Forum for this solution. I hope it helps others


    How to restore the Ubuntu/XP/Vista/7 bootloader (Updated for Ubuntu 9.10)

    This How-to is for windows dual booters who reinstall an operating system only to find that it has taken away access to their other operating system.
    Whether you want to restore the XP, Vista, 7 or Ubuntu (Grub) bootloader, this guide will walk you through it.

    All three parts of this tutorial require that you boot from a cd. If you don't know how to do this, check here.

    If you have made a mistake and want to revert the changes, simply follow the instructions for reinstalling the previous bootloader. For example, if you have installed vista over ubuntu, try to get the ubuntu bootloader back, but want to get the vista bootloader back, simply follow my instructions for installing the vista bootloader.


    How to restore the Ubuntu grub bootloader (9.10 and beyond)

    Since Ubuntu 9.10 uses Grub 2, the above method will not work. However, it can still be done and this is how:
    First you need to find out what your drives are called. You can do this by going to a terminal and typing: Code:
    sudo fdisk -l
    You will get something like this:


    [​IMG]

    From that you need to find the device name of your Ubuntu drive, something like “/dev/sda5″.
    So, still in the terminal, type:
    Code:
    sudo mkdir /media/sda5sudo mount /dev/sda5 /media/sda5
    And then, to reinstall the grub: Code:
    sudo grub-install --root-directory=/media/sda5 /dev/sda
    Push enter and you’re done! Of course you need to replace “/dev/sda5″ and “/dev/sda” with what you found in the fdisk output.

    How to restore the Ubuntu grub bootloader (9.04 and older)

    First of all, all credit for this part of the tutorial goes to catlet. I am simply rewriting his tutorial to have all three bootloaders in this tutorial.

    So, lets begin. To restore the grub, you must boot off the ubuntu live cd. Any ubuntu live cd will do.

    Once there, open a terminal (Applications>Accessories>Terminal) and type this:

    Code:
    sudo grub
    Next, you need to find which hard drive ubuntu and the grub is installed to. You do this by running this command:

    Code:
    find /boot/grub/stage1
    Take note of what it returns (something like (hd0,1).)

    Now you need to tell Grub where it is installed. Using the output of the last command, change this one and run it:

    Code:
    root (hd<a>,<b>)
    Replacing <a> and <b> with what you got back before. For example, if "find /boot/grub/stage1" gave me "(hd0,1)", you would run "root (hd0,1)"

    Ok, so thats the configuration over and done with. Now we just need to run one command to install the Grub to your hard drive:

    Code:
    setup (hd0)
    Now to quit and check if it has worked:

    Code:
    quit
    Code:
    sudo reboot
    Make sure you have taken the live cd out of your disc tray. All going well, you should start back up and see the grub once again.


    How to restore the Windows XP bootloader

    For this you will need your Windows XP installation CD. Boot into it now.

    You will get to a part where it asks if you want to repair or recover. To do so, press "r".

    If prompted, enter your Windows XP administrator password. This will leave you at at a command line, so type in the following two commands:

    Code:
    fixboot
    Code:
    fixmbr
    Then type Code:
    exit
    then remove your XP cd. If everything has gone well, you should come to your XP bootloader.


    How to restore the Windows Vista or 7 bootloader

    To restore the Windows Vista/7 bootloader, you must first boot off your Windows Vista/7 installation DVD.
    If you have one of the many OEM computers that didnt come with a Vista/7 installation disk, you can get the same effect with a Vista recovery disk, which you can download from here.
    When you get to the Regional settings, select your Location/Keyboard setting then click next. On the next page you must click on "Repair your computer."

    On the next page, if it finds your Windows Vista/7 installation, make sure it is UNSELECTED before clicking next.
    Then click on "Command prompt". From there, type in the folowing:

    Code:
    bootrec.exe /fixboot
    Code:
    bootrec.exe /fixmbr
    Now close the two windows and click "Restart."

    Take out your Vista/7 DVD and hopefully, you will be left with your Windows Vista/7 Bootloader.
     
  5. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,786
    Basically what they told you above with more details.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/914152

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice