LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   lost my bootloader (https://www.linuxquestions.org/questions/linux-software-2/lost-my-bootloader-13309/)

caphead 02-01-2002 02:22 PM

lost my bootloader
 
ok first of all i should say im a newbie with about 4 months linux time.....

what i had was i had win98se on my primary master with grub loaded on there... now my redhat 7.2 installation is on a totally diffrent drive (secondary master)... well i had to reformat and reinstall my win98 os and doing so i lost my bootloader(grub)

i would really like to have this working back as a dual booter with grub installed on my proimary master like it was...

i tried rescue linux option off disc but nothing seems to work... ive had some ideas shown to me on this post:
http://www.dslreports.com/forum/rema...xdsl~mode=flat

but still cant get it to reinstall grub please help me i dont want to have to reinstall redhat because being new and all it took quite along time getting it to where i want it.. any suggestions?

caphead 02-01-2002 03:30 PM

bump plaese anyone????

Sleel 02-01-2002 03:32 PM

The easiest solution is to buy PartitionMagic 6.0 that includes BootMagic--a multiple OS loader that sits on your first HD. It usually gets all the OSs on its GUI list the first time you install.

A linux solution? Well, the Windows' installation overwrote the MBR and destroyed your LILO (or bootloader). I hope you have the boot disk to boot linux that you were prompted to make during the inititial Red Hat 7.2 installation...If you do, you should be able to boot Linux, revise the LILO configuration found at /etc/lilo.conf, to include the Windows boot image, and then run the LILO map installer /sbin/lilo to reinstall LILO.


Good Luck!

James

caphead 02-01-2002 03:44 PM

well i have the boot disk but being new it doesnt help me out once i get to the shell what to i have to do from there on out? i just want to re run grub install but that doesnt seem to be a option take a look at the link i posted in original message this is everything i have done so far!

Sleel 02-01-2002 03:55 PM

help...
 
If you don't know how to work with linux (editing config files suing vi or another editor, etc.), I think the easiest thing is to reinstall the linux distro so that the boot info will be rewritten.

If you really don't want to do that....buy Partitionmagic 6.0. It has a program called BootMagic that is a bootloader for many operating systems. It installs under windows and detects, automatically everytime I have used it, the oses and partitions existing on the comp. system when installed.

THen you get a nice graphical boot option when you turn on your computer.

But..it costs about 40 USD.

Good Luck.

James

ryanstrayer 02-01-2002 04:25 PM

Once you use your boot disk and get a shell prompt - make sure you can get to your linux hard drive.. type ' mount ' and you should see a list of your mounts and the drive's they are on. Look for something like

/dev/hda1 on / type ext2 (rw)

The hda1 may actually say hdb1 or something like that - but the " on / " is what is important.

If you can get to your linux partitions then you're in good shape. From there type:

grub

If that doesn't return anything, it should be located in your /sbin directory.. just type /sbin/grub (it might be /usr/sbin, can't remember, I still use lilo)

Once you are in grub, you'll have a grub> command line. From there type:

setup (hd0)

this should reinstall grub onto your MBR so you can dual boot again.

Be sure your /etc/grub.conf file is setup the way you want it, before you do this. Some config info for this is at http://www.gnu.org/manual/grub-0.90. And the reason I'm pointing you to there, is this can be a long an involved process. If you have specific questions after reviewing it, please feel free to ask.

caphead 02-01-2002 04:31 PM

buy partition magic? that runs under windows? how can you honestly say that and expect to help nevermind im looking for someone thats a true fan of linux willing to help others make the convert! i am not planning on keeping windoze os any longer than i have to...so buying something that runs under windoze is not a option! Funny the header on my browser tells me linuxquestions.org not linuxproblemssolvedbyusingwindowsapps.org

not meaning to flame here , just the time ive spent trying to do this before and after i started askinfg for suggestions is getting should i say "Aggervating" weve all been there once or twice ..

thanks alot for the suggestion but i cannot do that knowing theres a way without it and eventually ill solve it


:smash: :study: :study: :smash:

caphead 02-01-2002 04:37 PM

Quote:

Originally posted by ryanstrayer

Once you are in grub, you'll have a grub> command line. From there type:

setup (hd0)

this should reinstall grub onto your MBR so you can dual boot again.

Be sure your /etc/grub.conf file is setup the way you want it, before you do this. Some config info for this is at http://www.gnu.org/manual/grub-0.90. And the reason I'm pointing you to there, is this can be a long an involved process. If you have specific questions after reviewing it, please feel free to ask.

:D :D :D
thumbs up to you bro thats knowledge i can use seems i got to the grub> command line but was stuck there thanks time to try also would my grub.conf file have changed since i formated the drive the MBR was on? the os was the same as last os that was on there

caphead 02-01-2002 05:04 PM

error 23:
 
when i do a grub> setup (hd0) i get this:
error 23: error while parsing number
any ideas? i figure im missing something

ryanstrayer 02-01-2002 05:15 PM

What does it say when you type:

find /boot/grub/stage1

caphead 02-01-2002 05:31 PM

..
 
it says /boot/grub/stage1 then gives me a command promp again like it found it but the command promp is still the same [root@localhost]#

Thymox 02-01-2002 08:06 PM

I tried something called XOSL at one point. It actually works very well. It's a bit confusing at first though.

linuxcool 02-01-2002 11:31 PM

caphead, ryanstrayer meant for you to run the whole line as a command. Run find /boot/grub/stage1. After you run it, it will list the partitions where the stage1 loader is located. It should list only one partition in your case. Next, run root (hd?,?). Replace the ?'s with the partition info from the previous command. Then run setup (hd0)

caphead 02-02-2002 02:12 AM

success!!!!
 
well it seems after bouncing my head against the wall till i finally thunk logically (bit of luck too) the solution was as easy as this and yes i did figure this out myself...

from linux rescue
chroot /mnt/sysimage
#su
#cd /sbin
#grub-install hda1
#exit
#exit
#exit
rebooted and i have a grub screen and im finally posting with redhat again...
only thing now i noticed upon linux loading i have a couple [failed] in some things that i noticed had hda?(went to fast) im thinking thoose are the results of my feeble attempts at trying everything everyone suggested, not that i am saying they were wrong but for my newbie linux intelligence they were not happening.... I appreciate everyones help and suggestions (cept maybee the partition magic concept) but all in all it was a delightful experiance thanks again
Caphead:Pengy:

linuxcool 02-02-2002 05:09 PM

caphead, I believe the command grub-install is used on newer versions of grub. What I gave you was for older versions. Also, the command that you used grub-install hda1 would install grub on the partition hda1 and not the mbr. You would use hda instead of hda1. For more on grub try man grub or info grub.

As for those error messages, check the dmesg file. I think it's here: /var/log/dmesg and see if you can find those errors about hda.


All times are GMT -5. The time now is 01:47 AM.