Recovering Grub Boot Loader

Hi ,

I just Instaled Windows XP and the Grub Boot loader is corrupted :( .

I have Installed FC5 and the partitions are

/Boot, Swap, /, /Home .

so now how can I install Grub Boot loader with the Rescue CD?

seeking suggestions

Thanks
19 answers Last reply
More about recovering grub boot loader
  1. Well if you will play with the evil Bill... :wink:

    You could do a lot worse than have a look at this Linux Questions thread talking about the same problem..

    www.linuxquestions.org

    And just to be on the safe side... Here is an article on getting XP back onto your list of bootable OS after restoring GRUB.

    www.linuxquestions.org

    Please post back and let us know how you get on.. Hope this gets you back up and running.
  2. Excellent explanation :-D :trophy: :trophy:


    Another way to do this is to mount your partitions, chroot to your root partition edit /etc/grub.conf if necessary and run /sbin/grub-install $options /dev/sd?

    Where $options = --recheck

    sometimes you have to specify

    --grub-shell=/path/to/grub

    normally

    --grub-shell=/sbin/grub

    and

    --root-directory=/mnt/.........

    normally

    --root-directory=/

    of course /dev/sd? is your HDD usually /dev/sda, /dev/sdb etc

    man grub-install for more info

    GL :-D
  3. well Thanks for those Valuable information. I understood the stuffs clearly.

    but sorry for the delayed response.

    let me clarify my partitions first.(I have given LInux parttions here).
    =========start==========end==========blocks======i d=====system

    /dev/hda3 -- 16710 ---------19457 --------- 22073310(/)--- 83----- Linux
    /dev/hda8---15666----------15729----------514048(/boot)--83------Linux
    /dev/hda9---15730----------16048---------2562336(swap)--82---Linx Swap
    /dev/hda10--16049----------16709----------5309451(/home)--83---Linux

    but when I say "grub-install /dev/hda" it says /dev/hda:Not found or not a block!!.
    above all

    after "Linux rescue" it attepmts to recover the Installed Linux but it says "
    it says an error occured trying to mount some or all of your system.some of it may be mounted under .mnt/sysimage.

    press enter to get a shell.system reboots once you exit from the shell.
    .


    by the way when I say fdisk -l at the Boot prompt it says Could not find the Kernel Image..
    but works fine on SHELL prompt.


    I attepmted on Shell prompt but the problem persists still.


  4. Those are some whacky partition numbers, what else have you installed on this machine?
  5. Man I have installed windows XP as well.

    fdisk -l displays all the devices starting from

    /dev/hda1 to /dev/hda10. but here I have given the Linux partitions only.

    and my /, /boot, swap and /home partitions are indicated as well.

    did you find anything messed up here?

    by the fdisk -l doesnot work on Boot prompt for me

    it says "Kernel Image not found".
    I executed fdisk -l on Shell prompt.

    if you need clear fdisk -l output with all partitions I post for sure .

    Thanks
  6. Yes, please post the entire output of fdisk -l
  7. Disk:/dev/hda:160.0GB

    Device===boot ===start===end===blocks=======ID===System

    /dev/hda1 * ===1===1305===10482381======C===W95 Fat32(LBA)
    /hda2=======1306==16709==123732630======F===W95 Ext(LBA)
    /hda3=====16710==19457==22073310=======83===Linux
    /hda5====1306====5874==36700461========B===W95 Fat32
    /hda6====5875===10443==36700461========B===W95 Fat32
    /hda7===10444===15665==41945683+===B===W95 Fat32
    /hda8===15666===15729==514048+====83===LInux
    /hda9===15730===16048==2562336=========82=Linx Swap/Solaris
    /hda10==16049===16709==5309451========83===Linux

    yeah Man. this is the output of fdisk -l executed on Shell Prompt.

    No of Blocks in /hda7 and /hda8 is suffixed by +. why is it so?

    I dont have /hda4

    Thanks
  8. anything fishy in fdisk -l output?

    am I still able to install Grub on it?
  9. Do you know what exists on each of those partitions? It seems very unusual to have 4 FAT32 partitions on a single drive.

    Not having hda4 is OK, as any of the partitions above hda4 are actually logical partitions encapsulated in the hda2 extended partition (a work-around to a legacy limitation on number of partitions based on the MBR's partition table).

    In light of the layout of your disk, you should be able to run my instruction with the modification that you told the installer not to use LVM and as such, you need to figure out which partition (type 0x83, Linux) contains your /boot partition (likely hda8)

    I would most certainly figure out a cleaner scheme for you disk layout, then again that is my personal preference.
  10. yeah Man

    /hda1 is my C drive,

    I guess /hda2 is the total of /hda5,/hda6./hda7 which is my D,E,and F drives respectively. which are 35, 35, and 40GB respectively.

    and /hda8 is my /boot partition
    /hda10 is my /Home partition.

    anysuggestion for tye disk layout are most welcome Man.

    so how can I approach to install the Grub boot loader.
  11. Get a so-called grub boot disk/CD to get you to a grub prompt. Once there, since you know the layout of the disk, follow my first post's instructions from the part after the "grub" command, being mindful of the change from hda2 to hda8 and (hd0,1) to (hd0,7).

    You can get a grub iso from here or simply use a livecd such as the standard ubuntu install disk.
  12. yeah Man!

    it worked!!!!!!!!!!!! :D

    Thanks a Lot Man!! Thanks to the Forum as well!!!


    but one problem persists eversince I installed FC5. once I getinto Graphics screen after some time System get Stuck. the only way to work around this is to restart the System. why it happens so? :(

    Man are you a Linux Developer?

    Thanks for your timely Help again!! :)
  13. Quote:
    but one problem persists eversince I installed FC5. once I getinto Graphics screen after some time System get Stuck. the only way to work around this is to restart the System. why it happens so?


    Can you clarify here a little? Are you saying that, after having used the system for a while it will freeze or that, after using the system and logging out (going back to the login screen) it will freeze, or something else? It sounds like an X driver issue nonetheless (or possibly something worse, hardware instability 8O ), but a little more info may help narrow down the problem.

    Quote:
    Man are you a Linux Developer?

    I am in the sense that I use Linux as my dev system but the only patch I've ever submitted for the kernel was rejected (someone did a better job of patching the problem than I).
  14. Development does not just equal coding in my book, you have to look at the whole software life cycle. As a developer you are well aware that most of the cost in software is in the maintenance and support stage.

    A kernel patch or module does carry bragging rights and membership of a fairly small club but its not the only side of Linux development. Developing user knowledge and awareness, testing new releases ahead of less experienced users. It is all part of the process.

    I'd say you are an active developer :wink:
  15. well I dont think it is due to Hardware Instability. as I had Red Had Linux 9.0 with 2.4 Kernel Version.everything was alright with that.I did not have any sort of problems.

    what happens after working for some time on XWindow the Linux system come sto halt.it hangs in other words.

    but everything goes fine with Text terminals.

    what could be the reason?

    I have Krypton Motherboard with Nvidia Chipset. with AMD Athlon 64 Bit Processor.
  16. nVidia chipsets are usually very good :-D

    What kind of VGA card do you have? Onboard nVidia? AGP? PCI-E? PCI?

    Please post the full output of lspci for us.

    Also when X freezes can you hit ALT + CTRL + BACKSPACE ( not delete ) to kill X and respawn the X server?

    Have you checked /var/log/* for any relevant log entries?


    GL :-D


    Quote:
    well I dont think it is due to Hardware Instability. as I had Red Had Linux 9.0 with 2.4 Kernel Version.everything was alright with that.I did not have any sort of problems.

    what happens after working for some time on XWindow the Linux system come sto halt.it hangs in other words.

    but everything goes fine with Text terminals.

    what could be the reason?

    I have Krypton Motherboard with Nvidia Chipset. with AMD Athlon 64 Bit Processor.
  17. yeah Man I have onboard VGA.
    yeah I cant even Kill the Xserver when the system freezes.

    anyway I am gonna Install FC6 soon :D
    if the Problem persists then as well we shall discuss more on it! :)

    as Red hat 9.0 was well on my Motherboard I dont think hardware instability comes into picture.

    well let us see what happens with FC6!!! :lol:

    I always upgrade my Linux!


    Thanks Man
  18. Make sure you install the updates!

    Normally, if you have a very fast internet connection you run:


    yum update
    [/code:1:0e40a78614]

    There may be several Gigs of updates if you install [b]everything[/b] so you may have to find a local mirror.

    GL :-D
Ask a new question

Read More

Boot Grub Windows XP