I setup a VM for psybnc and irssi.
# cd /xen
# mkdir irc
# cd irc
# tar xjvf ../debian-4.0-20070809.tar.bz2
Generate the last 3 bytes for the MAC
dd if=/dev/urandom bs=1 count=3 2>/dev/null | od -tx1 | head -1 | cut -d' ' -f2- | tr -d ' ' | tr '[a-f]' '[A-F]'
Create the config file /xen/irc/irc.cfg
kernel = "/boot/vmlinuz-2.6-xenU"
memory = 64
name = "tigger"
vif = [ 'bridge=xenbr0,mac=00:16:3e:97:29:51' ]
dhcp = "dhcp"
disk = ['file:/xen/irc/debian-4.0.img,sda1,w'
, 'file:/xen/irc/debian.swap,sda2,w'
]
root = "/dev/sda1 ro"
ramdisk = "/boot/initrd-2.6-xenU.img"
I linked the config so it will autostart when owl boots and I started the vm
ln -s /xen/irc/irc.cfg /etc/xen/auto/
xm create -c irc.cfg
Watch the boot, and ssh to the dhcp temp address
/etc/network/interfaces
auto eth0
iface eth0 inet static
address x.y.z.202
netmask 255.255.255.224
gateway x.y.z.222
/etc/resolve.conf
search revantine.net
nameserver 192.168.0.36
reset the root password
change the ssh port
Set the hostname in /etc/hostname
irked.revantine.com
If you get “4gb seg fixup” errors, this will probably fix it.
apt-get update
apt-get install libc6-xen
echo "hwcap 0 nosegneg" > /etc/ld.so.conf.d/nosegneg.conf
ldconfig -v -p 2>&1 | grep libc.so
ldconfig
Permissions on /tmp are correct.
Maybe the permissions are only messed up if you have a seperate /tmp partition.
useradd charles
useradd psybnc
existing psybnc.sh to start psybnc:
#!/bin/bash
MATCHTEXT=[p]sybnc$
if ! ps -A|grep -e $MATCHTEXT >/dev/null
then
date
echo "Script starting..."
exec su psybnc -c "cd /usr/local && ./psybnc"
else
# echo "Script is already running."
exit 1
fi
I add this to /etc/rc.local to start psybnc:
su phybnc -c “cd /usr/local && ./psybnc” &>/dev/null &
My new ~/.screenrc
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'
screen -t shell1 0
screen -t shell2 1
#screen -t shell3 2
#screen -t shell4 3 ssh hostname.domain.com