LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to write grub on another HD (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-write-grub-on-another-hd-787221/)

eccampbell 02-05-2010 07:06 AM

how to write grub on another HD
 
I have XP on the boot HD, Ubuntu 8.04 on the other
HD, and grub on the MBR of the Windows side. Then
the Windows HD went bad and I need to get grub onto
the other side so I can change the boot sequence
to what was the second HD (the Linux one) and
abandon the Windows side. Booting from a live CD
is no problem, but I can't figure how to install
grub onto the Linux side, which has been partitioned.
I know where menu.lst is, and have backups of it
as well.

Is this something that needs supergrub, or can a
simple write to the proper place be done in a
terminal window?

If switching the boot sequence is not enough (don't
see why it shouldn't be) then I can also switch the
jumper configurations on the two hard disks. But
I don't think that should be necessary.

tredegar 02-05-2010 07:14 AM

Installing grub: http://www.gnu.org/software/grub/man...2dinstall.html

The full GNU grub manual (rather long!)

Remember that if you move your slave disk (with linux) to the master position, instead of being sdb it'll be sda

So you may need to make some changes to menu.lst to reflect this

You'll (probably) also have to mount your root partition (using a live CD) and edit the entries in /etc/fstab changing /dev/sdb to /dev/sda.

If your fstab refers to disks by LABEL or UUID rather than /dev/sd-something then this step should not be necessary.

Let us know how you get on.

ongte 02-05-2010 08:01 AM

Does Ubuntu 8.04 include the grub-install script? I seem to remember not finding this on the LiveCD or the installed system. I had to use the grub shell to restore grub.

I do remember that 8.04 already uses UUID in grub, so partition names are not an issue. You may have to grapple with grub reversing your drive order. Your hd(1,x) might become hd(0,x). It's often the case when using the BIOS to choose a 2nd HDD to boot.

tredegar 02-05-2010 08:12 AM

Quote:

Does Ubuntu 8.04 include the grub-install script?
Yes, I'm running 8.04 right now and there it is: /usr/sbin/grub-install

ongte 02-05-2010 08:23 AM

Quote:

Originally Posted by tredegar (Post 3853807)
Yes, I'm running 8.04 right now and there it is: /usr/sbin/grub-install

I stand corrected. Must have been an earlier release.


All times are GMT -5. The time now is 03:53 AM.