Page 15 of 26 FirstFirst ... 5131415161725 ... LastLast
Results 141 to 150 of 255

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

  1. #141
    Join Date
    May 2007
    Location
    Moore OK
    Beans
    5
    Distro
    Ubuntu 7.04 Feisty Fawn

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

    What about a dual boot system with windows xp on partition and Ubuntu on the other? will installing grub the way described repair the loader to xp and Ubuntu or will it only work for a straight Ubuntu system.

  2. #142
    Join Date
    Feb 2006
    Location
    ZA
    Beans
    56
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Quote Originally Posted by Czar View Post
    With the Feisty CD, this 'trick' doesn't seem to work. Feisty fights with you until you format something, else it never allows you to finish.
    Oh dear, this is worrying.

    I have a 160Gb disk with 3 partitions, for XP (OS + Apps + Data). I added a 250Gb with 5 partitions (XP-pagefile + Linux swap + / + /home + Shared-data)

    Now Grub has cleverly gone and installed itself on the 160Gb, instead of the 250Gb. I suppose this is due to the BIOS pointing to the 160Gb as the boot disk. I'd hoped to leave the 160Gb untouched by the Linux install, so I plan to use the XP CD to fixmbr and fixmbr, to return the XP mbr. Now, I'd hoped to be able to switch the BIOS's boot-disk setting and reinstall Grub to the 250Gb's MBR.

    Is it still possible to boot from the Feisty LiveCD, then install Grub, following the suggestions in the thread "How to install Grub from a live Ubuntu cd"?


    edit:
    Definitely some confusion here. If I set the 250Gb as the boot-disk, then Grub has no idea where anything is. Booting into the LiveCD and running "find /boot/grub/stage1", finds the same details as already stated, even though the partitions are quite different. I'll have to delve a little deeper, so that I can correctly dual-boot, without having Grub installed on my XP disk's MBR
    Last edited by flarkit; October 3rd, 2007 at 09:00 AM.
    Linux = freedom for the masses
    PC: A8N-SLI, 4400+, 8800GT, 2x1Gb DDR400,160+2x1Tb

  3. #143
    Join Date
    Feb 2006
    Location
    ZA
    Beans
    56
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    My problem was solved as follows:

    1. Swap SATA cables, so my 250Gb (with Feisty) is the 1st drive
    2. Then, make that the boot-up disk (obviously, since I want Grub on there)
    3. Then I booted with the LiveCD and followed the instructions to setup Grub (from How to Install Grub...)
    4. I edited the menu.lst file, to ensure that Feisty is booted from 'hd0' and Feisty from 'hd1'


    All works happily!
    Last edited by flarkit; October 3rd, 2007 at 04:25 PM.
    Linux = freedom for the masses
    PC: A8N-SLI, 4400+, 8800GT, 2x1Gb DDR400,160+2x1Tb

  4. #144
    Join Date
    Oct 2007
    Beans
    4

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

    Wow, read all this and it didn't address the problem I'm having, and some others on this thread had.

    Scenario:
    -installed Ubuntu on secondary, 80 gb ATA HD
    -Windows XP already existed on primary, 250 gb SATA HD

    When I rebooted after install, it just went right into XP because GRUB installed onto the MBR of the secondary, 80 gb drive which did not have boot priority in my BIOS.

    SOLUTION: Switched my BIOS around to make the secondary drive have boot priority. Now GRUB loads up, asks me if I want to run Ubuntu or Windows XP. Yep, GRUB is smarter than XP.

    Grub:1 XP:0

  5. #145
    Join Date
    May 2007
    Beans
    4

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

    I am experiencing this problem, with only one partition on my laptop... I find I HAVE to format someting in order to proceed, so I tried resizing my partition and the formatter crashed... Even reinstalling Grub will not work. Ubuntu 7.10

  6. #146
    Join Date
    Nov 2007
    Beans
    9
    Distro
    Ubuntu Studio 11.04 Natty Narwhal

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

    I just tried the technique with the install CD for Ubuntu Studio 7.10 and it worked great! It even detected my Fedora 8 partition! WHOO HOO!!! There were a few extra "no" commands because it kept trying to go back to the BASE INSTALL, but the bootloader reinstalled anyway. Thanks for this great post!

  7. #147
    Join Date
    Jul 2007
    Beans
    20

    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

    How can i tell if i need to type "root (hd0,6)" hd0,5 hd 0,4 or whatever?
    i know i have on my main HD two partitions. C: and D:
    this "hd0,x" still get me confused

  8. #148
    Join Date
    Jul 2007
    Beans
    90

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

    Quote Originally Posted by danezeq View Post
    How can i tell if i need to type "root (hd0,6)" hd0,5 hd 0,4 or whatever?
    You can type "sudo fdisk -l" (make sure you type it correctly) and that'll list your partitions like displayed before in this thread. You will then know where your linux partition is.

    i know i have on my main HD two partitions. C: and D:
    this "hd0,x" still get me confused
    As I understand it, if your linux partition is on /dev/hda or /dev/sda then that means you want root(hd0, blah). If the "a" is a "b" then "hd1", "c" hd2", etc.

    If the partition is /dev/hda1, then you need root(hd0,0), /dev/hda2 would be root(hd0,1).

    So to summerise:
    1 = a = 0
    2 = b = 1
    3 = c = 2
    etc.

    Welcome to Computer Science.
    "By three methods we may learn wisdom: First, by reflection, which is noblest; second, by imitation, which is easiest; and third by experience, which is the bitterest."

  9. #149
    Join Date
    Jul 2007
    Beans
    20

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

    ok i did type on grub console "root (hd0,1) and i got "Error 21: Selected disk does not exist

    on the fdisk list - the linux partition showed as /dev/hda2
    What's wrong then?

    i'm from the DOS generation

  10. #150
    Join Date
    Jul 2005
    Beans
    1,294
    Distro
    Hardy Heron (Ubuntu Development)

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

    i did type on grub console "root (hd0,1) and i got "Error 21: Selected disk does not exist
    Make sure that you use "sudo grub" and not only "grub"

    Also you can find out the correct (hdx,y) via

    Code:
    sudo grub
    find /boot/grub/stage1

Page 15 of 26 FirstFirst ... 5131415161725 ... 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
  •