LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-16-2007, 08:35 PM   #1
tedblais
LQ Newbie
 
Registered: Jun 2007
Posts: 10

Rep: Reputation: 0
Installed on 2nd internal hard drive and now Grub error?


Hi,

I have a Dell P4 with xp installed. I also have a 2nd internal drive that I just installed Ubuntu 7.04 onto. I installed the version for "Standard personal computer (x86 architecture, PentiumTM, CeleronTM, AthlonTM, SempronTM)"

What I was hoping for was to be able to boot off the drive of my choice. Admittedly though I had no idea how to make this happen, I was just hoping it would be obvious. It seemed to be running ok from the CD, but then I restarted the machine. Now all I get is :

Grub Loading Stage 1.5

Grub Loading, please wait

Error 21


No XP, No Linux.

Any suggestions?

Thank You Very Much!
 
Old 06-16-2007, 10:02 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
The best way to install the boot loader during installation is to install it to the MBR of the drive set to boot in the bios which normally is the master drive, normally where Windows is installed. Then when the bios passes control to the drive set to boot in the bios after doing the P.O.S.T., grub presents a list of all OS's installed and you select the one you want to boot and it should boot up.
Type in a terminal: fdisk -l to get a good view of partition names.
If your Windows drive is /dev/sda and your Ubuntu is /dev/sdb, and Ubuntu /boot or / partition is /dev/sdb1, then you would enter these four commands in a terminal while running the CD:
Code:
sudo grub
root (hd1,0)
setup (hd0)
quit
The "grub" command puts you in a grub session, the "root" specifies where the /boot/grub/menu.lst is as this is the configuration file, grub starts counting from 0, so the second drive is (hd1) and first partition is 0, the setup tells grub to install stage one in the MBR of the first drive.

Last edited by Junior Hacker; 06-16-2007 at 10:04 PM.
 
Old 06-16-2007, 10:23 PM   #3
tedblais
LQ Newbie
 
Registered: Jun 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Junior Hacker
The best way to install the boot loader during installation is to install it to the MBR of the drive set to boot in the bios which normally is the master drive, normally where Windows is installed. Then when the bios passes control to the drive set to boot in the bios after doing the P.O.S.T., grub presents a list of all OS's installed and you select the one you want to boot and it should boot up.
Type in a terminal: fdisk -l to get a good view of partition names.
If your Windows drive is /dev/sda and your Ubuntu is /dev/sdb, and Ubuntu /boot or / partition is /dev/sdb1, then you would enter these four commands in a terminal while running the CD:
Code:
sudo grub
root (hd1,0)
setup (hd0)
quit
The "grub" command puts you in a grub session, the "root" specifies where the /boot/grub/menu.lst is as this is the configuration file, grub starts counting from 0, so the second drive is (hd1) and first partition is 0, the setup tells grub to install stage one in the MBR of the first drive.
Thank you.

However you are a little over my head here. So I need to install a bootloader. Do I heve one or do I need one? Where can I find the right one for my setup?
 
Old 06-16-2007, 10:43 PM   #4
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Everything should be in place, just boot to the Live CD and issue the commands in a terminal. Error 21 means the disk specified does not exist, so not sure how you got that, it appears it cannot find it's configuration files.
If you're still a little iffy, boot into the live environment with the CD and type: fdisk -l and post the output here and I will tell you exactly which commands to issue to reinstall grub properly. If you get an error with the fdisk -l command, means you have to use sudo as such: sudo fdisk -l , and put in the admin. password.
 
Old 06-16-2007, 11:30 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,941

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
@Junior, grub *is* in the MBR.
I suspect the disk order changed when the second disk was installed, but didn't affect anything because the MBR code area (of the second disk) was null.
Now it ain't.

@tedblais - try doing the "sudo fdisk -l" from the CD and post it here prior to attempting the fix.
 
Old 06-16-2007, 11:37 PM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
Originally Posted by syg00
@Junior, grub *is* in the MBR.
I'm well aware of that, otherwise grub would not have come up and produced an error. Would you like to take over?

Last edited by Junior Hacker; 06-16-2007 at 11:38 PM.
 
Old 06-16-2007, 11:53 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,941

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Generally more input is better.
As you seem to feel threatened by that, I'll just watch.
 
Old 06-18-2007, 11:36 PM   #8
tedblais
LQ Newbie
 
Registered: Jun 2007
Posts: 10

Original Poster
Rep: Reputation: 0
I re-installed Ubuntu (just to make sure I did it right and wiped that drive clean), then ran Junior Hacker's code, and then changed something in the BIOS setup ( I wish I could remember exactly what) from off to Auto and that seemed to to do the trick.


I really appreciate everyones help here. I will have many more questions here as I am having problems installing simple stuff (like a .wav player). I will post in a different topic about those.

Thanks!
 
  


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
Can I dual boot if Linux is installed to a 2nd hard drive? Traviswf Linux - Newbie 9 08-27-2006 02:46 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
Added a 2nd Sata Drive installed Fedora Core 5, BIOS Doesn't See 2nd Drive. mtmcc1 Linux - General 3 12-03-2005 05:01 PM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 10:34 AM
GRUB errors, booting on 2nd hard drive p1800 Linux - Newbie 14 12-02-2004 02:05 PM

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

All times are GMT -5. The time now is 11:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration