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 - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-27-2005, 12:08 AM   #1
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Rep: Reputation: 15
Grub isn't there


I have 2 harddrives. One has Windows XP on it, the other is blank. I installed Fedora Core 4 on the blank one tonight, and told it to install grub as the bootloader. After the installation, which said everything went fine, I rebooted my system. Upon doing this, my system simply booted into Windows as if nothing had changed, and upon holding some keys(such as F8, F9, etc.) I found that grub would simply not come up. What might the key to go into grub upon boot be(in case I just didn't hold the right one), and if that's not the problem, does anyone have any ideas?
 
Old 10-27-2005, 12:46 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Did you install grub on the right drive? It has to go on the FIRST drive (where windows is). If you didn't install it on the right one you have two options. One is to simply reinstall fedora. The other is to use a live distro and install grub manually.
 
Old 10-27-2005, 03:15 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
The first harddrive would be hda ......... and the second one hdb........the partitions are hda/n where could be the partition number ex: hda1
Just in case you where wondering
 
Old 10-27-2005, 01:07 PM   #4
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
I don't suppose changing the drive with FC4 on it to the master drive would help?
If not, then I'd like to address adz's first suggestion. How would reinstalling FC4 help? Would I need to tell it this time during the installation to put grub on the Windows drive? If so, how would I go about doing that?
 
Old 10-27-2005, 08:15 PM   #5
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Quote:
I don't suppose changing the drive with FC4 on it to the master drive would help?
It might. It depends on how Fedora/GRUB was installed.

Quote:
How would reinstalling FC4 help? Would I need to tell it this time during the installation to put grub on the Windows drive? If so, how would I go about doing that?
Well I've never installed Fedora but in Debian it gives you the option of how (and where) you'd like to install grub. In this case you'd select to put GRUB on the master boot record on the first had drive. I would have thought that Fedora would ask you a similar question. That's all the reinstall of Fedora would achieve.
 
Old 10-27-2005, 08:44 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
You probably chose to install grub to the root of the partition you were installing FC4 into. It's there, but the only way to access it is via a boot disk, or the install cd. You should have chosen the option to write grub to the MBR (the Master Boot Record) of the primary hard disk.

In that case, I beleive that FC is sufficiently well developed that it would have written a grub.conf to allow you to see in the grub menu, both FC and XP, and use the up/down arrow keys to select which to boot. Then press enter to boot that OS.

You have the option of either reinstalling FC, or boot from installation media, then re-install grub to write to the MBR. However, doing that after-the-fact probably will not re-write the grub.conf to include XP. You will probably have to do that manually.

If you haven't done a whole lot of configs in FC, I'd say reinstall, CAREFULLY, and watch for the option to write grub to the MBR, and let it write the grub.conf to include XP.
 
Old 10-27-2005, 11:59 PM   #7
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
I tried running a repair thing(instead of reinstalling) and telling it to install grub to the MBR, but after going through all its things, it told me that it failed. I'll try actually reinstalling it tonight and get back to you. Thanks for the help by the way you guys xD
 
Old 10-28-2005, 12:01 PM   #8
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
Ok, I reinstalled FC4 last night and told it in the advanced bootloader options to put it on the MBR(it was already doing this by default anyway), but it hasn't changed anything. I guess my next thing to try will be to get into FC4 via the install CD, how would I go about doing this?

EDIT: Ok, I tried switching my drives(making the slave the master and vice versa), but when I booted, my system didn't even detect my drives anymore ><
So, I switched them back and they were detected just fine.

Last edited by Dark_Oppressor; 10-28-2005 at 12:50 PM.
 
Old 10-28-2005, 05:13 PM   #9
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Well, let's try some command-line trickery to see if we can fix this thing.

Boot into FC from the installation cd: it should offer you a choice of booting from hard disk, rescue mode, and other choices. Choose one that get's you into FC.

Open a term window, type grub, and press enter, to get to the grub prompt.

Then enter this command:
grub> find /boot/grub/stage1 #grub> is the grub prompt. don't type that part.

It should return something like:
(hd1,0) #because grub is installed on the second disk, first partition.

Now type:
setup (hd0) # to write the grub first stage to the MBR of the master (first) drive.

It should return:
Run "embed /boot/grub/e2fs_stage1_5 (hd0)"
16 sectors are embedded.
Run "install /boot/grub/stage1 d (hd0) (hd0)1+16 p (hd1,0)/boot/grub/stage2"

Now inspect your grub.conf. Make sure the beginning of the kernel line reads something like:
kernel (hd1,0)/vmlinuz root=/dev/hdb1 , followed by other boot options.

Hopefully, that will get grub working: stage 1 in the MBR, with directions where to find the rest of itself.

Last edited by bigrigdriver; 10-28-2005 at 05:15 PM.
 
Old 10-28-2005, 06:12 PM   #10
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
I tried what you mentioned, and once I've booted from the install CD I can only find a way to get into Linux Rescue or the installer. I was unable to find any way to boot in FC.
 
Old 10-28-2005, 08:17 PM   #11
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Rescue will do fine.
 
Old 10-28-2005, 10:38 PM   #12
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
Ok, I tried it in the rescue mode, got into grub fine, but when I typed the 'find /boot/grub/stage1' line, it told me it couldn't find it.
 
Old 10-29-2005, 05:43 AM   #13
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
To be honest I would have just used the grub-install command and not bothered with all the tedious mucking about in the grub prompt. It's obvious that grub's not even installed (in the MBR) since windows boots. If grub was installed - but incorrectly - then your system wouldn't be bootable at all.

Try, for example, the command grub-install /dev/hda from the command prompt (not the grub prompt). I would have thought that was all that was necessary. Check that your /boot/grub/menu.lst file is what you want it to be. It's no biggie if it isn't entirely correct or complete as you can boot from the rescue disc any (and as many) time(s) as you want.

Last edited by adz; 10-29-2005 at 08:07 AM.
 
Old 10-29-2005, 11:31 AM   #14
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
Alright, I'll try the grub-install thing. How would I go about opening that .lst file when in the prompt?
 
Old 10-29-2005, 07:59 PM   #15
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Either nano, pico or vi will open it just fine. The first two are easier to use for newbies so I'd try them first (if you have them).
 
  


Reply



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
Setting password on grub, wha to do after changing default values in /boot/grub/menu. sarajevo Linux - Security 1 08-17-2005 08:01 PM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
Grub setup problem (/boot/grub/stage1 not found) davidas Debian 2 04-28-2004 08:13 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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