Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 448156
Collapse All | Expand All

(-)a/defaults/initrd.scripts (-5 / +5 lines)
Lines 672-688 Link Here
672
672
673
	if [ "${USE_LVM_NORMAL}" = '1' ]
673
	if [ "${USE_LVM_NORMAL}" = '1' ]
674
	then
674
	then
675
		if [ -e '/bin/lvm' ]
675
		if [ -e '/sbin/lvm' ]
676
		then
676
		then
677
			for dev in ${RAID_DEVICES}
677
			for dev in ${RAID_DEVICES}
678
			do
678
			do
679
				setup_md_device "${dev}"
679
				setup_md_device "${dev}"
680
			done
680
			done
681
681
682
			# This is needed for /bin/lvm to accept the following logic
682
			# This is needed for /sbin/lvm to accept the following logic
683
			lvm_commands="#! /bin/lvm"
683
			lvm_commands="#! /sbin/lvm"
684
684
685
			# If there is a cahe, update it. Unbreak at least dmcrypt
685
			# If there is a cache, update it. Unbreak at least dmcrypt
686
			[ -d /etc/lvm/cache ] && lvm_commands="${lvm_commands} \nvgscan"
686
			[ -d /etc/lvm/cache ] && lvm_commands="${lvm_commands} \nvgscan"
687
687
688
			# To activate volumegroups on all devices in the cache
688
			# To activate volumegroups on all devices in the cache
Lines 695-701 Link Here
695
695
696
			# And finally execute it all (/proc/... needed if lvm is compiled without readline)
696
			# And finally execute it all (/proc/... needed if lvm is compiled without readline)
697
			good_msg "Scanning for and activating Volume Groups"
697
			good_msg "Scanning for and activating Volume Groups"
698
			printf "%b\n" "${lvm_commands}" | /bin/lvm /proc/self/fd/0
698
			printf "%b\n" "${lvm_commands}" | /sbin/lvm /proc/self/fd/0
699
		else
699
		else
700
			bad_msg "vgscan or vgchange not found: skipping LVM volume group activation!"
700
			bad_msg "vgscan or vgchange not found: skipping LVM volume group activation!"
701
		fi
701
		fi
(-)a/gen_initramfs.sh (-3 / +4 lines)
Lines 301-311 Link Here
301
	fi
301
	fi
302
	cd ${TEMP}
302
	cd ${TEMP}
303
	mkdir -p "${TEMP}/initramfs-lvm-temp/bin/"
303
	mkdir -p "${TEMP}/initramfs-lvm-temp/bin/"
304
	mkdir -p "${TEMP}/initramfs-lvm-temp/sbin/"
304
	mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/"
305
	mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/"
305
	if false && [ -e '/sbin/lvm.static' ]
306
	if false && [ -e '/sbin/lvm.static' ]
306
	then
307
	then
307
		print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm.static)...'
308
		print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm.static)...'
308
		cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
309
		cp /sbin/lvm.static "${TEMP}/initramfs-lvm-temp/sbin/lvm" ||
309
			gen_die 'Could not copy over lvm!'
310
			gen_die 'Could not copy over lvm!'
310
		# See bug 382555
311
		# See bug 382555
311
		if [ -e '/sbin/dmsetup.static' ]
312
		if [ -e '/sbin/dmsetup.static' ]
Lines 315-321 Link Here
315
	elif false && [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'
316
	elif false && [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'
316
	then
317
	then
317
		print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm)...'
318
		print_info 1 '          LVM: Adding support (using local static binary /sbin/lvm)...'
318
		cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
319
		cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/sbin/lvm" ||
319
			gen_die 'Could not copy over lvm!'
320
			gen_die 'Could not copy over lvm!'
320
		# See bug 382555
321
		# See bug 382555
321
		if [ -e '/sbin/dmsetup' ] && LC_ALL="C" ldd /sbin/dmsetup | grep -q 'not a dynamic executable'
322
		if [ -e '/sbin/dmsetup' ] && LC_ALL="C" ldd /sbin/dmsetup | grep -q 'not a dynamic executable'
Lines 327-333 Link Here
327
		compile_lvm
328
		compile_lvm
328
		/bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" ||
329
		/bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" ||
329
			gen_die "Could not extract lvm binary cache!";
330
			gen_die "Could not extract lvm binary cache!";
330
		mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm ||
331
		mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/sbin/lvm ||
331
			gen_die 'LVM error: Could not move lvm.static to lvm!'
332
			gen_die 'LVM error: Could not move lvm.static to lvm!'
332
		# See bug 382555
333
		# See bug 382555
333
		mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup ||
334
		mv ${TEMP}/initramfs-lvm-temp/sbin/dmsetup.static ${TEMP}/initramfs-lvm-temp/bin/dmsetup ||

Return to bug 448156