LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Re-install Grub ...viruses (https://www.linuxquestions.org/questions/linux-newbie-8/re-install-grub-viruses-514732/)

nigelc 12-29-2006 06:22 PM

Re-install Grub ...viruses
 
Hi,
I Have a system with Windoze XP on the first drive and Fedora core 5 on the second. The windoze has a worms and viruses. I want to re-install the windows. I have copied the mbr with dd if=dev/sda of=/home/ewok/boot.mbr bs=512 count=1 Is that all I need to get the grub to work again? Or do I just need to run grub.
thanks nigelc

pixellany 12-29-2006 07:19 PM

Quote:

Originally Posted by nigelc
Hi,
I Have a system with Windoze XP on the first drive and Fedora core 5 on the second. The windoze has a worms and viruses. I want to re-install the windows. I have copied the mbr with dd if=dev/sda of=/home/ewok/boot.mbr bs=512 count=1 Is that all I need to get the grub to work again? Or do I just need to run grub.
thanks nigelc

That will indeed make a copy of the mbr, but you will still need a way to get into Fedora after Windows is installed. One way to do it is simply install grub on a floppy.

I don't recall if the FC5 boot CD has an option to boot the existing install.

To put grub on a floppy:

Code:

dd if=/dev/sda of=/dev/fd0 bs=512 count=1

OR

grub
root (hdX,Y)
      --replace X,Y with the drive #, partition #
where  /boot is mounted, remembering that grub counts from zero.
 If /boot is on sda2, then, it will be (hd0,1)
setup (fd0)


nigelc 12-30-2006 01:11 AM

Cannot boot Fedora ..Help
 
hi,
I have re-installed windows xp on my first drive Tryed to boot the Fedora from the dvd and re-install the mbr. Went into an alt console, but now it is corrupted. reformated the partition. installed Fedora, but it does not seem put the grub loader on the disk. It asked for some kernel parameters. There were some there before, but I cannot remember what they were.
The system just boots into windows just like the grub was not there.
the drives are /dev/sda /dev/sb3
the fedora was on /dev/VolGroup00/LogVol00 which i think is /dev/sdb3
thanks
nigelc

Hitboxx 12-30-2006 05:47 AM

Try this.
1) Load the Fedroa CD/DVD in the drive
2) Type "linux rescue" at the prompt
3) Then "chroot /mnt/sysimage"
4) And finally "grub-install /dev/sda"
5) Reboot


All times are GMT -5. The time now is 02:25 PM.