Grub and dual booting stuff

Discussion in 'Linux / Unix Discussion' started by Fanatical, Mar 20, 2007.

  1. Fanatical

    Fanatical Byte Poster

    225
    6
    29
    Just about managed to get Ubuntu loaded onto my 2nd IDE Hdd and I was hoping to edit the MBR on this disk to have the GRUB give me the boot options. That way my intial HDD with XP on it doesn't get edited but I think it's gone and done it before I had a chance to alter the drives around.

    So can you guys point me in the direction I need to go. If the MBr has been aletered on my 1st HDD how can I change that back and then secondly how can I change the MBR on my 2nd drive to give me the GRUB options screen?

    Is it as simple as changing the jumpers so that the 2nd HDD is the primary drive (I assume not :P). So what do I need to do??
     
    Certifications: A+, MCDST
    WIP: MCITP: SA
  2. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    If it *has* changed the 1st HDD MBR then doing 'FIXMBR' from the recovery screen will sort that.

    You will then need to persuade the machine to boot from the 2nd HDD - this would normaly be a BIOS option.

    I don't know GRUB well enough to say how to get it to install on the 2nd HDD , but there is quite a lot of documentation on it about the 'net.

    EDIT: Whether messing around like this is a good idea is a completely different sack of ferrets. I'd be inclined to leave things as they are - it is a fairly standard installation.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  3. Fanatical

    Fanatical Byte Poster

    225
    6
    29
    If I removed the 2nd HDD or removed Ubuntu from it would the Grub just not work and boot automaticaly into XP? If so then thats all gravy.... :biggrin
     
    Certifications: A+, MCDST
    WIP: MCITP: SA
  4. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    If you did that then it would boot into XP just fine, but die if you selected Ubuntu. You may want to set the default boot to XP just in case.

    And GRUB can usualy be removed with the FIXMBR command.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  5. Fanatical

    Fanatical Byte Poster

    225
    6
    29
    OK, Really nooby question then.... how do you make XP the default? Is it easy to get into GRUB once any of the O/S are loaded?
     
    Certifications: A+, MCDST
    WIP: MCITP: SA
  6. Crito

    Crito Banned

    505
    14
    0
    Just edit the /boot/grub/grub.conf file (usually also soft linked as menu.lst) to change the boot menu. Unfortunately, becuase access to this file is required, if you delete or remove the partition or drive its on you'll lose your config. LiLo, on the other hand, writes all that info to the MBR itself, so it doesn't suffer from same prob. Unlike grub however, every time you make a change to lilo.conf you MUST re-write the MBR for those changes to take effect.
     
    Certifications: A few
    WIP: none
  7. Fanatical

    Fanatical Byte Poster

    225
    6
    29
    ok, found the lst file and read all the stuff about adding NUM values to change the default boot order but two probs:

    1) Where do I put the NUM values? Do i delete the savedefault line and replace with NUM x?

    2) How do I edit it! it says readonly and then says I'm not the owner so can't save any changes....
     
    Certifications: A+, MCDST
    WIP: MCITP: SA
  8. Crito

    Crito Banned

    505
    14
    0
    You have to be root to edit that file, then just change the default= line. I don't use Ubuntu but think I recall reading you can't su and have to sudo instead (to run progs as root.) Anyway, the de facto standard text editor for *nix is vi but it can seem difficult if you're not familiar with its use. So you might want to check if Ubuntu comes with a more user friendly one like joe or ee instead.

    Sorry for being somewhat vague, I'm more of a Red Hat guy these days. 8)
     
    Certifications: A few
    WIP: none
  9. Fanatical

    Fanatical Byte Poster

    225
    6
    29
    Managed to get the root terminal open then open gedit in that and then open the Menu.lst file. I found where I was getting confused. The line with the default number was right under the ## comments and I completely missed it (DUH!!!).

    Is there an easy way of opening the root terminal in ubuntu as it was a real pain the way I opened it?
     
    Certifications: A+, MCDST
    WIP: MCITP: SA
  10. SamSixty

    SamSixty Bit Poster

    18
    1
    20
    you can use
    Code:
    sudo nano /boot/grub/menu.lst
    to edit with nano from a terminal or
    Code:
    sudo gedit /boot/grub/menu.lst
    to edit with a notepad kind of editor

    If you want to get rid of ubuntu and have windows boot normally then boot with the XP disk and use recovery console and the 'fixboot' & 'fixmbr' commands then just delete the ubuntu partition from the disk manager snap in in windows.

    You can set grub to boot windows by default but if you delete the ubuntu partition your machine will hang at boot.

    It is possible to boot Linux from the windows boot.ini but I have never had the inclination to do it. It just points to grub anyway if I remember right so your better off using just grub imo.

    Oh, seems like this may be a little late.
     

Share This Page

Loading...
  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.