марта
24
2009
0

xen ubuntu console-kit-daemon

При установке Ubuntu под Xen часто возникает ошибка:

Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 58 activation: Invalid argument
Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 8 activation: Invalid argument
Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 43 activation: Invalid argument
Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 47 activation: Invalid argument
Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 45 activation: Invalid argument
Mar 24 15:55:13 db console-kit-daemon[13251]: WARNING: Error waiting for native console 12 activation: Invalid argument

лечится это так:

rm /etc/dbus-1/system.d/ConsoleKit.conf
rm /usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service
invoke-rc.d dbus restart

Незнаю, правильно это или нет, но, демон уже не запускается при старте :-)

Опубликовал adik в Технотрония | Метки: ,
мая
28
2008
0

Easily build a Debian xen kernel package without PAE

When it comes to building custom parts for my current flavor of Linux distribution I am a bit of a purist and prefer to work within the distributions package management framework. The main reason being is that removal and upgrading of that package is easier and cleaner. With a good package management system like Debian's it is actually easier than CMMI.

Recently I needed to build a custom Debian kernel for xen without pae extentions but I didn't want to use a vanilla kernel. I wanted to use the official Debian kernel with its included distribution specific patches. Searching around the net I found many ways of doing it but they ultimately failed for one reason or another. Others worked but were just messy or incomplete. So I developed what I consider the cleanest and simplest way of building the kernel. It is actually not far off the official Debian kernel package building method. Here's what I did in easy cut'n'paste steps for a fresh Debian Etch system.

  • Login as root or alternatively (and safer) you can use fakeroot.
  • aptitude update
  • aptitude upgrade
  • aptitude install xen-hypervisor-3.0.3-1-i386
  • mkdir debsource
  • cd debsource
  • apt-get source linux-2.6
  • apt-get build-dep linux-2.6
  • cd linux-2.6*
  • sed -i -e «s/-pae//g» debian/arch/i386/xen/defines
  • sed -i -e «s/-pae//g» debian/rules.gen
  • sed -i -e «s/-pae//g» debian/control
  • sed -i -e «s/# CONFIG_NOHIGHMEM is not set/CONFIG_NOHIGHMEM=y/» \
    — e «s/^CONFIG_HIGHMEM/#CONFIG_HIGHMEM/» \
    — e «s/PAE=y/PAE=n/» debian/arch/config.686-bigmem
  • debian/rules debian/build debian/stamps
  • make -f debian/rules.gen setup-i386-xen-686
  • make -f debian/rules.gen binary-arch-i386-xen-686
  • cd ...
  • dpkg -i linux-modules-2.6.18-6-xen-686_2.6.18.dfsg.1-17etch1_i386.deb \
    linux-image-2.6.18-6-xen-686_2.6.18.dfsg.1-17etch1_i386.deb

http://blogs.ittoolbox.com/linux/locutus/archives/easily-build-a-debian-xen-kernel-package-without-pae-22254

Опубликовал adik в Технотрония | Метки: ,
Апр
20
2008
0

How to move a virtual machine from one computer to another

#create a snapshot of the LV drive
/usr/sbin/lvcreate -L5G -s -n vm_test_snap /dev/VolGroup00/vm_test

#turn the snapshop into a file image
dd if=/dev/VolGroup00/vm_test_snap | gzip -9 >/backup/vm_test.dd.gz

#remove the snapshot
/usr/sbin/lvremove /dev/VolGroup00/vm_test_snap

#move the file image

#copy and modify the Xen config file
cp /etc/xen/test /etc/zen/test2
vi /etc/zen/test2 

#change the name of the LV drive to vm_test2

#uncompress the file image into a LV drive
/usr/sbin/lvcreate -n vm_test2 --size 5G VolGroup00
gzip -dc /backup/vm_test.dd.gz | dd of=/dev/VolGroup00/vm_test2
#start the new VM
/usr/sbin/xm create -c test2

Источник: http://quadruple.ca/how-move-virtual-machine-one-computer-another

Опубликовал adik в Технотрония | Метки: ,
Фев
21
2008
0

xen 3.0.3 pygrub

http://www.kuro5hin.org/story/2007/4/23/3719/35994

apt-get source xen-hypervisor-3.0.3-1-i386-pae
cd xen-3.0-3.0.3-0/tools/pygrub/
apt-get install e2fslibs-dev

make

cp -av build/lib.linux-i686-2.4/grub/fsys/ext2 /usr/lib/xen-3.0.3-1/lib/python/grub/fsys/

mkdir -pv /var/lib/xen/
ln -s /usr/lib/xen-3.0.3-1/bin/pygrub /usr/bin/pygrub
Опубликовал adik в Технотрония | Метки:
Фев
14
2008
0

Сборка Ngnix для Debian/Ubuntu

Оригинал http://deb.wapper.ru/nginx/

Если нужен пакет для testing/unstable или Ubuntu, то его надо будет пересобрать:

   1. Взять .dsc, .diff.gz, .orig.tar.gz
   2. dpkg-source -x этот.dsc
   3. cd в получившийся каталог
   4. dpkg-buildpackage -rfakeroot

