From a75f067a4f3967a8638a4f5f501adcdcbae88265 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 15 Oct 2013 17:06:49 +0200 Subject: [PATCH] Install grub to main md device when installing on SW-RAID/mdadm Installing boot loader just on the first disk seems to cause problems recently, looks like at least Debian/wheezy's grub properly supports installation on /dev/md# devices, so let's try that route instead... --- grml-debootstrap | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index a613c93..fc12e7c 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -450,7 +450,7 @@ prompt_for_bootmanager() fi for device in cciss/c0d0 sda hda; do - if [ /dev/$device != ${MBRDISK} ]; then + if [ "/dev/$device" != "${MBRDISK}" ]; then grep -q $device /proc/partitions && \ ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS:$device:install bootmanager grub into MBR of /dev/$device" fi @@ -471,12 +471,7 @@ prompt_for_bootmanager() mbr) # /dev/md0: has to be installed in MBR of /dev/md0 and not in /dev/md: if echo "$TARGET" | grep -q "/dev/md" ; then - # using sw-raid: - if [ -n "$SELECTED_PARTITIONS" ] ; then - GRUB=$(echo ${SELECTED_PARTITIONS} | awk '{print $1}') # use first disk only - else - GRUB="$TARGET" - fi + GRUB="$TARGET" else GRUB="$MBRDISK" fi -- 2.1.4