1

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.

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

3 Answers 3

2

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 ?

2
  • 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, 2010 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, 2010 at 21:22
1

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.

0
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)
1
  • 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, 2010 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .