/[sysadmin-cookbook]/recepies/lxc/kvm/01-setup/02-build-kvm-kernel.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /recepies/lxc/kvm/01-setup/02-build-kvm-kernel.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 255 - (show annotations)
Sat May 14 15:28:41 2011 UTC (13 years, 1 month ago) by dpavlin
File MIME type: application/x-sh
File size: 913 byte(s)
patch kernel with lxc patches
1 #!/bin/sh -xe
2
3 wget -nc http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/patches.tar.gz
4 tar xvf patches.tar.gz
5
6 wget -nc ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.38.2.tar.gz
7 tar xvf linux-2.6.38.2.tar.gz
8
9
10 cd linux-2.6.38.2
11
12 ls ../patches/*.patch | xargs -i sh -cx "patch -p1 < {}"
13
14
15 # Start with the default configuration
16 make defconfig
17
18 cat >> .config << EOF
19 # Add /dev/hda for qemu/kvm
20 CONFIG_IDE=y
21 CONFIG_IDE_GD=y
22 CONFIG_IDE_GD_ATA=y
23 CONFIG_BLK_DEV_PIIX=y
24
25 # Switch on all container functionality
26 CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
27 CONFIG_CGROUP_DEVICE=y
28 CONFIG_CGROUP_MEM_RES_CTLR=y
29 CONFIG_CGROUP_PERF=y
30 CONFIG_BLK_CGROUP=y
31 CONFIG_NET_CLS_CGROUP=y
32
33 # Virtual network devices
34 CONFIG_VETH=y
35 CONFIG_MACVLAN=y
36 CONFIG_VLAN_8021Q=y
37 EOF
38 yes '' | make oldconfig
39
40 # Build kernel (counting CPUS to supply appropriate -j to make)
41
42 CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
43 make -j $CPUS
44

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26