There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
adware audio bios blue screen boot bsod computer crash dell driver drivers dvd email error excel firefox freeze freezing google hard drive hardware hijackthis install internet laptop linux malware network no sound outlook problem reboot router screen slow sound speakers spyware startup trojan usb video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
How do i restore the bootloader after nuking the mbr using fdisk /mbr ??

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
twisted_mind's Avatar
Senior Member with 215 posts.
 
Join Date: Feb 2003
Location: Mumbai, India
15-Apr-2004, 11:00 AM #1
How do i restore the bootloader after nuking the mbr using fdisk /mbr ??
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's Avatar
Senior Member with 103 posts.
 
Join Date: Mar 2004
15-Apr-2004, 11:23 AM #2
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
__________________
--
Lawrence
http://www.bleepingcomputer.com
lynch's Avatar
Senior Member with 1,962 posts.
 
Join Date: Aug 2002
Location: Back East,Way Back East
15-Apr-2004, 05:09 PM #3
That or make a RH bootdisk and keep it handy.
HTH
lynch
Grinler's Avatar
Senior Member with 103 posts.
 
Join Date: Mar 2004
15-Apr-2004, 06:28 PM #4
Quote:
Originally Posted by lynch
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?
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
15-Apr-2004, 07:46 PM #5
Well, its Lilo. I doubt it rewrites it itself. More likely is that you will need to do it manually.
lynch's Avatar
Senior Member with 1,962 posts.
 
Join Date: Aug 2002
Location: Back East,Way Back East
15-Apr-2004, 07:56 PM #6
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's Avatar
Senior Member with 215 posts.
 
Join Date: Feb 2003
Location: Mumbai, India
16-Apr-2004, 02:16 AM #7
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?
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
16-Apr-2004, 05:18 PM #8
Well, since it is lilo, check your lilo configuration (man lilo.conf) and then just rerun lilo (as root "lilo").
twisted_mind's Avatar
Senior Member with 215 posts.
 
Join Date: Feb 2003
Location: Mumbai, India
17-Apr-2004, 12:33 AM #9
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
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
17-Apr-2004, 01:38 PM #10
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's Avatar
Senior Member with 215 posts.
 
Join Date: Feb 2003
Location: Mumbai, India
18-Apr-2004, 02:50 AM #11
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
lynch's Avatar
Senior Member with 1,962 posts.
 
Join Date: Aug 2002
Location: Back East,Way Back East
18-Apr-2004, 06:04 AM #12
I think you need to have pine installed, as pico is part of the pine package.
HTH
lynch
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
18-Apr-2004, 12:40 PM #13
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.
lynch's Avatar
Senior Member with 1,962 posts.
 
Join Date: Aug 2002
Location: Back East,Way Back East
18-Apr-2004, 01:25 PM #14
Quote:
Originally Posted by Whiteskin
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
Whiteskin's Avatar
Distinguished Member with 2,051 posts.
 
Join Date: Nov 2002
Location: Alberta, Canada
Experience: Windows: Decent. Unix/Linux: Advanced +1
18-Apr-2004, 01:59 PM #15
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.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 10:45 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.