1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How do i restore the bootloader after nuking the mbr using fdisk /mbr ??

Discussion in 'Linux and Unix' started by twisted_mind, Apr 15, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. twisted_mind

    twisted_mind Thread Starter

    Joined:
    Feb 24, 2003
    Messages:
    211
    OK.. this has happened for the fourth time in a week now... i boot up my computer ( win98 + Red hat 9) and the bootloader just appears half.... like Li-
    and it hangs there.
    So i put in my windows98 bootable floppy and fdisk /mbr. Now the last three times it happened, i just booted into win98 and using PartitionMagic 8 formatted the Linux partition.
    I'm tired of formatting the linux partition and having to set up linux all over again... :( Is there any way i could restore the bootloader or perhaps boot into linux and install the bootloader or something??? I haven't created a linux bootable floppy.
    Please keep in mind that i'm a real noob at linux... so try keeping the answer really simple.
    With Regards,
    Umesh
     
  2. Grinler

    Grinler Malware Specialist

    Joined:
    Mar 10, 2004
    Messages:
    103
    What version/distribution of linux are you using? Also do you know if you were using Grub or Lilo as your boot loader?

    The process is to generally boot in with a boot/repair disk and rererun the bootloader installation.

    For grub enter something like:
    /sbin/grub-install /dev/hda

    For lilo enter:

    /sbin/lilo

    And it should set up lilo as it was set up originally from the settings in /etc/lilo.conf
     
  3. lynch

    lynch

    Joined:
    Aug 3, 2002
    Messages:
    1,961
    That or make a RH bootdisk and keep it handy.
    HTH
    lynch
     
  4. Grinler

    Grinler Malware Specialist

    Joined:
    Mar 10, 2004
    Messages:
    103
    I do not remember, does the redhat bootdisk fix lilo on its own or do you still need to actually run the configuration commands?
     
  5. Whiteskin

    Whiteskin

    Joined:
    Nov 15, 2002
    Messages:
    1,964
    Well, its Lilo. I doubt it rewrites it itself. More likely is that you will need to do it manually.
     
  6. lynch

    lynch

    Joined:
    Aug 3, 2002
    Messages:
    1,961
    I meant to just boot from the floppy.
    I think you would have to do it manually with the bootdisk; probably not if you use the CD to boot with.
    lynch
     
  7. twisted_mind

    twisted_mind Thread Starter

    Joined:
    Feb 24, 2003
    Messages:
    211
    guys.... i am able to now boot into linux. This is what i did last night..
    I popped in the cd 1 of red hat 9 and booted off the cd.... then i went ahead with an upgrade of the red hat installation but didnt select any packages to be upgraded.At the end of the upgrade? process, i was asked if i wanted to create a boot diskette... i put a floppy in... and a bootable floppy was created.
    Now i am able to boot into linux if i have the floppy in the drive. But how do i install a bootloader as well?
     
  8. Whiteskin

    Whiteskin

    Joined:
    Nov 15, 2002
    Messages:
    1,964
    Well, since it is lilo, check your lilo configuration (man lilo.conf) and then just rerun lilo (as root "lilo").
     
  9. twisted_mind

    twisted_mind Thread Starter

    Joined:
    Feb 24, 2003
    Messages:
    211
    hey.. when i type lilo as a root user... i get a command not found error.
    By the way, i did as Grinler said above,
    # /sbin/grub-install /dev/hda
    So now grub is installed.. :) Problem solved! Thanks to all of u !
    With Regards,
    Umesh
     
  10. Whiteskin

    Whiteskin

    Joined:
    Nov 15, 2002
    Messages:
    1,964
    Cool. the "li" message indicated that it was trying to start lilo. Perhaps Accidentally the install made a mistake, and did not install lilo. Anyhow. People seem to like grub.
     
  11. twisted_mind

    twisted_mind Thread Starter

    Joined:
    Feb 24, 2003
    Messages:
    211
    :) yeah.. grub it is now what i have. Incase it gets corrupted again i have the bootable floppy and now i know the command to install grub again!
    By the way, Anyone got an idea why i get the error "command not found" when i type pico ?? Pico loads up at my classes where i learn linux ( its red hat 6 there) but at home on my rh9 system, its not there.i did a custom install n didnt see pico anywhere...correct me if i'm wrong.
    With Regards,
    Umesh
     
  12. lynch

    lynch

    Joined:
    Aug 3, 2002
    Messages:
    1,961
    I think you need to have pine installed, as pico is part of the pine package.
    HTH
    lynch
     
  13. Whiteskin

    Whiteskin

    Joined:
    Nov 15, 2002
    Messages:
    1,964
    It might be best to also learn another more standard editor (emacs or vi). Lets try not to get into a little editor war here though.
     
  14. lynch

    lynch

    Joined:
    Aug 3, 2002
    Messages:
    1,961
    I agree.
    I use vi. :)
    lynch
     
  15. Whiteskin

    Whiteskin

    Joined:
    Nov 15, 2002
    Messages:
    1,964
    As do i. I dunno. I just like it. Though, gvim gave me a headache the other day. It duplicated very paragraph i wrote, two or three times.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - restore bootloader nuking
  1. dglore123
    Replies:
    9
    Views:
    518
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/220671

  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.
    Dismiss Notice