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 01-17-2010, 12:22 PM   #1
Rashkavar
LQ Newbie
 
Registered: Oct 2005
Distribution: Debian Squeeze
Posts: 12

Rep: Reputation: 0
Question GRUB installed on wrong hard drive? How do I fix it?


First of all, I'm pretty much a total newbie for Linux - I haven't touched it since 2006, and even then only for a couple of high school IT courses and not as my own PC.

I installed kubuntu 9.10 yesterday, and was somewhat confused by the fact that the hard drives listed in the partition management segment did not match up with the physical layout. SATA1 on the motherboard is labelled as sdb and SATA3 is labelled as sda (with SATA2 left empty since it's a dead port, even the bios can't detect a hard drive plugged into SATA2, and SATA4 reserved for my eSATA connection once I get the proper cables). The motherboard is an ASUS A8N-E, if you need it.

Table below shows physical location on motherboard - partition label in Linux - mount point
SATA1 - /dev/sdb1 - /
SATA1 - /dev/sdb5 - swap
SATA3 - /dev/sda1 - /home

I was mildly concerned, but then decided to blame my slowly-dying motherboard, and figured Linux would be able to sort things out properly. Unfortunately (and perhaps predictably to those more knowledgeable about how Linux works), it installed GRUB on sda. Since this is connected to SATA3 and there is also a SATA1 connection, my BIOS doesn't search in that drive for a boot program, it just stops searching after not finding one in the SATA1 drive. It's not hard to boot - I just go into the boot manager and manually select the other drive, but I'd prefer to have a completely automatic bootup like most computers do.

Any suggestions for how to fix this? 3 possibilities I can think of are
-switching the cables so sda is in SATA1 and sdb is in SATA3
-moving or copying grub over to sdb where it can be accessed automatically
-changing bios settings to make it check either both hard drives or just SATA3 for a boot program

The problem I have with the first one is that Linux may not be sufficiently adaptable to hardware changes (I've yet to see an OS that is). Mounting /home as / and / as /home is likely not a good idea, and I'm concerned that is what would happen if I switched SATA ports like that. As for bios settings, I don't see any options like that, though I could be missing something. And as for moving grub, like I said, I'm a newbie, and thus need help with such things (though this is the option I favour). Any suggestions?
 
Old 01-17-2010, 01:54 PM   #2
racepres
Member
 
Registered: Feb 2009
Location: central Michigan
Distribution: Puppy/Debian/Mandriva
Posts: 56

Rep: Reputation: 18
If you are able to "fix it" and therefor Boot, Just go to "boot/grub" and edit the menu.lst to reflect the change you are making to get booted. Save changes, and ... no more troubles!!
HTH
RP
I am Assuming [love that word] that you are using Grub... but maybe you have to edit LILO!!
 
0 members found this post helpful.
Old 01-17-2010, 03:38 PM   #3
Rashkavar
LQ Newbie
 
Registered: Oct 2005
Distribution: Debian Squeeze
Posts: 12

Original Poster
Rep: Reputation: 0
That only works if it actually initializes Grub automatically in the first place. It doesn't - the problem isn't within Grub.

The problem is that the Grub MBR itself is on the wrong hard drive - my bios assumes that the MBR will be connected to SATA1 unless I go into the boot menu and specify another drive. There doesn't seem to be a method of changing that in the bios settings, and swapping the physical connections on the board might cause interesting problems with drive mapping. What I'm asking is how I can transfer (move or copy) the entire Grub MBR from the SATA3 hard drive to the SATA1 hard drive, not simply edit Grub itself.
 
Old 01-17-2010, 07:32 PM   #4
sysfce2
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 116

Rep: Reputation: 50
You could try Super Grub Disk.

It's been a while since I've done this, but IIRC,

run find /boot/grub/stage1 (or where you have the grub files)

then run root (hd0,0) (use the result from find)

finally setup (hd0) assuming hd0 is the first boot drive (it should be)
 
  


Reply


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
installed Ubuntu, can't boot, grub error 18, can I fix without a floppy drive? raymondvillain Linux - Newbie 8 05-23-2008 09:32 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-05-2007 12:28 AM
Installed on 2nd internal hard drive and now Grub error? tedblais Linux - Newbie 7 06-18-2007 11:36 PM
Grub in MBR no Linux installed can't access hard drive bookmonger Linux - Software 13 02-14-2006 08:06 AM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 10:34 AM

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

All times are GMT -5. The time now is 11:44 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