From: Christian Hofstaedtler Date: Mon, 18 Oct 2010 14:11:19 +0000 (+0200) Subject: mdraids for lenny need to use metadata format 0.90 X-Git-Tag: v0.40~1 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=d07cdbbc8d861f7b38eb31d3b10bf37f37bededb;ds=sidebyside mdraids for lenny need to use metadata format 0.90 --- diff --git a/debian/changelog b/debian/changelog index a734a01..60a3189 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 18 Oct 2010 15:53:20 +0200 + grml-debootstrap (0.39) unstable; urgency=low [ Tong Sun ] diff --git a/grml-debootstrap b/grml-debootstrap index 1c63443..bf97635 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -409,11 +409,17 @@ for i in $(cat $TMPFILE) ; do 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}" \ - --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 @@ -522,14 +528,14 @@ interactive_mode() { welcome_dialog + prompt_for_release + prompt_for_swraid prompt_for_target prompt_for_bootmanager - prompt_for_release - prompt_for_hostname prompt_for_password diff --git a/grml-debootstrap.8.txt b/grml-debootstrap.8.txt index 01337bb..53d0dc9 100644 --- a/grml-debootstrap.8.txt +++ b/grml-debootstrap.8.txt @@ -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. ================================================================================ +[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 ----