cd "${UNIONFS_DIR}"
print_info 1 'unionfs modules: >> Compiling...'
echo "LINUXSRC=${KERNEL_DIR}" >> fistdev.mk
+ echo 'TOPINC=-I$(LINUXSRC)/include' >> fistdev.mk
echo "MODDIR= /lib/modules/${KV}" >> fistdev.mk
echo "KERNELVERSION=${KV}" >> fistdev.mk
# Fix for hardened/selinux systems to have extened attributes
if [ "${PAT}" -ge '6' ]
then
- # Setup the kernel sources to compile modules
- cd ${KERNEL_DIR}
- compile_generic "modules_prepare" kernel
-
cd "${TEMP}"
cd "${UNIONFS_DIR}"
- compile_generic unionfs.ko kernel
+ # Compile unionfs module within the unionfs
+ # environment not within the kernelsrc dir
+ make unionfs.ko
else
gen_die 'unionfs is only supported on 2.6 targets'
fi
fi
cd ${TEMP}
mkdir -p "${TEMP}/initramfs-lvm2-temp/bin/"
+ mkdir -p "${TEMP}/initramfs-lvm2-temp/etc/lvm/"
if [ -e '/sbin/lvm' ] && ldd /sbin/lvm|grep -q 'not a dynamic executable';
then
print_info 1 ' LVM2: Adding support (using local static binaries)...'
gen_die "Could not extract lvm2 binary cache!";
mv ${TEMP}/initramfs-lvm2-temp/sbin/lvm.static ${TEMP}/initramfs-lvm2-temp/bin/lvm ||
gen_die 'LVM2 error: Could not move lvm.static to lvm!'
- fi
+ fi
+ cp /etc/lvm/lvm.conf "${TEMP}/initramfs-lvm2-temp/etc/lvm/lvm.conf" ||
+ gen_die 'Could not copy over lvm.conf!'
cd "${TEMP}/initramfs-lvm2-temp/"
find . -print | cpio --quiet -o -H newc | gzip -9 > ${CACHE_CPIO_DIR}/initramfs-lvm2-${LVM2_VER}.cpio.gz
rm -r "${TEMP}/initramfs-lvm2-temp/"
print_info 1 'LVM2: Adding support (using local static binaries)...'
cp /sbin/lvm "${TEMP}/initrd-temp/bin/lvm" ||
gen_die 'Could not copy over lvm!'
- ln "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgscan" ||
- gen_die 'Could not symlink lvm -> vgscan!'
- ln "${TEMP}/initrd-temp/bin/lvm" "${TEMP}/initrd-temp/bin/vgchange" ||
- gen_die 'Could not symlink lvm -> vgchange!'
else
print_info 1 'LVM2: Adding support (compiling binaries)...'
compile_lvm2
gen_die "Could not extract lvm2 binary cache!";
mv ${TEMP}/initrd-temp/bin/lvm.static ${TEMP}/initrd-temp/bin/lvm ||
gen_die 'LVM2 error: Could not move lvm.static to lvm!'
- for i in vgchange vgscan; do
- ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i ||
- gen_die "LVM2 error: Could not link ${i}!"
- done
- fi
+ fi
+ for i in vgchange vgscan; do
+ ln ${TEMP}/initrd-temp/bin/lvm ${TEMP}/initrd-temp/bin/$i ||
+ gen_die "LVM2 error: Could not link ${i}!"
+ done
+ mkdir -p ${TEMP}/initrd-temp/etc/lvm
+ cp /etc/lvm/lvm.conf "${TEMP}/initrd-temp/etc/lvm/lvm.conf" ||
+ gen_die 'Could not copy over lvm.conf!'
fi
# EVMS2
DEVBIND=1
mount -o bind ${NEW_ROOT}/dev /dev
fi
-
+ [ ! -e /dev/tty0 ] && ln -s /dev/tty1 /dev/tty0
+
chooseKeymap
[ "${DEVBIND}" -eq '1' ] && umount /dev
if [ "${REAL_ROOT}" = '/dev/nfs' ]; then
findnfsmount
else
- mount -o rw ${REAL_ROOT} ${NEW_ROOT}
+ # mount ro so fsck doesn't barf later
+ mount -o ro ${REAL_ROOT} ${NEW_ROOT}
fi
# If mount is successful break out of the loop
# Genkernel v3
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
-GK_V='3.3.11c'
+GK_V='3.3.11d'
TMPDIR='/var/tmp/genkernel'
TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified.