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

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 

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
 

Grinler

Malware Specialist
Joined
Mar 10, 2004
Messages
103
lynch said:
That or make a RH bootdisk and keep it handy.
HTH
lynch
I do not remember, does the redhat bootdisk fix lilo on its own or do you still need to actually run the configuration commands?
 
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.
 
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
 

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?
 
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").
 

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

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
 
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
 
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.
 
Joined
Aug 3, 2002
Messages
1,961
Whiteskin said:
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.
I agree.
I use vi. :)
lynch
 
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top