Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    Milddebury, Vt, US
    Posts
    9

    Ooops: Bootloader


    So I installed Ubuntu onto a slave hard drive I had previously had mandrake installed on and stupidly I went into the advanced options and changed the location for the bootloader to be installed from (hd0) to (hda1) where it definitely doesn't belong, I think (hda) might be the right location but most likely it was right with (hd0).

    Anyway I got a fatal error but I think it got all of ubuntu installed before that and just didn't install the bootloader. I already have Grub installed in the MBR of my primary drive from mandrake but don't know where to point it for the kernel and whatnot. Could someone just tell me what to type into the Grub prompt to add ubuntu to the menu. Ubuntu's filesystem is on hdb1 and XP Home Edition is on hda1 if that helps.

    Or alternately if someone could just tell me how to reinstall grub from Ubuntu (I am using the livedisc now) or what I need to put in the location to install the bootloader if i just decide to reinstall ubuntu.

    Thanks!

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Registered Linux user #270181

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    Milddebury, Vt, US
    Posts
    9
    Thanks it didn't work for me but was informative, I'm just going to reinstall ubuntu.

  4. $spacer_open
    $spacer_close
  5. #4
    Boot up using live Ubuntu cd

    When you get to the desktop open a terminal and enter

    Code:
    sudo grub
    This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands


    Code:
    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.
    use the value which was returned from above find /boot/grub/stage1 for the next commands


    Code:
    root (hd?,?)
    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


    Code:
    setup (hd0)
    Finally exit the grub shell


    Code:
    quit
    That is it. Grub will be installed to the mbr
    life is the greatest opportunity that the nature had given you

  6. #5
    -->
    Hey adem,

    It is possible to fix your mistake and edit the mandrake grub menu to include both XP and Ubuntu. However, it is a difficult multi-step operation. I would just advise you to go ahead and reinstall Ubuntu.. it doesn't take all that long anyhow. Just be sure and let the installer put the boot image on hd0 like it wants to by default. And VERY IMPORTANT: also make sure when you are editing the disk partitions, that you get WinXP into the grub menu too! Make sure of that. If you lose that XP bootimage info, you will probably have to reinstall XP and that won't be so easy. Make a backup of XP first, just in case.

    good luck

    cuervo

Posting Permissions

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