LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 07: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, 07:14 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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 08:13 AM. Reason: Added the grub manual link
 
Old 02-05-2010, 08:01 AM   #3
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
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, 08:12 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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, 08:23 AM   #5
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

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



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

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

All times are GMT -5. The time now is 03:41 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
Open Source Consulting | Domain Registration