Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-16-2006, 05:44 AM
|
#1
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Rep:
|
windows xp screwed fedora 5 grub loader
Unfortunately I had to re-install Windows XP on my existing Fedora-XP dual boot and Windows XP took over the GRUB. I tried the command “linux rescue” (truly speaking….I really don’t know how to use that but…) by booting from the Fedora DVD and went thru this command “grub-install” /”dev/xxx dir”, which punched me with a bouncer "could not find grub"……......I am sick of re-installing linux(I used to re-install linux every time windows xp screwed the boot loader)…......so please help me with an easy solution….if possible...
|
|
|
05-16-2006, 05:56 AM
|
#2
|
Member
Registered: May 2004
Location: Student of University of Mumbai, Maharastra State, India
Distribution: Redhat Linux 9.0, Knoppix LIVE CD, Ubuntu Live CD, Kubuntu Live CD
Posts: 483
Rep:
|
1. Where did you issue the command, exactly?
2. the command should be grub-install /dev/hdax where x is the partition, where you are supposed to install it.(mostly where fedora is installed, most likely hda2)
3. So far, I have just learnt this way, of restoring grub..
you can search the forum, or on the Internet and find out.
|
|
|
05-16-2006, 05:59 AM
|
#3
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
I think that is what I entered in linux rescue command prompt......
grub-install /dev/hda3, which bounces back as
could not find grub
|
|
|
05-16-2006, 06:02 AM
|
#4
|
Member
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464
Rep:
|
Did you choose grub or lilo as the boot loader during the install?
Is possible you have lilo installed. Re-try the linux rescue but reinstall lilo.
There are plenty of posts and instructions on this site if you need help on restoring lilo.
|
|
|
05-16-2006, 06:03 AM
|
#5
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
I am 100% confident that I used grub.....
I last used lilo on redhat 7.0
|
|
|
05-16-2006, 07:00 AM
|
#6
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Rep:
|
Hi
Try your rescue cd again to try an boot into your Linux. You can do this with:
boot /dev/hdX (here you will need to know what partition contains the root files)
If you do not know where the linux and windows partition are layed out, from the
rescue cd command line, type:
fdisk -l /dev/hda
This will tell you how your disk is partitioned and where Linux is and where Windows is.
Once you can boot into Linux, find where grub is installed at:
locate grub (or find grub)
This will tell you where grub is installed to (e.g. /usr/share/grub/i386)
Change to that directory. From there you can create a grub boot floppy to reinstall grub. Put a floppy into your drive and type:
$ dd if=stage1 of=/dev/fd0 bs=512 count=1
That command writes one block, with a block size of 512, or stage 1.
Then type:
$ dd if=stage2 of=/dev/fd0 bs=512 seek=1
This should have created a bootable GRUB floppy. This will boot to the GRUB command line. From the floppy, try the grub-install /dev/hdaX.
Hope this helps
Bob
|
|
|
05-16-2006, 07:03 AM
|
#7
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
Many thanks for the reply Bob,
But I can't use floppy as Fedora is on my laptop.
|
|
|
05-16-2006, 07:28 AM
|
#8
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Rep:
|
OK
Are you able to get to a command line from the rescue CD? If so, make sure there is a root prompt. Put the Fedora installation cd into the drive and when it gets to the prompt that says boot: and type: linux rescue
The cd will find your linux installation and ask you if you want to mount /mnt/sysimage, answer yes (you are not harming any files by doing this)
When you get to the command line, type:
chroot /mnt/sysimage
You should now be at a command line as root, so remember that and be careful.
Once at the command line as root, type:
grub
this should take you to another command line like this:
grub>
from there type: find /boot/grub/stage1
From the information that is returned (e.g. (hd0,0), type:
grub> root (hd0,0) (this sets the GRUB root device)
Then, run the setup command to install GRUB. If you have one drive and Windows is on the first partition of the drive and Linux is on the second partition, you would install GRUB to the MBR like this:
grub> setup (hd0)
This will install grub back to your MBR, overwriting what is there. You should then see the grub boot screen when you reboot. You will then have to go to your grub config file in the boot directory to make sure the grub configuration file is correct to also be able to boot windows.
Hope this helps
Bob
|
|
|
05-16-2006, 08:31 AM
|
#9
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
Thanks Bob,
The command grub-install /dev/sda1 really worked and I can boot into linux without any problem. The same old boot screen comes up and I can select Fedora 5 and boot into it.
But......but.....when I select Windows XP......Boom.....a screen comes up
rootnoverify (hd0,0)
chainloader +1
and after 3 seconds it goes back to the grub boot screen....and asks me to select the operating system i.e, Fedora 5 or Windows XP......If I select XP.....does the same thing....but boots into Linux perfectly
Last edited by vishallagdev; 05-16-2006 at 08:32 AM.
|
|
|
05-16-2006, 08:41 AM
|
#10
|
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526
Rep:
|
Glad you got Linux going again. Now let's fix the Windows boot.....
You will need to boot into Linux and go the /boot directory. There you will find a grub.conf file (or menu1st, which is just a symbolic link to the grub file).
As root, open the file to edit it.
Your Linux boot information will look something like this:
title Fedora Core 5 (2.6.X.X)
root (h0,1) #meaning the the second partition on the drive
kernel /boot/vmlinuz-2.6.XX.X ro root=LABEL=/
initrd /initrd-2.6.XX.X
Now, make sure the entry for Windows is correct:
title Windows XP
root (hd0,0)
makeactive
rootnoverify (hd0,0)
chainloader +1
This will boot you back into windows as long as your Windows installation is on the first partition of your hard drive.
Hope this helps
|
|
|
05-16-2006, 08:45 AM
|
#11
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
This is what my grub.conf says
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=3
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.16-1.2096_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.16-1.2096_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.16-1.2096_FC5.img
title Fedora Core (2.6.16-1.2080_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.16-1.2080_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.16-1.2080_FC5.img
title Fedora Core 5 (2.6.15-1.2054_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.img
title Microsoft Windows XP
rootnoverify (hd0,0)
chainloader +1
|
|
|
05-16-2006, 08:50 AM
|
#12
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
This is what my grub.conf says
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,2)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=3
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.16-1.2096_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.16-1.2096_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.16-1.2096_FC5.img
title Fedora Core (2.6.16-1.2080_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.16-1.2080_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.16-1.2080_FC5.img
title Fedora Core 5 (2.6.15-1.2054_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.img
title Microsoft Windows XP
rootnoverify (hd0,0)
chainloader +1
|
|
|
05-16-2006, 08:51 AM
|
#13
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
Also,
As I select to boot from Windows XP
The new screen says
rootnoverify (hd0,0)
chainloader +1
Entering(something similar) GRUB stage2..
|
|
|
05-16-2006, 08:52 AM
|
#14
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
Also,
As I select to boot from Windows XP
The new screen says
rootnoverify (hd0,0)
chainloader +1
Entering(something similar) GRUB stage2..
|
|
|
05-16-2006, 08:54 AM
|
#15
|
LQ Newbie
Registered: Mar 2006
Location: Melbourne Central Queensland University
Distribution: Fedora 5
Posts: 24
Original Poster
Rep:
|
Hi Bob,
I forgot to post it before....
As I select to boot from Windows XP
the new screen says.....
rootnoverify (hd0,0)
chainloader +1
entering (or something similar) GRUB stage2...
|
|
|
All times are GMT -5. The time now is 08:08 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|