Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    37

    Reinstalling GRUB


    Hi All
    Can anyone please help with reinstalling GRUB? I tried a disasterous install of Mandrake 10.1 along side SUSE9.1 and Xp. To cut a long story short i have deleted the dual boot option. I dont want to use mandrake so deleting it doesnt matter, but within which O/S do i resore the dual boot option in and how?
    Any help greatly appreciated

  2. #2
    Well, with Suse you can boot from the install disk, select Install (i know it sounds weird) and get into the installer. When you get to the setup screen, it will give you a few options (fresh install, repair, etc.). Select Boot Installed System. That should get you into your old Suse installation. From there, you can hit a terminal or cli and reinstall grub.

    grub-install /dev/hda (if hda is where you're booting from)
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    37
    Hi
    I have tried doing as you suggested but it wont work, i keep getting message unable to repair system, is the only thing left a new install??

  4. $spacer_open
    $spacer_close
  5. #4
    What are you doing that you're getting an "unable to repair" message? You should be telling it to boot an installed system, not repair.
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  6. #5
    Just Joined!
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    37
    Hi
    I have tried this but the system boots up into mandrake and not suse. Which leaves me no better of thats why i tried the repasir function which doesnt seem to want to work. I have the 2 distros installed on my second hard drive if this is any help?

  7. #6
    The Suse installer should give you a choice between the two distros...you didn't nuke your Suse partition did you?
    There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

    - Jeremy S. Anderson

  8. #7
    Just Joined!
    Join Date
    Feb 2005
    Location
    Northern Ireland
    Posts
    37
    Hi
    No i dont get the 2 options i take it that i have nuked suse partition. If i reformat the complete second drive (120 gigs) repartition and reinstall suse do i need to repair the MBR in windows or will this be done automatically? i dont want to go through the whole process to find that the MBR is still screwed
    Any help greatly appreciated

  9. #8
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    The MBR will still have GRUB on it most likely after when you format the partitions on the second drive, and reinstalling will just overwrite that, so it should be fine.

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  10. #9
    Just Joined!
    Join Date
    Oct 2005
    Location
    India
    Posts
    23
    To repair it:
    If you didn't create the boot disk, boot with the Red Hat Linux CD number 1 and choose rescue mode typing:
    linux rescue

    Now you need to repair the ext3 filesystem because now it's bigger than before and the journal file must be created again

    First, check the filesystem:

    fsck.ext3 /dev/hda2

    Now, create again the journaling ext3 file:

    tune2fs -j /dev/hda2

    Now mount the root filesystem on /mnt/sysimage and run grub

    mount -t ext2 /dev/hda2 /mnt/sysimage
    cd /mnt/sysimage
    cd sbin
    grub

    Once started, GRUB will show the command line interface. First, set the GRUB's root device1 to the boot directory, like this:
    grub> root (hd0,1)
    If you are not sure which partition actually holds these files, use the command find, like this:
    grub> find /boot/grub/stage1
    This will search for the file name /boot/grub/stage1 and show the devices which contain the file.


    If you are using a separate /boot partition, as the official documentation says:
    "... if you have the partition /boot and you install GRUB images into the directory /boot/grub, GRUB recognizes that the images lies under the directory /grub but not /boot/grub"
    Then if 'find /boot/grub/stage1' does not find the file, try 'find /grub/stage1'

    Once you've set the root device correctly, run the command setup:
    grub> setup (hd0)
    This command will install GRUB on the MBR in the first drive.

Posting Permissions

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