Re: Reinstall GRUB?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2008-01-26 at 17:02 -0500, Doctor Who wrote:
> 2008/1/26 Mikkel L. Ellertson <mikkel@xxxxxxxxxxxxxxxx>:
> > Doctor Who wrote:
> > >
> > > OK....the root partition for Fedora *used* to be /dev/sda2 and now is
> > > /dev/sdb2.  This is seen here:
> > >
> > >
> >
> > > I have changed /etc/grub.conf manually to be:
> > >
> > > # grub.conf generated by anaconda
> > > #
> > > # Note that you do not have to rerun grub after making changes to this file
> > > # NOTICE:  You do not have a /boot partition.  This means that
> > > #          all kernel and initrd paths are relative to /, eg.
> > > #          root (hd0,1)
> > > #          kernel /boot/vmlinuz-version ro root=/dev/sda2
> > > #          initrd /boot/initrd-version.img
> > > #boot=/dev/sda2
> > > default=2
> > > timeout=5
> > > splashimage=(hd1,1)/boot/grub/splash.xpm.gz
> > > hiddenmenu
> > > title Fedora (2.6.23.14-107.fc8)
> > >         root (hd1,1)
> > >         kernel /boot/vmlinuz-2.6.23.14-107.fc8 ro root=LABEL=/ rhgb quiet
> > >         initrd /boot/initrd-2.6.23.14-107.fc8.img
> > > title Fedora (2.6.23.9-85.fc8)
> > >         root (hd1,1)
> > >         kernel /boot/vmlinuz-2.6.23.9-85.fc8 ro root=LABEL=/ rhgb quiet
> > >         initrd /boot/initrd-2.6.23.9-85.fc8.img
> > > title Fedora (2.6.21-2952.fc8xen)
> > >         root (hd1,1)
> > >         kernel /boot/xen.gz-2.6.21-2952.fc8
> > >         module /boot/vmlinuz-2.6.21-2952.fc8xen ro root=LABEL=/ rhgb quiet
> > >         module /boot/initrd-2.6.21-2952.fc8xen.img
> > > title Fedora (2.6.21-2950.fc8xen)
> > >         root (hd1,1)
> > >         kernel /boot/xen.gz-2.6.21-2950.fc8
> > >         module /boot/vmlinuz-2.6.21-2950.fc8xen ro root=LABEL=/ rhgb quiet
> > >         module /boot/initrd-2.6.21-2950.fc8xen.img
> > >
> > > Where all (hd0,1) were changed to (hd1,1).
> > >
> > > What else needs to be done?
> > >
> > > Thanks.
> > >
> > I suspect that root is really /dev/sdb3 and /boot is /dev/sdb2.
> > Probably the easiest if to boot the Linux install you say works, and
> > then mount the F8 file system.
> >
> > mkdir /mnt/F8
> > mount /dev/sdb2 /mnt/F8
> > chroot /mnt/F8
> > grub-install (hd1,1)
> > exit
> >
> > You may have to use /dev/sdb2 instead of (hd1,1)
> >
> > The reason you have to run grub-install is to update the grub first
> > stage to point to stage 1.5 on the second hard drive instead of the
> > first one. What the chroot command does is the root directory from
> > what the one you booted to the one from F8 that you mounted on
> > /mnt/F8. That way, Grub uses the correct directories. You could also
> > use something like:
> >
> > mkdir /mnt/F8
> > mount /dev/sdb2 /mnt/F8
> > grub-install --root-directory=/mnt/F8/boot/grub /dev/sdb2
> >
> > This will work most of the time, but it may cause problems if you
> > have different versions of Grub. (You probably do not.)
> >
> > You also have the option of using the rescue CD and telling it to
> > re-install the boot loader. But I have not used this with more then
> > one version of Linux installed, so I am not sure of the results in
> > this case.
> >
> >
> > Mikkel
> 
> I'm currently logged in to the F8 install right now.  Running the
> command above gives:
> 
> [root@fedora8 who]# /sbin/grub-install /dev/sdb2
> /dev/sdb2 does not have any corresponding BIOS drive.
> 
> [root@fedora8 who]# /sbin/grub-install (hd1,1)
> bash: syntax error near unexpected token `hd1,1'
> 
I am kind of jumping into the middle of things here and I don't have the
start of the thread right now so I hope that I am not just muddying the
waters.

I recently had to re-install grub because I had to re-install windows
and that clobbers grub completely. Here's what I did.

1.) I booted on the rescue disk. It booted and mounted my Linux
partition.

2.) run grub

3.) At the grub prompt I did this:
	find /boot/grub/stage1

4.) This should give you should tell you something like this:

	root(hdx,n)
     
5.) The x and the n returned are numbers. To re-install grub you do this
replacing 'x' with whatever the number is that you got back from find:
	setup(hdx) 

This will install grub to the mbr of hdx. 

I used this site as a reference:
http://ubuntuforums.org/showthread.php?t=224351

or possibly another similar site. It worked well for me.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux