Debian 8 (Jessie): How to boot degraded RAID1 software

funny-hard-drives-evolution-computersThis happen only in Debian Jessie with Raid 1 software. If Raid itself goes into degrades mode (sda or sdb disk becom unavaible) the boot do not work anymore (stop on busy box shell under (initramfs)).

To avoid this problem you can follow the next steps.

# dpkg-reconfigure grub-pc

Select both /dev/sda and /dev/sdb (but not /dev/mdX) as installation targets.

cd /etc/initramfs-tools/scripts/local-top
cp /usr/share/initramfs-tools/scripts/local-top/mdadm .

nano mdadm
Replace the next line (near the end of file)

log_failure_msg "failed to assemble all arrays."

with next lines.

log_warning_msg "failed to assemble all arrays...attempting individual starts"
for dev in $(cat /proc/mdstat | grep md | cut -d ' ' -f 1); do
  log_begin_msg "attempting mdadm --run $dev"
  if $MDADM --run $dev; then
    verbose && log_success_msg "started $dev"
  else
    log_failure_msg "failed to start $dev"
  fi
done

Save and at the end run the next command.

update-initramfs -u

Linkografia
How to auto-start Degraded Software RAID1 under Debian 8.0.0 on boot?