LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub repair (https://www.linuxquestions.org/questions/linux-general-1/grub-repair-20512/)

Snake007uk 05-08-2002 03:31 PM

Grub repair
 
ok i had redhat 7.3 dual booting with windows XP perfectly, bu then my XP messed up so instead i reinstalled win2k, and uyes i know the over writes the MBR but i was wondering is there a way i mean i didnt put the linux on the first secotr i installed it on the MBR coz i was using Grub bootloader to dual boot, but im not bothered if iused grub or not,m but i need to be able to boot into linux one way or another but i have an SMP system so i do want it to boot the smp kernel, so is there a way i can either restore the grub bootloader or some how boot it using windows boot loader ?

Snake

zmedico 05-08-2002 04:19 PM

Here is a related thread where I tell how to make a syslinux boot floppy:
http://www.linuxquestions.org/questi...threadid=19989

jglen490 05-08-2002 04:33 PM

You can dual boot W2K and Linux using either Grub or W2K's NTLDR. Either way you will need to get back to your Linux space to get some data or update Grub.

Get a boot floppy going (either the one that you should have made during your Linux installation, or a downloaded one) then come back for furhter instructions. Or you can go to linuxdoc.org and try to follow some of the dual boot how-tos.

Snake007uk 05-08-2002 04:43 PM

ive got a bootfloppy which i am using at the moment, but please remeber that when i installed linux i installed th eboot loader in the mbr and now that has been overwritten by nt bootloader!

any instruction s would be great

Snake

Snake007uk 05-08-2002 05:15 PM

i dont want to boot from floppy, this is the problem

i had dusl boot working fine using grub but when my windows xp messed up i re installed win2k ok, now the MBR as be re written so so ican get a bootsect image of linux as i didnt place it in the first secotr of the drive i put it in !

i have linux and windows each on a seperate drive,

what i wanted to know was could i some how boot into linux ? without the use of a floppy ?

i know i installed the bootloader on the MBR and now that is gone but how do i get it to boot withou floppy !

icant even th do the dd .... thing coz i dont have a bootsecotr of the first sector of that drive!

if i cant get this sorted i will have to just re install linux, but i know there is a way around it, imean if you remove windows of the mbr all u have to do is boot up using the win2k cd got to the console and type "fixmbr " and it replace your bootsector witha valid one.. so there must be a way of sorting this out

Snake

linuxcool 05-09-2002 03:42 AM

Boot into linux and as root run the command grub-install (hd?). Replace the ' ? ' with the correct drive number. If you want to install it in the mbr of the primary master drive ( hda ), use ' 0 ' ( zero ). If it's the primary slave ( hdb ) then use ' 1 ' ( one ). Then reboot and see if it works.

Snake007uk 05-09-2002 07:04 AM

the problem is m8 i did that last time and i could even repair the bootsector i had to wip off everything and start over because windows would load

Snake

jglen490 05-09-2002 08:14 AM

Linuxcool is correct. Once you run grub-install, there should be a menu.lst file in /boot/grub that you can manually modify to set your default boot option and default boot time. Try it and see if you can find that file. You may need further assitance in editing that file, but the information in menu.lst is used to control your boot options under Grub.

Snake007uk 05-09-2002 12:14 PM

i type the command "grub-install (hda)"

but nothing happend it give the following error!

grub-install (hda0)
bash: syntax error near unexpected token `(hda0)'
[root@SKYNET root]#

jglen490 05-09-2002 01:49 PM

Try grub-install /dev/hda

Snake007uk 05-09-2002 03:26 PM

cheers m8 it all worked well!!! it working fine thanks!

thanks guyz

Snake :)

linuxcool 05-10-2002 03:31 AM

Snake007uk, I'm sorry you didn't understand my suggestion. If you had, you would have run the command grub-install (hd0). It's the same as running grub-install /dev/hda. hd0 is grub's way of labeling hda.

Glad you got it working. :)

murshed 05-10-2002 04:21 AM

i wonder why this happened to u from the beginning!

cuase i had this case exactly, with small differences ..

i had winxp .. and redhat 7.2 ..with lilo

i formated the winxp drive and installed win2k ...
but nothing happened to the lilo!!
it was still there .!! didn't disappear .. i asked someone about this thing.. and he said that win2k boots from boot.ini and doesn't do any thing to the MBR

now i upgraded to redhat 7.3 with grub .. it looks better that hte lilo:)


cheers

jglen490 05-10-2002 07:14 AM

As the great Winston Churchill said "We are two people separated by a common language". Glad you got it going :D !!


All times are GMT -5. The time now is 11:37 AM.