diff options
author | Rick Farina (Zero_Chaos) <zerochaos@gentoo.org> | 2016-01-05 13:49:44 -0500 |
---|---|---|
committer | Rick Farina (Zero_Chaos) <zerochaos@gentoo.org> | 2016-01-05 13:49:44 -0500 |
commit | ed52f905b67f4dc25ec99ae63b68240efb710958 (patch) | |
tree | fb9b1f725fc7b2cd2c2a2e891fa3ab529d2f64f3 | |
parent | Revert "run startVolumes after opening luks" (diff) | |
download | genkernel-ed52f905b67f4dc25ec99ae63b68240efb710958.tar.gz genkernel-ed52f905b67f4dc25ec99ae63b68240efb710958.tar.bz2 genkernel-ed52f905b67f4dc25ec99ae63b68240efb710958.zip |
lvm should not be moved
moving lvm from sbin to bin breaks the symlinks and makes using the
debug shell much harder. Patch suggested by TomWij and independantly
recreated by Zero_Chaos and ryao. bug #448156
-rw-r--r-- | defaults/initrd.scripts | 8 | ||||
-rwxr-xr-x | gen_initramfs.sh | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 26125743..1bab361f 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -985,15 +985,15 @@ startVolumes() { if [ "${USE_LVM_NORMAL}" = '1' ] then - if [ -x '/bin/lvm' ] + if [ -x '/sbin/lvm' ] then for dev in ${RAID_DEVICES} do setup_md_device "${dev}" done - # This is needed for /bin/lvm to accept the following logic - lvm_commands="#! /bin/lvm" + # This is needed for /sbin/lvm to accept the following logic + lvm_commands="#! /sbin/lvm" # If there is a cahe, update it. Unbreak at least dmcrypt [ -d /etc/lvm/cache ] && lvm_commands="${lvm_commands} \nvgscan" @@ -1008,7 +1008,7 @@ startVolumes() { # And finally execute it all (/proc/... needed if lvm is compiled without readline) good_msg "Scanning for and activating Volume Groups" - printf "%b\n" "${lvm_commands}" | /bin/lvm /proc/self/fd/0 + printf "%b\n" "${lvm_commands}" | /sbin/lvm /proc/self/fd/0 else bad_msg "vgscan or vgchange not found: skipping LVM volume group activation!" fi diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 8fed1eba..9c9dfec2 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -339,11 +339,12 @@ append_lvm(){ fi cd ${TEMP} mkdir -p "${TEMP}/initramfs-lvm-temp/bin/" + mkdir -p "${TEMP}/initramfs-lvm-temp/sbin/" mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/" if false && [ -e '/sbin/lvm.static' ] then print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm.static)...' - cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/bin/lvm" || + cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/sbin/lvm" || gen_die 'Could not copy over lvm!' # See bug 382555 if [ -e '/sbin/dmsetup.static' ] @@ -353,7 +354,7 @@ append_lvm(){ elif false && [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable' then print_info 1 ' LVM: Adding support (using local static binary /sbin/lvm)...' - cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" || + cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/sbin/lvm" || gen_die 'Could not copy over lvm!' # See bug 382555 if [ -e '/sbin/dmsetup' ] && LC_ALL="C" ldd /sbin/dmsetup | grep -q 'not a dynamic executable' @@ -365,7 +366,7 @@ append_lvm(){ compile_lvm || gen_die "Could not compile LVM" /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" || gen_die "Could not extract lvm binary cache!"; - mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm || + mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/sbin/lvm || gen_die 'LVM error: Could not move lvm.static to lvm!' # See bug 382555 mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup || |