Changed all instances of EVMS2/LVM2 to EVMS/LVM, respectively. This will keep everything simplified if a newer EVMS/LVM version set appears.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@535 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Chris Gianelloni 18 years ago
parent 364336c8dc
commit 10990c2210

@ -2,6 +2,16 @@
# Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
17 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org> TODO,
alpha/modules_load, gen_cmdline.sh, gen_compile.sh, gen_configkernel.sh,
gen_determineargs.sh, gen_initramfs.sh, gen_initrd.sh,
generic/initrd.defaults, generic/initrd.scripts, generic/linuxrc,
genkernel, genkernel.8, genkernel.conf, ia64/modules_load, mips/config.sh,
ppc/modules_load, ppc64/modules_load, um/modules_load, x86/modules_load,
x86_64/modules_load, xen0/modules_load, xenU/modules_load:
Changed all instances of EVMS2/LVM2 to EVMS/LVM, respectively. This will
keep everything simplified if a newer EVMS/LVM version set appears.
17 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org> README, 17 Sep 2007; Chris Gianelloni <wolf31o2@gentoo.org> README,
alpha/config.sh, gen_bootloader.sh, gen_cmdline.sh, gen_configkernel.sh, alpha/config.sh, gen_bootloader.sh, gen_cmdline.sh, gen_configkernel.sh,
gen_determineargs.sh, gen_initrd.sh, gen_package.sh, genkernel, gen_determineargs.sh, gen_initrd.sh, gen_package.sh, genkernel,

@ -1,4 +1,4 @@
- Add LVM2 support, so people that have their root partitions
LVM2-ized can boot.
- Need configs for other currently-unsupported arches. - Need configs for other currently-unsupported arches.
- Make configs stackable
- Remove 2.4 kernel support
- Refactor code to be more simple and extendable

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -68,14 +68,14 @@ longusage() {
echo " --gensplash=<theme> Force gensplash using <theme>" echo " --gensplash=<theme> Force gensplash using <theme>"
echo " --gensplash-res=<res> Select gensplash resolutions" echo " --gensplash-res=<res> Select gensplash resolutions"
echo " --do-keymap-auto Forces keymap selection at boot" echo " --do-keymap-auto Forces keymap selection at boot"
echo " --evms Include EVMS2 support" echo " --evms Include EVMS support"
echo " --> 'emerge evms' in the host operating system" echo " --> 'emerge evms' in the host operating system"
echo " first" echo " first"
echo " --evms2 Include EVMS2 support" echo " --evms2 Include EVMS support"
echo " --> 'emerge evms' in the host operating system" echo " --> 'emerge evms' in the host operating system"
echo " first" echo " first"
echo " --lvm Include LVM2 support" echo " --lvm Include LVM support"
echo " --lvm2 Include LVM2 support" echo " --lvm2 Include LVM support"
echo " --dmraid Include DMRAID support" echo " --dmraid Include DMRAID support"
echo " --slowusb Enables extra pauses for slow USB CD boots" echo " --slowusb Enables extra pauses for slow USB CD boots"
echo " --bootloader=grub Add new kernel to GRUB configuration" echo " --bootloader=grub Add new kernel to GRUB configuration"
@ -208,6 +208,8 @@ parse_cmdline() {
--evms2) --evms2)
CMD_EVMS=1 CMD_EVMS=1
print_info 2 "CMD_EVMS: ${CMD_EVMS}" print_info 2 "CMD_EVMS: ${CMD_EVMS}"
echo
print_warning 1 "Please use --evms, as --evms2 is deprecated."
;; ;;
--unionfs) --unionfs)
CMD_UNIONFS=1 CMD_UNIONFS=1
@ -220,9 +222,15 @@ parse_cmdline() {
print_warning 1 "This code is subject to change at any time." print_warning 1 "This code is subject to change at any time."
echo echo
;; ;;
--lvm)
CMD_LVM=1
print_info 2 "CMD_LVM: ${CMD_LVM}"
;;
--lvm2) --lvm2)
CMD_LVM2=1 CMD_LVM=1
print_info 2 "CMD_LVM2: ${CMD_LVM2}" print_info 2 "CMD_LVM: ${CMD_LVM}"
echo
print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
;; ;;
--no-busybox) --no-busybox)
CMD_NO_BUSYBOX=1 CMD_NO_BUSYBOX=1

@ -474,43 +474,43 @@ compile_busybox() {
rm -rf "${BUSYBOX_DIR}" > /dev/null rm -rf "${BUSYBOX_DIR}" > /dev/null
} }
compile_lvm2() { compile_lvm() {
compile_device_mapper compile_device_mapper
if [ ! -f "${LVM2_BINCACHE}" ] if [ ! -f "${LVM_BINCACHE}" ]
then then
[ -f "${LVM2_SRCTAR}" ] || [ -f "${LVM_SRCTAR}" ] ||
gen_die "Could not find LVM2 source tarball: ${LVM2_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" gen_die "Could not find LVM source tarball: ${LVM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
cd "${TEMP}" cd "${TEMP}"
rm -rf ${LVM2_DIR} > /dev/null rm -rf ${LVM_DIR} > /dev/null
/bin/tar -zxpf ${LVM2_SRCTAR} || /bin/tar -zxpf ${LVM_SRCTAR} ||
gen_die 'Could not extract LVM2 source tarball!' gen_die 'Could not extract LVM source tarball!'
[ -d "${LVM2_DIR}" ] || [ -d "${LVM_DIR}" ] ||
gen_die 'LVM2 directory ${LVM2_DIR} is invalid!' gen_die 'LVM directory ${LVM_DIR} is invalid!'
rm -rf "${TEMP}/device-mapper" > /dev/null rm -rf "${TEMP}/device-mapper" > /dev/null
/bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" || /bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
gen_die "Could not extract device-mapper binary cache!"; gen_die "Could not extract device-mapper binary cache!";
cd "${LVM2_DIR}" cd "${LVM_DIR}"
print_info 1 'lvm2: >> Configuring...' print_info 1 'lvm: >> Configuring...'
LDFLAGS="-L${TEMP}/device-mapper/lib" \ LDFLAGS="-L${TEMP}/device-mapper/lib" \
CFLAGS="-I${TEMP}/device-mapper/include" \ CFLAGS="-I${TEMP}/device-mapper/include" \
CPPFLAGS="-I${TEMP}/device-mapper/include" \ CPPFLAGS="-I${TEMP}/device-mapper/include" \
./configure --enable-static_link --prefix=${TEMP}/lvm2 >> ${DEBUGFILE} 2>&1 || ./configure --enable-static_link --prefix=${TEMP}/lvm >> ${DEBUGFILE} 2>&1 ||
gen_die 'Configure of lvm2 failed!' gen_die 'Configure of lvm failed!'
print_info 1 'lvm2: >> Compiling...' print_info 1 'lvm: >> Compiling...'
compile_generic '' utils compile_generic '' utils
compile_generic 'install' utils compile_generic 'install' utils
cd "${TEMP}/lvm2" cd "${TEMP}/lvm"
print_info 1 ' >> Copying to bincache...' print_info 1 ' >> Copying to bincache...'
strip "sbin/lvm.static" || strip "sbin/lvm.static" ||
gen_die 'Could not strip lvm.static!' gen_die 'Could not strip lvm.static!'
/bin/tar -cjf "${LVM2_BINCACHE}" sbin/lvm.static || /bin/tar -cjf "${LVM_BINCACHE}" sbin/lvm.static ||
gen_die 'Could not create binary cache' gen_die 'Could not create binary cache'
cd "${TEMP}" cd "${TEMP}"
rm -rf "${TEMP}/device-mapper" > /dev/null rm -rf "${TEMP}/device-mapper" > /dev/null
rm -rf "${LVM2_DIR}" lvm2 rm -rf "${LVM_DIR}" lvm
fi fi
} }

@ -102,8 +102,8 @@ config_kernel() {
sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_EXT2_FS[ =].*/CONFIG_EXT2_FS=y/g' sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_EXT2_FS[ =].*/CONFIG_EXT2_FS=y/g'
fi fi
# Make sure lvm2 modules are on if --lvm2 # Make sure lvm modules are on if --lvm/--lvm
if isTrue ${CMD_LVM2} if isTrue ${CMD_LVM}
then then
sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_BLK_DEV_DM is.*/CONFIG_BLK_DEV_DM=m/g' sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_BLK_DEV_DM is.*/CONFIG_BLK_DEV_DM=m/g'
sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_DM_SNAPSHOT is.*/CONFIG_DM_SNAPSHOT=m/g' sed -i ${KERNEL_DIR}/.config -e 's/#\? \?CONFIG_DM_SNAPSHOT is.*/CONFIG_DM_SNAPSHOT=m/g'

@ -200,7 +200,7 @@ determine_real_args() {
DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"` DEVFSD_BINCACHE=`cache_replace "${DEVFSD_BINCACHE}"`
DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"` DEVFSD_CONF_BINCACHE=`cache_replace "${DEVFSD_CONF_BINCACHE}"`
DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"` DEVICE_MAPPER_BINCACHE=`cache_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM2_BINCACHE=`cache_replace "${LVM2_BINCACHE}"` LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"` UNIONFS_BINCACHE=`cache_replace "${UNIONFS_BINCACHE}"`
UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"` UNIONFS_MODULES_BINCACHE=`cache_replace "${UNIONFS_MODULES_BINCACHE}"`
@ -210,7 +210,7 @@ determine_real_args() {
BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"` BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"` BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"` DEVICE_MAPPER_BINCACHE=`arch_replace "${DEVICE_MAPPER_BINCACHE}"`
LVM2_BINCACHE=`arch_replace "${LVM2_BINCACHE}"` LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"` DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"` UNIONFS_BINCACHE=`arch_replace "${UNIONFS_BINCACHE}"`
UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"` UNIONFS_MODULES_BINCACHE=`arch_replace "${UNIONFS_MODULES_BINCACHE}"`
@ -377,18 +377,18 @@ determine_real_args() {
OLDCONFIG=0 OLDCONFIG=0
fi fi
if isTrue "${CMD_LVM2}" if isTrue "${CMD_LVM}"
then then
LVM2=1 LVM=1
else else
LVM2=0 LVM=0
fi fi
if isTrue "${CMD_EVMS}" if isTrue "${CMD_EVMS}"
then then
EVMS2=1 EVMS=1
else else
EVMS2=0 EVMS=0
fi fi
if isTrue "${CMD_UNIONFS}" if isTrue "${CMD_UNIONFS}"

@ -137,26 +137,26 @@ append_dmraid(){
rm -r "${TEMP}/initramfs-dmraid-temp/" rm -r "${TEMP}/initramfs-dmraid-temp/"
} }
append_lvm2(){ append_lvm(){
if [ -d "${TEMP}/initramfs-lvm2-temp" ] if [ -d "${TEMP}/initramfs-lvm-temp" ]
then then
rm -r "${TEMP}/initramfs-lvm2-temp/" rm -r "${TEMP}/initramfs-lvm-temp/"
fi fi
cd ${TEMP} cd ${TEMP}
mkdir -p "${TEMP}/initramfs-lvm2-temp/bin/" mkdir -p "${TEMP}/initramfs-lvm-temp/bin/"
mkdir -p "${TEMP}/initramfs-lvm2-temp/etc/lvm/" mkdir -p "${TEMP}/initramfs-lvm-temp/etc/lvm/"
if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable' if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'
then then
print_info 1 ' LVM2: Adding support (using local static binaries)...' print_info 1 ' LVM: Adding support (using local static binaries)...'
cp /sbin/lvm "${TEMP}/initramfs-lvm2-temp/bin/lvm" || cp /sbin/lvm "${TEMP}/initramfs-lvm-temp/bin/lvm" ||
gen_die 'Could not copy over lvm!' gen_die 'Could not copy over lvm!'
else else
print_info 1 ' LVM2: Adding support (compiling binaries)...' print_info 1 ' LVM: Adding support (compiling binaries)...'
compile_lvm2 compile_lvm
/bin/tar -jxpf "${LVM2_BINCACHE}" -C "${TEMP}/initramfs-lvm2-temp" || /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" ||
gen_die "Could not extract lvm2 binary cache!"; gen_die "Could not extract lvm binary cache!";
mv ${TEMP}/initramfs-lvm2-temp/sbin/lvm.static ${TEMP}/initramfs-lvm2-temp/bin/lvm || mv ${TEMP}/initramfs-lvm-temp/sbin/lvm.static ${TEMP}/initramfs-lvm-temp/bin/lvm ||
gen_die 'LVM2 error: Could not move lvm.static to lvm!' gen_die 'LVM error: Could not move lvm.static to lvm!'
fi fi
if [ -x /sbin/lvm ] if [ -x /sbin/lvm ]
then then
@ -164,66 +164,66 @@ append_lvm2(){
# ret=$? # ret=$?
# if [ ${ret} != 0 ] # if [ ${ret} != 0 ]
# then # then
cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/" || cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm-temp/etc/lvm/" ||
gen_die 'Could not copy over lvm.conf!' gen_die 'Could not copy over lvm.conf!'
# else # else
# gen_die 'Could not copy over lvm.conf!' # gen_die 'Could not copy over lvm.conf!'
# fi # fi
fi fi
cd "${TEMP}/initramfs-lvm2-temp/" cd "${TEMP}/initramfs-lvm-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -r "${TEMP}/initramfs-lvm2-temp/" rm -r "${TEMP}/initramfs-lvm-temp/"
} }
append_evms2(){ append_evms(){
if [ -d "${TEMP}/initramfs-evms2-temp" ] if [ -d "${TEMP}/initramfs-evms-temp" ]
then then
rm -r "${TEMP}/initramfs-evms2-temp/" rm -r "${TEMP}/initramfs-evms-temp/"
fi fi
mkdir -p "${TEMP}/initramfs-evms2-temp/lib/evms" mkdir -p "${TEMP}/initramfs-evms-temp/lib/evms"
mkdir -p "${TEMP}/initramfs-evms2-temp/etc/" mkdir -p "${TEMP}/initramfs-evms-temp/etc/"
mkdir -p "${TEMP}/initramfs-evms2-temp/bin/" mkdir -p "${TEMP}/initramfs-evms-temp/bin/"
mkdir -p "${TEMP}/initramfs-evms2-temp/sbin/" mkdir -p "${TEMP}/initramfs-evms-temp/sbin/"
if [ "${EVMS2}" -eq '1' ] if [ "${EVMS}" -eq '1' ]
then then
print_info 1 ' EVMS2: Adding support...' print_info 1 ' EVMS: Adding support...'
mkdir -p ${TEMP}/initramfs-evms2-temp/lib mkdir -p ${TEMP}/initramfs-evms-temp/lib
cp -a /lib/ld-* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/ld-* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
if [ -n "`ls /lib/libgcc_s*`" ] if [ -n "`ls /lib/libgcc_s*`" ]
then then
cp -a /lib/libgcc_s* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libgcc_s* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
fi fi
cp -a /lib/libc-* /lib/libc.* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libc-* /lib/libc.* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libpthread* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libpthread* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libuuid*so* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libuuid*so* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libevms*so* "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/libevms*so* "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/evms "${TEMP}/initramfs-evms2-temp/lib" \ cp -a /lib/evms "${TEMP}/initramfs-evms-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/evms/* "${TEMP}/initramfs-evms2-temp/lib/evms" \ cp -a /lib/evms/* "${TEMP}/initramfs-evms-temp/lib/evms" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /etc/evms.conf "${TEMP}/initramfs-evms2-temp/etc" \ cp -a /etc/evms.conf "${TEMP}/initramfs-evms-temp/etc" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp /sbin/evms_activate "${TEMP}/initramfs-evms2-temp/sbin" \ cp /sbin/evms_activate "${TEMP}/initramfs-evms-temp/sbin" \
|| gen_die 'Could not copy over evms_activate!' || gen_die 'Could not copy over evms_activate!'
# Fix EVMS2 complaining that it can't find the swap utilities. # Fix EVMS complaining that it can't find the swap utilities.
# These are not required in the initramfs # These are not required in the initramfs
for swap_libs in "${TEMP}/initramfs-evms2-temp/lib/evms/*/swap*.so" for swap_libs in "${TEMP}/initramfs-evms-temp/lib/evms/*/swap*.so"
do do
rm ${swap_libs} rm ${swap_libs}
done done
fi fi
cd "${TEMP}/initramfs-evms2-temp/" cd "${TEMP}/initramfs-evms-temp/"
find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
rm -r "${TEMP}/initramfs-evms2-temp/" rm -r "${TEMP}/initramfs-evms-temp/"
} }
append_gensplash(){ append_gensplash(){
@ -433,9 +433,9 @@ create_initramfs() {
append_data 'devfs' "${DEVFS}" append_data 'devfs' "${DEVFS}"
append_data 'unionfs_modules' "${UNIONFS}" append_data 'unionfs_modules' "${UNIONFS}"
append_data 'unionfs_tools' "${UNIONFS}" append_data 'unionfs_tools' "${UNIONFS}"
append_data 'lvm2' "${LVM2}" append_data 'lvm' "${LVM}"
append_data 'dmraid' "${DMRAID}" append_data 'dmraid' "${DMRAID}"
append_data 'evms2' "${EVMS2}" append_data 'evms' "${EVMS}"
if [ "${NOINITRDMODULES}" = '' ] if [ "${NOINITRDMODULES}" = '' ]
then then

@ -119,26 +119,26 @@ create_base_initrd_sys() {
gen_die "Could not extract dmraid binary cache!"; gen_die "Could not extract dmraid binary cache!";
fi fi
# LVM2 # LVM
if [ "${LVM2}" = '1' ] if [ "${LVM}" = '1' ]
then then
if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable'; if [ -e '/sbin/lvm' ] && LC_ALL="C" ldd /sbin/lvm|grep -q 'not a dynamic executable';
then then
print_info 1 'LVM2: Adding support (using local static binaries)...' print_info 1 'LVM: Adding support (using local static binaries)...'
cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" || cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
gen_die 'Could not copy over lvm!' gen_die 'Could not copy over lvm!'
else else
print_info 1 'LVM2: Adding support (compiling binaries)...' print_info 1 'LVM: Adding support (compiling binaries)...'
compile_lvm2 compile_lvm
/bin/tar -jxpf "${LVM2_BINCACHE}" -C "${TEMP}/initrd-temp" || /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initrd-temp" ||
gen_die "Could not extract lvm2 binary cache!"; gen_die "Could not extract lvm binary cache!";
mv ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm || mv ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm ||
gen_die 'LVM2 error: Could not move lvm.static to lvm!' gen_die 'LVM error: Could not move lvm.static to lvm!'
fi fi
for i in vgchange vgscan; do for i in vgchange vgscan; do
ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i || ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i ||
gen_die "LVM2 error: Could not link ${i}!" gen_die "LVM error: Could not link ${i}!"
done done
mkdir -p ${TEMP}/initrd-temp/etc/lvm mkdir -p ${TEMP}/initrd-temp/etc/lvm
if [ -x /sbin/lvm ] if [ -x /sbin/lvm ]
@ -155,42 +155,42 @@ create_base_initrd_sys() {
fi fi
fi fi
# EVMS2 # EVMS
if [ "${EVMS2}" = '1' ] if [ "${EVMS}" = '1' ]
then then
if [ -e '/sbin/evms_activate' ] if [ -e '/sbin/evms_activate' ]
then then
print_info 1 'EVMS2: Adding support...' print_info 1 'EVMS: Adding support...'
mkdir -p ${TEMP}/initrd-temp/lib mkdir -p ${TEMP}/initrd-temp/lib
mkdir -p ${TEMP}/initrd-temp/sbin mkdir -p ${TEMP}/initrd-temp/sbin
mkdir -p ${TEMP}/initrd-temp/etc mkdir -p ${TEMP}/initrd-temp/etc
mkdir -p ${TEMP}/initrd-temp/bin mkdir -p ${TEMP}/initrd-temp/bin
cp -a /lib/ld-* "${TEMP}/initrd-temp/lib" \ cp -a /lib/ld-* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
if [ -n "`ls /lib/libgcc_s*`" ] if [ -n "`ls /lib/libgcc_s*`" ]
then then
cp -a /lib/libgcc_s* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libgcc_s* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
fi fi
cp -a /lib/libc-* /lib/libc.* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libc-* /lib/libc.* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libdl-* /lib/libdl.* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libpthread* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libpthread* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libuuid*so* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libuuid*so* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/libevms*so* "${TEMP}/initrd-temp/lib" \ cp -a /lib/libevms*so* "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/evms "${TEMP}/initrd-temp/lib" \ cp -a /lib/evms "${TEMP}/initrd-temp/lib" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /lib/evms/* "${TEMP}/initrd-temp/lib/evms" \ cp -a /lib/evms/* "${TEMP}/initrd-temp/lib/evms" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp -a /etc/evms.conf "${TEMP}/initrd-temp/etc" \ cp -a /etc/evms.conf "${TEMP}/initrd-temp/etc" \
|| gen_die 'Could not copy files for EVMS2!' || gen_die 'Could not copy files for EVMS!'
cp /sbin/evms_activate "${TEMP}/initrd-temp/sbin" \ cp /sbin/evms_activate "${TEMP}/initrd-temp/sbin" \
|| gen_die 'Could not copy over evms_activate!' || gen_die 'Could not copy over evms_activate!'
# Fix EVMS2 complaining that it cant find the swap utilities. # Fix EVMS complaining that it cant find the swap utilities.
# These are not required in the initrd # These are not required in the initrd
for swap_libs in "${TEMP}/initrd-temp/lib/evms/*/swap*.so" for swap_libs in "${TEMP}/initrd-temp/lib/evms/*/swap*.so"
do do

@ -78,5 +78,5 @@ CONSOLE="/dev/console"
# Only sections that are in by default or those that # Only sections that are in by default or those that
# are not module groups need to be defined here... # are not module groups need to be defined here...
HWOPTS='usb firewire keymap cache pata sata evms2 lvm2 dmraid mdraid slowusb fs' HWOPTS='usb firewire keymap cache pata sata evms lvm dmraid mdraid slowusb fs'
MY_HWOPTS='usb firewire pata sata dmraid mdraid fs net' MY_HWOPTS='usb firewire pata sata dmraid mdraid fs net'

@ -616,7 +616,7 @@ startVolumes() {
fi fi
fi fi
if [ "${USE_LVM2_NORMAL}" -eq '1' ] if [ "${USE_LVM_NORMAL}" -eq '1' ]
then then
if [ -e '/bin/vgscan' -a -e '/bin/vgchange' ] if [ -e '/bin/vgscan' -a -e '/bin/vgchange' ]
then then
@ -630,20 +630,20 @@ startVolumes() {
good_msg "Activating Volume Groups" good_msg "Activating Volume Groups"
/bin/vgchange -ay --ignorelockingfailure 2>/dev/null /bin/vgchange -ay --ignorelockingfailure 2>/dev/null
# Disable EVMS since lvm2 is activated and they dont work together. # Disable EVMS since lvm is activated and they dont work together.
if [ "${USE_EVMS2_NORMAL}" -eq '1' ] if [ "${USE_EVMS_NORMAL}" -eq '1' ]
then then
bad_msg "Disabling EVMS Support because LVM2 started" bad_msg "Disabling EVMS Support because LVM started"
bad_msg "Do not add dolvm2 to the cmdline if this is not what you want" bad_msg "Do not add dolvm to the cmdline if this is not what you want"
bad_msg "LVM2 and EVMS do not work well together" bad_msg "LVM and EVMS do not work well together"
USE_EVMS2_NORMAL=0 USE_EVMS_NORMAL=0
fi fi
else else
bad_msg "vgscan or vgchange not found: skipping LVM2 volume group activation!" bad_msg "vgscan or vgchange not found: skipping LVM volume group activation!"
fi fi
fi fi
if [ "${USE_EVMS2_NORMAL}" -eq '1' ] if [ "${USE_EVMS_NORMAL}" -eq '1' ]
then then
if [ -e '/sbin/evms_activate' ] if [ -e '/sbin/evms_activate' ]
then then

@ -107,8 +107,8 @@ do
fi fi
;; ;;
# Start Volume manager options # Start Volume manager options
dolvm2) dolvm)
USE_LVM2_NORMAL=1 USE_LVM_NORMAL=1
;; ;;
dodmraid) dodmraid)
USE_DMRAID_NORMAL=1 USE_DMRAID_NORMAL=1
@ -117,8 +117,8 @@ do
DMRAID_OPTS=`parse_opt "${x}"` DMRAID_OPTS=`parse_opt "${x}"`
USE_DMRAID_NORMAL=1 USE_DMRAID_NORMAL=1
;; ;;
doevms2) doevms)
USE_EVMS2_NORMAL=1 USE_EVMS_NORMAL=1
;; ;;
# Debug Options # Debug Options
debug) debug)

@ -376,8 +376,8 @@ then
print_info 1 'WARNING... WARNING... WARNING...' print_info 1 'WARNING... WARNING... WARNING...'
print_info 1 'Additional kernel cmdline arguments that *may* be required to boot properly...' print_info 1 'Additional kernel cmdline arguments that *may* be required to boot properly...'
[ "${GENSPLASH}" -eq '1' ] && print_info 1 "add \"vga=791 splash=silent,theme:${GENSPLASH_THEME} console=tty1 quiet\" if you use a gensplash framebuffer ]" [ "${GENSPLASH}" -eq '1' ] && print_info 1 "add \"vga=791 splash=silent,theme:${GENSPLASH_THEME} console=tty1 quiet\" if you use a gensplash framebuffer ]"
[ "${LVM2}" -eq '1' ] && print_info 1 'add "dolvm2" for lvm2 support' [ "${LVM}" -eq '1' ] && print_info 1 'add "dolvm" for lvm support'
[ "${EVMS2}" -eq '1' ] && print_info 1 'add "doevms2" for evms support' [ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support'
[ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support' [ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support'
[ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"' [ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"'
[ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support' [ "${UNIONFS}" -eq '1' ] && print_info 1 'add "unionfs" for unionfs support'

@ -190,14 +190,14 @@ Force keymap selection at boot.
\fB\-\-dmraid\fR \fB\-\-dmraid\fR
Add DMRAID support. Add DMRAID support.
.TP .TP
\fB\-\-evms2\fR \fB\-\-evms\fR
Add in EVMS2 support from static binaries if they exist on the system: Add in EVMS support from static binaries if they exist on the system:
you should run "emerge evms2" first. you should run "emerge evms" first.
.TP .TP
\fB\-\-lvm2\fR \fB\-\-lvm\fR
.RS .RS
Add in LVM2 support from static binaries if they exist on the system, Add in LVM support from static binaries if they exist on the system,
or compile static LVM2 binaries if static ones do not exist. or compile static LVM binaries if static ones do not exist.
.RE .RE
.TP .TP
\fB\-\-luks\fR \fB\-\-luks\fR
@ -275,11 +275,11 @@ Normally used to tell the kernel that it should start a network interface. If pr
\fBnfsroot=\fR<...> \fBnfsroot=\fR<...>
If present, the initrd will try to mount a livecd from that location. Otherwise the location will be deduced from the DCHP request (option root\-path) If present, the initrd will try to mount a livecd from that location. Otherwise the location will be deduced from the DCHP request (option root\-path)
.TP .TP
\fBdoevms2\fR \fBdoevms\fR
Activate EVMS2 volumes on bootup Activate EVMS volumes on bootup
.TP .TP
\fBdolvm2\fR \fBdolvm\fR
Activate LVM2 volumes on bootup Activate LVM volumes on bootup
.TP .TP
\fBdoscsi\fR \fBdoscsi\fR
Activate SCSI devices on bootup, necessary when SCSI support is compiled as modules and you're using SCSI or SATA devices. Activate SCSI devices on bootup, necessary when SCSI support is compiled as modules and you're using SCSI or SATA devices.

@ -106,10 +106,10 @@ DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz" DEVICE_MAPPER_SRCTAR="${GK_SHARE}/pkg/device-mapper.${DEVICE_MAPPER_VER}.tgz"
DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2" DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"
LVM2_VER="VERSION_LVM2" LVM_VER="VERSION_LVM"
LVM2_DIR="LVM2.${LVM2_VER}" LVM_DIR="LVM.${LVM_VER}"
LVM2_SRCTAR="${GK_SHARE}/pkg/LVM2.${LVM2_VER}.tgz" LVM_SRCTAR="${GK_SHARE}/pkg/LVM.${LVM_VER}.tgz"
LVM2_BINCACHE="%%CACHE%%/LVM2.${LVM2_VER}-%%ARCH%%.tar.bz2" LVM_BINCACHE="%%CACHE%%/LVM.${LVM_VER}-%%ARCH%%.tar.bz2"
DMRAID_VER="VERSION_DMRAID" DMRAID_VER="VERSION_DMRAID"
DMRAID_DIR="dmraid/${DMRAID_VER}" DMRAID_DIR="dmraid/${DMRAID_VER}"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -11,7 +11,6 @@ UTILS_MAKE=make
UTILS_CC=gcc UTILS_CC=gcc
UTILS_AS=as UTILS_AS=as
UTILS_LD=ld UTILS_LD=ld
USE_DIETLIBC=0
# Initrd/Initramfs Options # Initrd/Initramfs Options
COMPRESS_INITRD="yes" COMPRESS_INITRD="yes"
@ -20,9 +19,7 @@ USECOLOR="yes"
NOINITRDMODULES="yes" NOINITRDMODULES="yes"
BUSYBOX=1 BUSYBOX=1
UNIONFS=0 UNIONFS=0
LVM2=0
DMRAID=0 DMRAID=0
EVMS2=0
DISKLABEL=0 DISKLABEL=0
# genkernel on mips is only used for LiveCDs && netboots. Catalyst # genkernel on mips is only used for LiveCDs && netboots. Catalyst

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

@ -3,9 +3,9 @@
# RAID # RAID
MODULES_ATARAID="ataraid pdcraid hptraid" MODULES_ATARAID="ataraid pdcraid hptraid"
MODULES_DMRAID="dm-mod dm-mirror" MODULES_DMRAID="dm-mod dm-mirror"
MODULES_EVMS2="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_EVMS="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"
MODULES_LVM2="dm-mod dm-snapshot dm-mirror dm-bbr" MODULES_LVM="dm-mod dm-snapshot dm-mirror dm-bbr"
MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \ MODULES_MDRAID="dm-mod dm-snapshot dm-mirror dm-bbr raid0 raid1 raid456 \
raid5 raid6 raid10" raid5 raid6 raid10"

Loading…
Cancel
Save