diff --git a/lib/initcpio/hooks/arch_mdadm b/lib/initcpio/hooks/arch_mdadm index 842aae9c9..7e59f3769 100644 --- a/lib/initcpio/hooks/arch_mdadm +++ b/lib/initcpio/hooks/arch_mdadm @@ -3,6 +3,8 @@ run_hook () { input="$(cat /proc/cmdline)" mdconfig="/etc/mdadm.conf" + # for partitionable raid, we need to load md_mod first! + modprobe md_mod 2>/dev/null # if no config file is present create one from command line parameters if ! [ -e $mdconfig ]; then #Create initial mdadm.conf diff --git a/usr/share/archboot/installer/setup b/usr/share/archboot/installer/setup index e89d7c049..abb1b4b2c 100755 --- a/usr/share/archboot/installer/setup +++ b/usr/share/archboot/installer/setup @@ -669,7 +669,7 @@ storage is duplication." 0 0 SPARE_DEVICES="$(cat /tmp/.raid-spare | wc -l)" # generate options for mdadm RAIDOPTIONS="--force --run --level=$LEVEL" - [ "$(echo $RAIDDEVICE | grep /md_d[0-9])" ] && RAIDOPTIONS="$RAIDOPTIONS -a mdp" && modprobe md_mod 2>/dev/null + [ "$(echo $RAIDDEVICE | grep /md_d[0-9])" ] && RAIDOPTIONS="$RAIDOPTIONS -a mdp" ! [ "$RAID_DEVICES" = "0" ] && RAIDOPTIONS="$RAIDOPTIONS --raid-devices=$RAID_DEVICES" ! [ "$SPARE_DEVICES" = "0" ] && RAIDOPTIONS="$RAIDOPTIONS --spare-devices=$SPARE_DEVICES" ! [ "$PARITY" = "" ] && RAIDOPTIONS="$RAIDOPTIONS --layout=$PARITY"