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 02-05-2010, 08:06 AM   #1
eccampbell
LQ Newbie
 
Registered: Nov 2008
Posts: 10

Rep: Reputation: 0
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.
 
Old 02-05-2010, 08:14 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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.

Last edited by tredegar; 02-05-2010 at 09:13 AM. Reason: Added the grub manual link
 
Old 02-05-2010, 09:01 AM   #3
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mandriva, CentOS, Ubuntu
Posts: 456

Rep: Reputation: 69
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.
 
Old 02-05-2010, 09:12 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
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
 
Old 02-05-2010, 09:23 AM   #5
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mandriva, CentOS, Ubuntu
Posts: 456

Rep: Reputation: 69
Quote:
Originally Posted by tredegar View Post
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.
 
  


Reply

Tags
dual boot, grub


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
Will Lilo over-write Grub? BarfBag Slackware 4 11-19-2005 09:48 PM
write grub to the MBR lixy Linux - General 1 08-27-2005 10:54 AM
GRUB : just write grub in black screen. (Urgent) dezeque Linux - Newbie 11 05-27-2005 01:47 PM
How to write the Grub.conf chutsu Linux - General 1 04-10-2005 05:16 AM
Can write GRUB at first sector of MBR invinciblemk Linux - Newbie 2 02-01-2004 09:59 PM


All times are GMT -5. The time now is 03:18 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration