From: Michael Prokop Date: Tue, 15 Oct 2013 15:06:49 +0000 (+0200) Subject: Install grub to main md device when installing on SW-RAID/mdadm X-Git-Tag: v0.58~6 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=a75f067a4f3967a8638a4f5f501adcdcbae88265;ds=sidebyside 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... --- 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