Fix booting from mdadm raid.
authorsgf <sgf.dma@gmail.com>
Fri, 17 Dec 2021 20:06:44 +0000 (23:06 +0300)
committersgf <sgf.dma@gmail.com>
Fri, 17 Dec 2021 20:06:44 +0000 (23:06 +0300)
Use full name ('hostname:name') of md array in 'live-media=', because
initramfs starts with empty hostname and arrays are assembled with full
name.

42_grml

diff --git a/42_grml b/42_grml
index 4a76432..b951465 100755 (executable)
--- a/42_grml
+++ b/42_grml
@@ -98,6 +98,11 @@ for grmliso in $iso_list ; do
       dependencies=$(get_dependencies ${device})
       dep_string=""
       for dep in $dependencies $device ; do
+        case "$dep" in
+          /dev/md*)
+          md_name="$(mdadm --detail --export "$dep" | sed -ne 's/MD_NAME=//p')"
+          dep="/dev/md/$md_name"
+        esac
         dep_string="$dep_string,$dep"
       done
       dep_string=${dep_string#,}