| 1 | == Installing Extras == |
| 2 | |
| 3 | === Setup xen === |
| 4 | |
| 5 | * Install with: |
| 6 | |
| 7 | {{{ |
| 8 | apt-get install xen-hypervisor-3.0.3-1-i386 xen-linux-system-2.6.18-4-xen-686 libc6-xen |
| 9 | }}} |
| 10 | |
| 11 | * Edit /boot/grub/menu.1st |
| 12 | |
| 13 | {{{ |
| 14 | ## Xen hypervisor options to use with the default Xen boot option |
| 15 | # xenhopt=dom0_mem=131072 |
| 16 | }}} |
| 17 | |
| 18 | * run update-grub and reboot |
| 19 | |
| 20 | * Install bridge-utils and xen-tools |
| 21 | |
| 22 | {{{ |
| 23 | aptitude install bridge-utils xen-tools |
| 24 | /etc/init.d/xend restart |
| 25 | }}} |
| 26 | |
| 27 | * Edit /etc/xen-tools/xen-tools.conf. Apply the following diffs: |
| 28 | |
| 29 | {{{ |
| 30 | 0 gramsci:/etc/xen-tools# diff -u xen-tools.conf.orig xen-tools.conf |
| 31 | --- xen-tools.conf.orig 2007-05-27 19:59:38.000000000 -0400 |
| 32 | +++ xen-tools.conf 2007-05-27 20:01:15.000000000 -0400 |
| 33 | @@ -35,6 +35,7 @@ |
| 34 | # |
| 35 | ## |
| 36 | # lvm = skx-vg |
| 37 | +lvm = vg_gramsci0 |
| 38 | |
| 39 | |
| 40 | # |
| 41 | @@ -61,7 +62,7 @@ |
| 42 | ## |
| 43 | # |
| 44 | # copy = /path/to/pristine/image |
| 45 | -# debootstrap = 1 |
| 46 | +debootstrap = 1 |
| 47 | # rpmstrap = 1 |
| 48 | # tar = /path/to/img.tar |
| 49 | # |
| 50 | @@ -95,7 +96,7 @@ |
| 51 | swap = 128Mb # Swap size |
| 52 | # noswap = 1 # Don't use swap at all for the new system. |
| 53 | fs = ext3 # use the EXT3 filesystem for the disk image. |
| 54 | -dist = sarge # Default distribution to install. |
| 55 | +dist = etch # Default distribution to install. |
| 56 | image = sparse # Specify sparse vs. full disk images. |
| 57 | |
| 58 | # |
| 59 | @@ -154,8 +155,8 @@ |
| 60 | # |
| 61 | # Default kernel and ramdisk to use for the virtual servers |
| 62 | # |
| 63 | -kernel = /boot/vmlinuz-2.6.16-2-xen-686 |
| 64 | -initrd = /boot/initrd.img-2.6.16-2-xen-686 |
| 65 | +kernel = /boot/vmlinuz-2.6.18-4-xen-686 |
| 66 | +initrd = /boot/initrd.img-2.6.18-4-xen-686 |
| 67 | |
| 68 | # |
| 69 | # The architecture to use when using debootstrap or rpmstrap. |
| 70 | 1 gramsci:/etc/xen-tools# |
| 71 | }}} |
| 72 | |
| 73 | * Create new xen instances with: |
| 74 | |
| 75 | {{{ |
| 76 | xen-create-image --size=5Gb --swap=512Mb --gateway=209.51.180.17 --netmask=255.2 |
| 77 | 55.255.240 --ip=209.51.180.24 --hostname=mendes |
| 78 | }}} |
| 79 | |
| 80 | Change settings as needed. |
| 81 | |
| 82 | |
| 83 | ==== Encrypted File system ==== |
| 84 | |
| 85 | * Install programs: |
| 86 | |
| 87 | {{{ |
| 88 | $ sudo apt-get install dmsetup cryptsetup |
| 89 | }}} |
| 90 | |
| 91 | * Create an encrypted file system for members: |
| 92 | |
| 93 | * Now, unmount the partition (make sure there is no data on it that you care about). |
| 94 | |
| 95 | {{{ |
| 96 | $ sudo umount /home/members |
| 97 | }}} |
| 98 | |
| 99 | * Create the encrypted filesystem: |
| 100 | |
| 101 | {{{ |
| 102 | $ cryptsetup luksFormat /dev/mapper/vg_NAMEOFSERVER0-members |
| 103 | }}} |
| 104 | |
| 105 | You will be prompted for a password. Put password in resource db! |
| 106 | |
| 107 | * Add to crypttab |
| 108 | |
| 109 | {{{ |
| 110 | echo crypt_members /dev/mapper/vg_NAMEOFSERVER0-members none luks >> /etc/crypttab |
| 111 | }}} |
| 112 | |
| 113 | * Start it |
| 114 | |
| 115 | {{{ |
| 116 | /etc/init.d/cryptdisks start |
| 117 | }}} |
| 118 | |
| 119 | * Create a file system on the partition: |
| 120 | |
| 121 | {{{ |
| 122 | $ mkfs -t ext3 /dev/mapper/crypt_members |
| 123 | }}} |
| 124 | |
| 125 | * Remove cryptdisks from the rc2.d directory - we do not want this to start automatically on boot! Instead we want to start it manually so the boot process doesn't hang waiting for a password. |