LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2006, 06:22 PM   #1
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 6
Posts: 354
Blog Entries: 4

Rep: Reputation: 63
Exclamation 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
 
Old 12-29-2006, 07:19 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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)

Last edited by pixellany; 12-29-2006 at 07:20 PM.
 
Old 12-30-2006, 01:11 AM   #3
nigelc
Member
 
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 6
Posts: 354
Blog Entries: 4

Original Poster
Rep: Reputation: 63
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
 
Old 12-30-2006, 05:47 AM   #4
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 61
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
fc3 install doesnt install grub properly onto sata drive sabo Linux - Newbie 4 02-03-2007 04:04 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM
[GRUB]how to install grub onto another partition Liquid_T<NL> Linux - Newbie 1 09-05-2005 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration