mdraids for lenny need to use metadata format 0.90
authorChristian Hofstaedtler <ch@grml.org>
Mon, 18 Oct 2010 14:11:19 +0000 (16:11 +0200)
committerChristian Hofstaedtler <ch@grml.org>
Mon, 18 Oct 2010 14:13:16 +0000 (16:13 +0200)
debian/changelog
grml-debootstrap
grml-debootstrap.8.txt

index a734a01..60a3189 100644 (file)
@@ -1,3 +1,11 @@
+grml-debootstrap (0.40) unstable; urgency=low
+
+  * Create md raids with metadata format 0.90 when installing lenny, as
+    grub from lenny can not boot from md with newer metadata versions.
+    [Closes: issue878].
+
+ -- Christian Hofstaedtler <ch@grml.org>  Mon, 18 Oct 2010 15:53:20 +0200
+
 grml-debootstrap (0.39) unstable; urgency=low
 
   [ Tong Sun ]
 grml-debootstrap (0.39) unstable; urgency=low
 
   [ Tong Sun ]
index 1c63443..bf97635 100755 (executable)
@@ -409,11 +409,17 @@ for i in $(cat $TMPFILE) ; do
    NUM_PARTITIONS=$((${NUM_PARTITIONS}+1))
 done
 
    NUM_PARTITIONS=$((${NUM_PARTITIONS}+1))
 done
 
+# force metadata version 0.90 for lenny so old grub can boot from this array.
+METADATA_VERSION=""
+if [ $RELEASE = "lenny" ]; then
+   METADATA_VERSION="-e0"
+fi
+
 ERRORFILE=$(mktemp)
 set +e
 # TODO: better error handling?
 yes | mdadm --create "${TARGET}" --level="${RAIDLEVEL}" \
 ERRORFILE=$(mktemp)
 set +e
 # TODO: better error handling?
 yes | mdadm --create "${TARGET}" --level="${RAIDLEVEL}" \
-      --raid-devices="${NUM_PARTITIONS}" ${SELECTED_PARTITIONS} >/dev/null 2>$ERRORFILE
+      --raid-devices="${NUM_PARTITIONS}" ${METADATA_VERSION} ${SELECTED_PARTITIONS} >/dev/null 2>$ERRORFILE
 RC=$?
 set -e
 
 RC=$?
 set -e
 
@@ -522,14 +528,14 @@ interactive_mode()
 {
   welcome_dialog
 
 {
   welcome_dialog
 
+  prompt_for_release
+
   prompt_for_swraid
 
   prompt_for_target
 
   prompt_for_bootmanager
 
   prompt_for_swraid
 
   prompt_for_target
 
   prompt_for_bootmanager
 
-  prompt_for_release
-
   prompt_for_hostname
 
   prompt_for_password
   prompt_for_hostname
 
   prompt_for_password
index 01337bb..53d0dc9 100644 (file)
@@ -323,6 +323,14 @@ grml-debootstrap can handle the release but you really should not use Etch
 anymore unless you really know what you are doing. Choose Lenny instead.
 ================================================================================
 
 anymore unless you really know what you are doing. Choose Lenny instead.
 ================================================================================
 
+[NOTE]
+.Lenny-Release
+================================================================================
+When installing lenny to a new mdraid, grml-debootstrap will use md metadata
+format version 0.90. This limits the device to a maximum size of 2TB, but has
+the advantage of grub-legacy actually being able to boot from it.
+================================================================================
+
 Bugs
 ----
 
 Bugs
 ----