после этого полученный пакет поставить обычным образом: dpkg -i nginx_0.4*.deb

Пакет по умолчанию собирается с большинством прибамбасов: fastcgi, imap/pop3, ssl. Для удобства траблшутинга есть также непострипанный бинарник с дебаг-символами: /usr/sbin/nginx.debug. Вся необходимая обвязка тоже есть: инит-скрипт, логротатор, вполне-рабочий конфиг.

Также пакет собирается и работает на Ubuntu Linux и на GNUSolaris.

Такую строку в /etc/apt/sources.list можно использовать для добавления репозитария:

deb http://deb.wapper.ru/nginx/ ./
Опубликовал adik в Технотрония | Метки: ,
Янв
30
2008
0

Как установить Xen 3.2.0 из репозитория на Debian

cd /usr/src
wget http://bits.xensource.com/oss-xen/release/3.2.0/xen-3.2.0.tar.gz
wget http://msinhore.xen-br.org/files/xen/linux-2.6.18-xen.tar.gz

Что нужно для сборки

apt-get install iproute bridge-utils python-twisted gcc binutils make zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap libcurl3-dev \
libncurses5-dev x-dev libsdl1.2-dev  bin86 bcc python-pam patch latex-make  qemu qemu-launcher qemuctl graphviz graphviz-dev lvm2 libvncserver-dev \
libjpeg62-dev libjpeg62 gettext python-xml gawk tetex-extra tetex-base
apt-get install unifdef

Если архитектура i386

apt-get install libc6-xen

Компиляция гипервизора и ядра

cd /usr/src
tar zxvf xen-3.2.0.tar.gz
tar zxvf linux-2.6.18-xen.tar.gz -C xen-3.2.0
cd xen-3.2.0
hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg
make dist && make install
depmod 2.6.18.8-xen
update-grub
update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20
mkinitramfs -o /boot/initrd.img-2.6.18.8-xen 2.6.18.8-xen

Оригинал статьи находится: http://wiki.xen-br.org/index.php?title=Compila_xen_etch

Ещё

#!/bin/bash

SOURCE_DIR=/lib/modules/`uname -r`/source
BUILD_DIR=/lib/modules/`uname -r`/build

KERNEL_HEADER_DIRS='i386'
KERNEL_ARCH='i386'
DIR=/usr/src/linux-headers-`uname -r`

##------------------------------------------------------------------------------

cd ${SOURCE_DIR}; \
( \
  find . \
    -path './Documentation/*' -prune -o \
    -path './arch/*' -prune -o \
    -path './include/asm*' -prune -o \
    -path './scripts/*' -prune -o \
    -path './include/*' -print -o \
    \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Rules.make' \) -print; \
  find include/asm-generic -print; \
  for i in ${KERNEL_HEADER_DIRS}; do \
    find arch/$i \
      \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Rules.make' \) -print; \
    find include/asm-$i -print; \
  done; \
) \
| \
cpio -pd --preserve-modification-time ${DIR}

##------------------------------------------------------------------------------

mkdir -p "${DIR}/arch/${KERNEL_ARCH}/kernel"
mkdir -p "${DIR}/include"
cp -a ${BUILD_DIR}/{.config,.kernel*,Module.symvers}  "${DIR}"

[ -d "${BUILD_DIR}/arch/${KERNEL_ARCH}/include" ] && \
        cp -a "${BUILD_DIR}/arch/${KERNEL_ARCH}/include" "${DIR}/arch/${KERNEL_ARCH}/include" || :
[ -f "${BUILD_DIR}/arch/${KERNEL_ARCH}/kernel/asm-offsets.s" ] && \
        cp "${BUILD_DIR}/arch/${KERNEL_ARCH}/kernel/asm-offsets.s" "${DIR}/arch/${KERNEL_ARCH}/kernel" || :
[ -f "${BUILD_DIR}/arch/${KERNEL_ARCH}/module.lds" ] && \
        cp "${BUILD_DIR}/arch/${KERNEL_ARCH}/module.lds" "${DIR}/arch/${KERNEL_ARCH}"

cp -a ${BUILD_DIR}/include/config "${DIR}/include"

ln -sf "${DIR}/include/asm-${KERNEL_ARCH}" "${DIR}/include/asm"

cd ${BUILD_DIR}; \
for dir in linux asm-generic asm-${KERNEL_HEADER_DIRS}; do \
        mkdir "${DIR}/include/$dir"; \
        echo "${BUILD_DIR}/include/${dir}/* ${DIR}/include/$dir"
        cp -a ${BUILD_DIR}/include/${dir}/* ${DIR}/include/$dir
done

cp -a ${SOURCE_DIR}/scripts* ${DIR}
cp -a ${BUILD_DIR}/scripts/* ${DIR}/scripts/

rm ${BUILD_DIR}
ln -sf ${DIR} ${BUILD_DIR}
exit 0
Опубликовал adik в Технотрония | Метки: , ,

Работает на WordPress | Локализация: goodwin.wpbot.ru