summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lidel <Markus.Lidel@shadowconnect.com>2017-01-02 15:21:29 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2017-01-02 15:21:29 -0800
commitfcc197b3b552eacf3d4928ef9cb777ff3d411ddc (patch)
tree7179efaed5854c7b01085197491a02ee5a3149dc
parentbootloader: be clear when a new grub1 config is made. (diff)
downloadgenkernel-fcc197b3b552eacf3d4928ef9cb777ff3d411ddc.tar.gz
genkernel-fcc197b3b552eacf3d4928ef9cb777ff3d411ddc.tar.bz2
genkernel-fcc197b3b552eacf3d4928ef9cb777ff3d411ddc.zip
dmraid: fix booting from a GPT partition on a dmraid.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--defaults/initrd.scripts1
-rwxr-xr-xgen_initramfs.sh3
2 files changed, 4 insertions, 0 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 4b0bbad..31ebeec 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1002,6 +1002,7 @@ startVolumes() {
else
/sbin/dmraid -ay ${DMRAID_OPTS}
fi
+ [ -x '/sbin/kpartx' ] && /sbin/dmsetup ls --exec '/sbin/kpartx -a -s'
fi
fi
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index afbef92..10108fb 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -318,6 +318,9 @@ append_dmraid(){
mkdir -p "${TEMP}/initramfs-dmraid-temp/"
/bin/tar -jxpf "${DMRAID_BINCACHE}" -C "${TEMP}/initramfs-dmraid-temp" ||
gen_die "Could not extract dmraid binary cache!";
+ [ -x /sbin/dmsetup -a -x /sbin/kpartx ] && copy_binaries \
+ "${TEMP}/initramfs-dmraid-temp/" \
+ /sbin/{kpartx,dmsetup}
cd "${TEMP}/initramfs-dmraid-temp/"
module_ext=$(modules_kext)
RAID456=`find . -type f -name raid456${module_ext}`