3

Problem: Botched kernel upgrade left me with an unbootable system (don't ask me how it also made my backup kernel unbootable) where boot and root are on mdadm raid 1 arrays (with metadata 1.0/1.2 respectively).

Booting by live CD doesn't detect my raid arrays and I can't repair my system without assembling them by hand and I don't remember all the parameters I used and frankly it's a pain. I want the easiest way possible to auto-detect and rebuild my raid arrays so that I can mount them.

Emma
  • 374
  • 3
  • 11

1 Answers1

4

The solution was the following:

# Load modules
modprobe md
modprobe raid1

# Detect raid arrays by superblocks and generate config file
mdadm -E --scan > /etc/mdadm.conf

# Assemble arrays from config file generated above. 
mdadm -A -s

If the modprobe above fails the module was probably included in the kernel.

Emma
  • 374
  • 3
  • 11