diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2017-01-02 15:21:29 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-01-02 15:21:29 -0800 |
commit | fcc197b3b552eacf3d4928ef9cb777ff3d411ddc (patch) | |
tree | 7179efaed5854c7b01085197491a02ee5a3149dc | |
parent | bootloader: be clear when a new grub1 config is made. (diff) | |
download | genkernel-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.scripts | 1 | ||||
-rwxr-xr-x | gen_initramfs.sh | 3 |
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}` |