/[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 252 - (show annotations)
Fri May 13 19:58:32 2011 UTC (12 years, 11 months ago) by dpavlin
File MIME type: application/x-sh
File size: 856 byte(s)
build kvm kernel
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 # Start with the default configuration
13 make defconfig
14
15 cat >> .config << EOF
16 # Add /dev/hda for qemu/kvm
17 CONFIG_IDE=y
18 CONFIG_IDE_GD=y
19 CONFIG_IDE_GD_ATA=y
20 CONFIG_BLK_DEV_PIIX=y
21
22 # Switch on all container functionality
23 CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
24 CONFIG_CGROUP_DEVICE=y
25 CONFIG_CGROUP_MEM_RES_CTLR=y
26 CONFIG_CGROUP_PERF=y
27 CONFIG_BLK_CGROUP=y
28 CONFIG_NET_CLS_CGROUP=y
29
30 # Virtual network devices
31 CONFIG_VETH=y
32 CONFIG_MACVLAN=y
33 CONFIG_VLAN_8021Q=y
34 EOF
35 yes '' | make oldconfig
36
37 # Build kernel (counting CPUS to supply appropriate -j to make)
38
39 CPUS=$(grep "^processor" /proc/cpuinfo | wc -l)
40 make -j $CPUS
41

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26