#!/bin/bash # # This is a generic EVMS build script for Gnu-based systems under # BASH. Only thing you'd have to fiddle with is the # "KERNEL_EXTRAVERSION=", creating a "kernel-2.4.24-i686-evms.config" # for your system, doing the "make modules_install", and installing the # evms utilities.. Hope it helps someone. (Conforms to evms docs at # http://evms.sourceforge.net/install/ which are excellent.) # # Contributed by Peter Smith KERNEL_EXTRAVERSION=-1 if [ ! -f device-mapper.1.00.07.tgz ]; then ncftpget ftp://ftp.sistina.com/pub/LVM2/device-mapper/device-mapper.1.00.07.tgz;fi && if [ ! -f evms-2.2.2.tar.gz ]; then wget http://dl.sourceforge.net/evms/evms-2.2.2.tar.gz;fi && if [ ! -f linux-2.4.24.tar.bz2 ]; then wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.24.tar.bz2;fi && if [ -d device-mapper.1.00.07 ]; then echo "Removing device-mapper.1.00.07..." && rm -Rf device-mapper.1.00.07;fi && if [ -d evms-2.2.2 ]; then echo "Removing evms-2.2.2..." && rm -Rf evms-2.2.2;fi && if [ -d linux-2.4.24 ]; then echo "Removing linux-2.4.24..." && rm -Rf linux-2.4.24;fi && tar zxvf device-mapper.1.00.07.tgz|awk '{print "tar dm: "$0}'&& tar zxvf evms-2.2.2.tar.gz|awk '{print "tar evms: "$0}'&& tar jxvf linux-2.4.24.tar.bz2|awk '{print "tar linux: "$0}'&& cd linux-2.4.24 && # Device Mapper: patch -p1 <../device-mapper.1.00.07/patches/linux-2.4.22-devmapper-ioctl.patch|awk '{print "dm: "$0}' && # EVMS Snapshotting (from extra patches): cat ../device-mapper.1.00.07/patches/linux-2.4.22-VFS-lock.patch ../evms-2.2.2/kernel/2.4/dm-snapshot.patch|patch -p1|awk '{print "evms snapshotting: "$0}' && # EVMS Bad-Block-Relocation: patch -p1 <../evms-2.2.2/kernel/2.4/dm-bbr.patch|awk '{print "evms bbr: "$0}' && # EVMS Software-RAID: patch -p1 <../evms-2.2.2/kernel/2.4/md-recovery.patch|awk '{print "evms s-raid: "$0}' && # EVMS Multipath: patch -p1 <../evms-2.2.2/kernel/2.4/md-multipath.patch|awk '{print "evms mpath: "$0}' && # EVMS Sparse Segment Manager: patch -p1 <../evms-2.2.2/kernel/2.4/dm-sparse.patch|awk '{print "evms ssm: "$0}' && # Make kernel... mv -f Makefile Makefile~ && sed "s/EXTRAVERSION =/EXTRAVERSION = $KERNEL_EXTRAVERSION/" Makefile~ >Makefile && #mv -f Makefile Makefile~ && #(echo 'MAKE = make -j6'&&cat Makefile~)>Makefile && cp ../kernel-2.4.24-i686-evms.config .config && (while true;do echo;done)|make oldconfig && cat >>.config <