[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Use kpartx instead of dmraid's build in partition support (#500322)



Use kpartx instead of dmraid's build in partition support, as dmraid's
partition support cannot handle GPT.
---
 mkinitrd |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mkinitrd b/mkinitrd
index 271f0c4..2b2486c 100755
--- a/mkinitrd
+++ b/mkinitrd
@@ -1159,9 +1159,11 @@ emitdmraids()
 {
     if [ -z "$nodmraid" -a -n "$DMRAIDS" ]; then
         inst /sbin/dmraid "$MNTIMAGE" /sbin/dmraid
+        inst /sbin/kpartx "$MNTIMAGE" /sbin/kpartx
         for raid in $DMRAIDS; do
             vecho "Adding dmraid set: \"$raid\""
-            emit "/sbin/dmraid -a y -i --rm_partitions $raid"
+            emit "/sbin/dmraid -a y -i -p --rm_partitions \"$raid\""
+            emit "/sbin/kpartx -a -p p \"/dev/mapper/$raid\""
         done
     fi
 }
-- 
1.6.2.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]