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 03-25-2006, 03:40 AM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails


RAID 1
-------

/dev/md0 consists of /dev/sda1 and /dev/sdb1
/dev/md1 consists of /dev/sda2 and /dev/sdb2

/dev/md0 is used as /boot
/dev/md1 is used as physical volume of LVM

LVM
----

/dev/md1 is the physical volume of a volume group with logical volume for swap and root.

Grub has been installed on the second harddisk's MBR with

grub> root (hd1,0)
grub> setup (hd1)
grub> quit

However, after I remove the first harddisk (/dev/sda), the system can't boot up with the second harddisk. Just a blank bootup screen.

Any advice please?

Thanks !

Last edited by Akhran; 03-25-2006 at 03:42 AM.
 
Old 03-25-2006, 05:14 AM   #2
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Have to say up front that my experience with Grub is on single disks only as I broke up my Raid because not all Linux could recognise Raid the same way.

As far as I am aware Grub wouldn't give a damn of the disk type of Sata or IDE and uses only the disk order as founded in the Bios.

The statement "root (hd1,0)" instructs Grub to accept the root of the Linux in in the 1st partition of the 2nd disk (hd1) because Grub counts from 0.

After you removed sda the disk order is no longer valid because there isn't a 2nd disk to be found and Grub should be at a loss with (hd1,0).

I have no knowledge of how Grub store its information in a RAID 1 which according to you the Linux was stored in both sda2 and sdb2. In that case why would Grub choose (hd1) for booting and not (hd0)?

It is possbile that on amending hd1 to hd0 in your Grub menu.lst your system will boot again. At least theoretically it should as (hd1) is a 100% duplicate of (hd0) in using Raid 1.
 
Old 05-04-2006, 04:17 AM   #3
keith ralph
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
I have exactly the same configuration and mine works ok. You need to setup the mbr on sdb disk as follows

grub:> device (hd0) /dev/sdb
grub:>root (hd0,0)
grub:> setup (hd0)
grub:> quit

and also update grub.conf to refrenece hd1 as well as hd0 - just repeat the following lines and change hd0-->hd1

title Red Hat Enterprise Linux AS (2.6.9-22.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.ELsmp ro root=/dev/VolGroup00/LogVol01 rhgb qui
et
initrd /initrd-2.6.9-22.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-22.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.EL ro root=/dev/VolGroup00/LogVol01 rhgb quiet
initrd /initrd-2.6.9-22.EL.img
 
  


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
Knoppix 4.0.2 HDD fails to boot fogcat Debian 1 02-01-2006 11:42 AM
how to do a dual boot (Windows on portable HDD) linux on computer HDD izquierdista Linux - General 5 01-28-2006 09:50 AM
Moving root from a dual-boot HDD to a new HDD Androoski SUSE / openSUSE 1 05-13-2005 10:34 PM
2 HDD, XP & Suse(for now), boot loader on each HDD? mozetti Linux - Newbie 3 03-15-2005 08:25 AM
Can't remove 2ndry hdd w/Mandrake, primary with W2k won't boot! Ariel Starfire Linux - Newbie 1 05-14-2004 04:03 AM

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

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