Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.)
(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.
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.
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.