Create XEN Torrent Domain

xen-create-image --hostname=$DOMAIN_NAME --ip= --gateway= --netmask= \
--dir=/home/xen --dist=hardy --mirror= \
--size=4Gb --memory=128Mb --swap=128Mb
sed -i 's|file:|tap:aio:|g' /etc/xen/$DOMAIN_NAME.cfg
mv /etc/xen/$DOMAIN_NAME.cfg /etc/xen/$DOMAIN_NAME
apt-get install -y wget rtorrent
cat <<EOF>> ~/.rtorrent.rc 
upload_rate = 16
port_range = 7000-7200
# todo
mount /home/xen/domains/$DOMAIN_NAME/disk.img /mnt -o loop
chroot /mnt
umount /mnt/
cat ~/.rtorrent.rc 

Ubuntu USB boot (Ubuntu Live CD boot from USB)

# install needed apps
sudo apt-get install -y syslinux mbr mtools dosfstools
# OPTIONALY format drive 
# sudo umount ${DEVICE}1
# sudo mkfs.vfat -n ${VOLUME} ${DEVICE}1
# install mbr and syslinux
mkdir /tmp/${VOLUME}
sudo mount ${DEVICE}1 /tmp/${VOLUME}
sudo install-mbr ${DEVICE}
sudo mkdir /tmp/${VOLUME}/boot
sudo syslinux -f ${DEVICE}1 -d boot
#sudo syslinux -f ${DEVICE}1
#sudo syslinux -smf ${DEVICE}1
sudo cp /usr/lib/syslinux/modules/bios/vesamenu.c32 /tmp/${VOLUME}/boot/
sudo mkdi

Create XEN Hylafax domain

# redirect your ISDN card on dom0
# set domU parameter
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:fa:fa
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_PCI ] && DOMAIN_PCI=04:05.0
# create domU
# redirect avm usb card
echo "pci=['${DOMAIN_PCI}']" >> /etc/xen/${DOMAIN_NAME}
echo "extra = 'iommu=soft'" >> /etc/xen/${DOMAIN_NAME}
# start domU
xm create -c ${DOMAIN_NAME}
# install AVM FRITZ!Card PCI kernel moud

Install and configure AVM Fritz!Card USB driver

# If you use Ubuntu Gutsy you don´t need to compile the fcusb2 driver at self, follow this howto
# it will automaticly download and configure all needed files
# be sure that you running this script as root
if [ "$USER" != "root" ]; then
	sudo $0
	exit 0
# install needed packages
apt-get install -y avm-fritz-firmware linux-restricted-modules-$(uname -r) wget
# install avm firmware
#wget -P /tmp
#tar -xzf /tmp/fcusb2-suse93-3.11-07.tar.gz -C /tmp
#mkdir /usr/share/isdn/

Compile AVM Fritz!Card USB driver for Ubuntu (fcusb2.ko)

# note
# successfully tested on Ubuntu Gutsy 7.10, this driver currently dont work with Hardy 8.04
apt-get install -y wget rpm build-essential linux-headers-$(uname -r) avm-fritz-firmware
wget -P /tmp
cd /tmp
rpm2cpio fcusb2-0.1-0.src.rpm | cpio -i --make-directories
if [ $(uname -m) == "x86_64" ]; then
	# amd64
	tar -xzf fcusb2-suse93-64bit-3.11-07.tar.gz
	cd /tmp/fritz/src/
	patch -p2 < /tmp/fritz-usb.diff
	patch -p2 < /tmp/fritz_init_work.diff
	patch -p2 < /tmp/fritz_urb.diff
	patch -p2 < /tmp/f

Ubuntu LiveCD PXE boot (Ubuntu Live CD boot from network)

if [ ! -z $1 ]; then
        if [ !

PCI Delegation in Xen (Xen Pci Passthrough)

# Debian 7
# add xen-pciback to initrd
echo "xen-pciback" >> /etc/modules
update-initramfs -u
# hide device (module and pciid have to be adapted)
cat <<EOF> /etc/modprobe.d/xen-pciback.conf 
install e100 modprobe xen-pciback; modprobe --first-time --ignore-install e100
options xen-pciback hide=(00:0c.0)
# test
xm pci-list-assignable-devices
# Links

Create squashfs

mount -t squashfs /cdrom/KANOTIX/KANOTIX /mnt/ -o loop
cp -a * /root/KANOTIX/
rm -rf 2.6.24-3-kanotix
cp -a /lib/modules/2.6.24-3-kanotix/ /root/KANOTIX/lib/modules/
umount /mnt
mksquashfs * ../KANOTIX.squa

Compile Ubuntu kernel

apt-get install fakeroot build-essential makedumpfile ncurses-dev
cd /usr/src
?? apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
?? apt-get build-dep linux-ubuntu-modules-$(uname -r)

FILE=/tmp/newOrder_$(date -I)_$$
IN=$(cat /dev/stdin)
# write file
echo "${IN}" > ${FILE}
# execute_another_app ${FILE}
exit 0
Syndicate content