I am switching to debian from ubuntu and setting up RAID0 on my AWS boxes using user-data. Things were working fine on ubuntu but on wheezy
apt-get -y install mdadm --no-install-recommends
throws a user input box
If the system's root file system is located on an MD array (RAID), it needs to be started early during the boot sequence. If it is located on a logical volume (LVM), which is on MD, all constituent arrays need to be started. If you know exactly which arrays are needed to bring up the root file system, and you want to postpone starting all other arrays to a later point in the boot sequence, enter the arrays to start here. Alternatively, enter 'all' to simply start all available arrays. If you do not need or want to start any arrays for the root file system, leave the answer blank (or enter 'none'). This may be the case if you are using kernel autostart or do not need any arrays to boot. Please enter 'all', 'none', or a space-separated list of devices such as 'md0 md1' or 'md/1 md/d0' (the leading '/dev/' can be omitted).
I want to select all
automatically. I have tried echo -e 'all' | apt-get -y install mdadm --no-install-recommends
and also this but no success till now, can any one please help me out here.
I finally got it working with debconf-set-selections
This is what I did before installing mdadm
I hope this helps some one.
Update: Above stated method works fine, I found a simpler way to do this:
export DEBIAN_FRONTEND=noninteractive apt-get -q -y install mdadm --no-install-recommends