Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.


I have a debian with a raid1 on it. Both HDDs have bootable flags and grub setup in MBR. If I only start up with sda, linux boots. If I only start up with sdb, grub shows up and says

Decompressing Linux...
crc error
-- System halted

I have reinstalled grub a few times now but still nothing.
It goes like this:
/dev/md0 contains /dev/sda1 /dev/sdb1
find /boot/grub/stage1 shows (hd0,0) (hd0,1)
The line that boots Linux shows:
root (hd0,0)
kernel /vmlinuz-2.6.26-1-686
initrd /initrd.img-2.6.26-1-686

This kind of renders my "redundant" array useless.
Any clues?

update: just to mention, these are 2 different HDDs, sda is 320gb and sdb is 400gb. Both are WD and both have exactly the same partitions, cloned using sfdisk.

share|improve this question
    
Is this a new installation or has it been working for some time ? –  Iain Jun 13 '10 at 10:41
    
I added the 2nd hard drive last week, but didn't had to test it until yesterday. –  w00t Jun 13 '10 at 17:12
add comment

3 Answers

If you built the raid correctly and it fully synced then chances are high that you have some bad sectors on sdb.

What does the output of

cat /proc/mdstat

say about the device ?

share|improve this answer
    
It used to be in sync but now I have kicked the drive out of the array. I'm trying to use separate /boot partitions for each drive and keep raid just for / –  w00t Jun 15 '10 at 6:51
    
I just installed a fresh linux on the ex-sdb and even with this one grub gives errors - error 18, which I googled and somebody said: "18 is a hard-disk read on the wrong cylinder or such". –  w00t Jun 16 '10 at 21:22
add comment
up vote 1 down vote accepted

I finally managed to repair it. It was a HDD related problem and I had to go into BIOS, at the HDD's options and disable Block Mode.
Then I just proceeded with the normal installation: re-add the partitions to the array, setup grub.
It now works booting from this drive.

share|improve this answer
add comment
root (hd0,0) 
kernel /vmlinuz-2.6.26-1-686 
initrd /initrd.img-2.6.26-1-686

If this is from your grub.conf on sdb, it's missing some important information, such as what to boot. The kernel line should look something more like this:

kernel /vmlinuz-2.6.26-1-686 ro root=/dev/sda5

with root= pointing to the block device that contains the / filesystem.

In addition, if you're booting off the secondary drive, you'll want to specify that grub actually use it -- specifically,

root (hd1,0)
share|improve this answer
    
Well, considering the scenario where sda fails, I remove it and sdb now becomes sda, so hd1 is hd0, I don't need to modify that. I also don't need the root= because it already knows where the root is -> root (hd0,0). The problem is that it finds vmlinuz and initrd, starts decompressing but gives that crc error. –  w00t Jun 13 '10 at 10:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.