From 07d3ef977d65aa9ec20ffdbb8fd035178af95ff0 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Wed, 12 Jun 2019 12:37:24 +0200 Subject: Force create raid without answering the question if you want to create it. Update initramfs to include raidconfig avoiding md127 being created on reboot. --- scripts/install/install-get-partition | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition index b3f2741e..9f6473e1 100755 --- a/scripts/install/install-get-partition +++ b/scripts/install/install-get-partition @@ -302,12 +302,16 @@ check_for_new_raid () { echo "Creating RAID-1 group on partitions: /dev/${drive1}${data_dev} /dev/${drive2}${data_dev}" raid_dev=md0 - mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ + yes|mdadm --create /dev/$raid_dev --level=1 --raid-disks=2 --metadata=0.90 \ /dev/${drive1}${data_dev} /dev/${drive2}${data_dev} if [ $? = 0 -a -e /dev/$raid_dev ]; then echo "RAID-1 group created successfully:" cat /proc/mdstat | grep --after-context 2 ^$raid_dev | sed -e 's/^/\t/' + if [ -e /usr/sbin/update-initramfs.orig.initramfs-tools ] + echo "Updating initramfs to include the raid config:" + /usr/sbin/update-initramfs.orig.initramfs-tools -u + fi else echo "Unable to create RAID-1 group!" return -- cgit v1.2.3