LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-13-2009, 11:44 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
GRUB prompt after CentOS 5.3 install


I have installed CentOS 5.3 and created a /boot-partition on a softRAID device md0, which I made active.

So my sda1 and sdb1 together make md0 in softRAID. I then installed /boot onto this md0-RAIDdevice.

When I reboot after installation, I get the grub-prompt.

How can I use this grub-prompt to indicate my primary partition, my /boot-partition ??? Someone know how to work with this.

This is not my first CentOS-install with a softRAID-setup but it is the first time that I encounter these problems with GRUB not finding a bootable partition...

Last edited by jonaskellens; 06-13-2009 at 01:07 PM.
 
Old 06-13-2009, 03:43 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Quote:
When I reboot after installation, I get the grub-prompt.
So, GRUB was successfully written to your MBR, but your grub.conf probably has an error in it. What does it look like?
And did you get any other output other thn the grub prompt?

Quote:
How can I use this grub-prompt to indicate my primary partition, my /boot-partition ??? Someone know how to work with this.
I was under the impression that even though you can put /boot on software RAID, GRUB does not access the disk via the MD0 device, but accesses the underlying real partition. So your grub.conf should look like a non-RAID one.

My /boot/grub/grub.conf looks like this
Code:
[root@athlonz ~]# cat /boot/grub/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/vgz00/lvz01
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.24-78.2.53.fc9.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.27.24-78.2.53.fc9.x86_64 ro root=/dev/vgz00/lvz01 rhgb quiet
        initrd /initrd-2.6.27.24-78.2.53.fc9.x86_64.img
(And, btw, to make the second drive bootable, you need to write GRUB to it post-install. Someone correct me if I'm wrong.)
 
Old 06-13-2009, 05:02 PM   #3
DragonSlayer48DX
Registered User
 
Registered: Dec 2006
Posts: 1,454
Blog Entries: 1

Rep: Reputation: 75
Quote:
Originally Posted by tommylovell View Post
(And, btw, to make the second drive bootable, you need to write GRUB to it post-install. Someone correct me if I'm wrong.)
Only if you're dual-booting and wish to select OSes through "drive swap" in BIOS. Otherwise, you need an OS installed to a bootable partition, then edit grub.config and menu.list to include it in the boot options.

You're correct on the other points, though- Grub should have been installed to the MBR of the main drive (sda1). (That's the easiest way).

Cheers

Last edited by DragonSlayer48DX; 06-13-2009 at 05:06 PM.
 
Old 06-13-2009, 05:28 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Depends on the RAID level - if RAID1 then I think tommylovell is correct. If the first drive fails you need to have duplicated the MBR manually for any attempt to recover using the second drive to work.
 
Old 06-13-2009, 05:57 PM   #5
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Yes, you are correct that you would want to write GRUB to the MBR.

And yes, I was thinking more in terms of resiliency (which is why I assume someone would make the /boot partition RAID1).

If you have drive 1 fail (the one that has GRUB in the MBR), your other RAID1 drive won't boot unless it too has GRUB written to it's MBR.

Code:
[root@athlonz ~]# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd1,0)
root (hd1,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd1)
setup (hd1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/e2fs_stage1_5" exists... yes
 Running "embed /grub/e2fs_stage1_5 (hd1)"...  23 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd1) (hd1)1+23 p (hd1,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.
grub> quit
quit
I do this on one of my systems except that my sda1 and sdb1 (/boot) are not RAID1 (I just keep them in sync with 'dd'); and everything else is RAID1.
 
Old 06-14-2009, 03:49 AM   #6
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
I guess my grub was written correctly to the MBR, but there was definitely a faulty config.

I have now installed from CD and it works well.
I have a slim case and wanted to install from the CentOS FTP-server. Everything works well with the netinstall from USB-stick, but grub has a bad config I must conclude.

I was unable to check my grub.conf because the kernel was not yet loaded. No cat, less or vi in the grub-prompt and no mounted filesystem.

Had to open my case to be able to hang a CD-ROM to my mobo.

I would still like to see the netinstall to work fine, without any problems. Anyone else encountered this problem ??? Could it be a bug ??

When I had the grub-prompt I followed a guide to indicated my boot-partition (and my vmlinuz-image) and my root-partition. But grub was unable to find the correct file, though I indicated the right place to search for it !

Seems that old-skool install from CD still rocks...
 
  


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
Grub install always gives me grub prompt? faethon Linux - Software 3 11-13-2007 02:25 PM
SuSE 10.2 Install Problem - Reboots to a grub prompt charleswallace Linux - Newbie 1 07-19-2007 04:09 PM
FC5 Install wont get passed grub prompt evanfitz Linux - Newbie 3 06-12-2006 02:23 AM
Clean install - grub prompt Phlow101 Linux - Newbie 8 12-13-2004 09:10 AM
Installation failed mid-install, now grub> prompt is all I have! whatthe Fedora - Installation 4 03-09-2004 09:43 PM

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

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