cd ${LINUX_SOURCE_DIRECTORY} &&
# make the append
mkdir -p ${INSTALL_ROOT}/boot &&
if [[ -z "$INTERNAL_ISO_VAR" ]] ; then
	if grep 'CONFIG_MODULES=y' ./.config ; then
		case "$VERSION" in
			2.[0246]*)
				message "${MESSAGE_COLOR}installing for a 2.x kernel${DEFAULT_COLOR}" &&
				local strip_modules
				if list_find "$OPTIMIZATIONS" strip; then
					# makes make run strip --strip-debug over the modules
					strip_modules=1
				fi

				make INSTALL_MOD_PATH="${INSTALL_ROOT}" INSTALL_MOD_STRIP="$strip_modules" modules_install
				;;
			*)
				message "${PROBLEM_COLOR}I again don't know what version: $VERSION is${DEFAULT_COLOR}" &&
				return 1
				;;
		esac 
	fi &&
	message "${MESSAGE_COLOR}Copying and linking kernel${DEFAULT_COLOR}" &&
	case  ${KERNEL_ARCH}  in
		ppc)
			cp ${LINUX_SOURCE_DIRECTORY}/vmlinux \
			${INSTALL_ROOT}/boot/vmlinux-$VERSION &&
			ln -sf vmlinux-${VERSION} \
			${INSTALL_ROOT}/boot/vmlinux
			;;
		sparc*)
			gzip -c9 ${LINUX_SOURCE_DIRECTORY}/vmlinux > \
			${INSTALL_ROOT}/boot/vmlinuz-$VERSION &&
			ln -sf vmlinuz-${VERSION} \
			${INSTALL_ROOT}/boot/vmlinuz
			;;
		*)
            if grep CONFIG_XEN=y ./.config
            then
				cp ${LINUX_SOURCE_DIRECTORY}/arch/${KERNEL_ARCH}/boot/vmlinuz \
				${INSTALL_ROOT}/boot/vmlinuz-$VERSION &&
				ln -sf vmlinuz-${VERSION} \
				${INSTALL_ROOT}/boot/vmlinuz
			elif [[ -f ${LINUX_SOURCE_DIRECTORY}/arch/${KERNEL_ARCH}/boot/bzImage ]]
			then
				cp ${LINUX_SOURCE_DIRECTORY}/arch/${KERNEL_ARCH}/boot/bzImage \
				${INSTALL_ROOT}/boot/vmlinuz-$VERSION &&
				ln -sf vmlinuz-${VERSION} \
				${INSTALL_ROOT}/boot/vmlinuz
			else
				message "${MESSAGE_COLOR}big zImage not available falling back to vmlinux${DEFAULT_COLOR}"
				cp ${LINUX_SOURCE_DIRECTORY}/vmlinux  \
                                ${INSTALL_ROOT}/boot/vmlinux-$VERSION &&
				ln -sf vmlinux-${VERSION} \
				${INSTALL_ROOT}/boot/vmlinux
			fi
			;;
	esac &&
	if [[ -f ./ifenslave ]]
	then
		cp -av ./ifenslave ${INSTALL_ROOT}/sbin/ifenslave-$VERSION
		ln -fs ifenslave-$VERSION ${INSTALL_ROOT}/sbin/ifenslave
	fi &&
	message "${MESSAGE_COLOR}Copying and linking System.map${DEFAULT_COLOR}" &&
	cp ${LINUX_SOURCE_DIRECTORY}/System.map ${INSTALL_ROOT}/boot/System.map-${VERSION} &&
	ln -sf System.map-${VERSION} \
	${INSTALL_ROOT}/boot/System.map &&
	message "${MESSAGE_COLOR}Copying and linking .config${DEFAULT_COLOR}" &&
	cp ${LINUX_SOURCE_DIRECTORY}/.config ${INSTALL_ROOT}/boot/config-${VERSION} &&
	ln -sf config-${VERSION} \
	${INSTALL_ROOT}/boot/config &&
	# for people with boot partitions so grub can still find the kernel
	# if they reference /boot/vmlinuz in their menu.lst
	ln -sfn . ${INSTALL_ROOT}/boot/boot &&
	if is_depends_enabled $SPELL linux-initramfs
	then
		mkinitrd --force --ignore-missing -o ${INSTALL_ROOT}/boot/initrd.img-${VERSION} ${VERSION}
	fi
fi &&
ln -sfn `basename ${LINUX_SOURCE_DIRECTORY}` ${BUILD_DIRECTORY}/linux 
