LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-21-2013, 08:05 AM   #1
circus78
Member
 
Registered: Dec 2011
Posts: 273

Rep: Reputation: Disabled
Grub error (raid1)


Hi,
I've raid1 system with 2 devices: sda and sdb.
Now I need to replace /dev/sda.

I know that default Debian installer puts GRUB only on first device (that's very strange!!).

I've do this:

# grub-install /dev/sdb

No error reported.

Anyway, after --fail and --remove of /dev/sda1, sda2 and sda3 from respective md devices, and after physically remove sda, I can't boot my system, and I receive

"Grub Hard Disk Error".

How can I solve this?
Thankyou!
 
Old 04-21-2013, 12:02 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Did you replace the first drive or do you now only have the one drive, the one which was sdb?
If you only have one drive now, boot any Linux Live CD, open a terminal and log in as root user and run the command to get partitions:

fdisk -l(Lower case Letter L in the command)

Check to see partition name(s), sda, sdb, ? Mount the partition where your boot files are and look at the grub.cfg file to see if they are named correctly, pointing to the same drive/partition as you see in the fdisk output. If your fdisk output shows sda and the grub.cfg entries are pointing to sdb partition, that could be your problem. Without any specific drive/partition or boot file information there is not much we can do here other than guess.
 
Old 04-21-2013, 01:17 PM   #3
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Now, only sdb is attached.
And the system is unbootable.
Anyway, if I attach sda too, all is fine.
If I use LiveCD (Fedora 17 in my case), with only sdb attach, I see "/dev/sda1".
It's hard to mount, as this is raid device, not standard partition.
Should I create, from LiveCD, a degraded raid1 array and try?
 
Old 04-21-2013, 02:48 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
Probably what you need to do is look at the grub.cfg file on the drive, the one that was formerly sdb but now shows as sda as you have only one drive. The grub.cfg entries may be pointing to sdb when they should be pointing to sdb. Specifically, look for the the:

Quote:
set root='(hd0,msdos1)'
set root line as above. The example above is pointing to sda1 so if you have that pointing to (hd1,msdos1) it won't work.
 
Old 04-22-2013, 02:09 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
If I use LiveCD (Fedora 17 in my case), with only sdb attach, I see "/dev/sda1".
If it's listed as sda1 then you probably need to check ftsab & make corrections there.
 
Old 04-22-2013, 06:15 AM   #6
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
Probably what you need to do is look at the grub.cfg file on the drive, the one that was formerly sdb but now shows as sda as you have only one drive.
Hi, I'm a bit confused.
If it's correct to see "sda" (as I've only a disk), when I'll add the new disk.. it will be "sdb"? At this point I'm afraid of not knowing what is really sda.
 
Old 04-22-2013, 09:58 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,492

Rep: Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488Reputation: 2488
What are your intentions? Are you going to have the Debian system on your new sda drive? Do you also have Debian installed on the sdb drive? If you are replacing what was the sda drive with a new one, install Debian on it and try to boot. I'm not really clear on what your intentions are.
 
Old 04-22-2013, 10:25 AM   #8
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Please read my first post.
I've a server with raid1 (sda and sdb).
As you know, Debian installer puts GRUB only on sda.
Now, sda is failing and I need to replace it.
If I remove sda, and kept only sdb on server, but system isn't able to boot. Because simply GRUB isn't in sdb MBR.

So I reinstalled both disks on server, do a "grub-install /dev/sdb" with no error.
Again, I removed sda but I got "Grub Hard Disk Error".

At this point I've no idea on how really replace sda.
 
Old 04-22-2013, 11:06 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://forums.dlink.com/index.php?topic=2024.0
 
Old 04-25-2013, 02:00 PM   #10
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by EDDY1 View Post
Hi EDDY1, before reinserting sda ​​drive, I run the raid commands: mdadm --fail /dev/sdaX and mdadm --remove /dev/sdaX, so I have not had the problems described in your url.
Thankyou!
 
Old 04-25-2013, 07:14 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I was assuming that the information from post #2 was relevant, if not I apologize.
 
  


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 and raid1 devices circus78 Linux - Server 7 04-16-2012 03:57 AM
RAID1 and GRUB Error 17 clkennedy Linux - Server 1 06-18-2009 10:38 AM
Grub Error 22, RAID1 on OpenSuse 10.3 Live CD matthiar SUSE / openSUSE 1 08-29-2008 12:12 PM
input/output error on grub.conf file on raid1 boot partition desimo Linux - Server 2 06-25-2007 08:53 AM
RAID1 and GRUB - error loading operating system kenji1903 Linux - General 3 06-06-2004 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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