About this list Date view Thread view Subject view Author view Attachment view

From: John Goerzen (jgoerzen_at_complete.org)
Date: Fri 06 Dec 2002 - 22:19:48 GMT


This is how I do it:

run as:

setupserver newname woody 192.168.blah.blah
replace apt-proxy:9999 with your nearest debian mirror

#!/bin/bash
set -e
set -x
set -v
SERVERNAME=$1
SERVERTYPE=$2
IPADDR=$3
TOPDIR=`pwd`/$1
debootstrap $2 $1 http://apt-proxy:9999/debian
echo "LANG=C" >> /etc/environment

cat > $TOPDIR/etc/apt/sources.list <<EOF
deb http://apt-proxy:9999/debian stable main
deb http://apt-proxy:9999/non-US stable/non-US main
deb http://apt-proxy:9999/security stable/updates main

deb-src http://apt-proxy:9999/debian stable main
deb-src http://apt-proxy:9999/non-US stable/non-US main
deb-src http://apt-proxy:9999/security stable/updates main
EOF

INSTPACK="less joe ssh cron-apt postfix host"

cd $TOPDIR
chroot $TOPDIR apt-get update
chroot $TOPDIR apt-get -y install $INSTPACK

cat >> $TOPDIR/etc/cron-apt/config <<EOF
MAIL=/var/log/cron-apt/mail
MAILTO=root
MAILON=upgrade

EOF

chroot $TOPDIR ln -s /usr/sbin/cron-apt /etc/cron.daily/cron-apt

cd $TOPDIR/etc/postfix
cp master.cf master.cf.orig
# Don't start the SMTP server.
sed 's/^smtp.*inet/#&/g' < master.cf.orig > master.cf

cd $TOPDIR

rm -r $TOPDIR/dev/*
cd $TOPDIR/dev
ln -s /sbin/MAKEDEV MAKEDEV
cd $TOPDIR/dev
DEVICES="std consoleonly pty fd"
for DEV in $DEVICES; do
  echo Running MAKEDEV for $DEV
  chroot $TOPDIR sh -c "cd /dev ; ./MAKEDEV $DEV"
done

cd $TOPDIR
chroot $TOPDIR dpkg --purge pcmcia-cs dhcp-client pppoe pppoeconf lilo

echo "127.0.0.1 localhost" > $TOPDIR/etc/hosts
echo "$IPADDR $1.excelhustler.com $1" >> $TOPDIR/etc/hosts

#chroot $TOPDIR base-config
cd $TOPDIR/etc
echo 'US/Central' > timezone
ln -s /usr/share/zoneinfo/US/Central localtime
cd $TOPDIR
chroot $TOPDIR /usr/lib/base-config/99inittab

In article <FBEOIGOBNDBMHEIICOFMOELJCAAA.davidc_at_hotpop.com>, davidc wrote:
>> I now have a mostly woody root server,
>> a kernel.deb that works and found
>> a nice newvserver script that builds
>> an new vserver for me using dbootstrap
>> (changed to to use chroot)
>>
>> No admin tools yet.
>>
>> If anyone would like to look at what I did
>> and / or get the files:
>> http://this.is/debian-vserver/
>>
>> Hope to be a more usefull member of the list
>> now that I have a running vserver.
>
> Any chance you could give a brief explanation how you did this as I'm just
> about to start my own one in Debian.
>
> Cheers.
>
>


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 13 Dec 2002 - 03:49:14 GMT by hypermail 2.1.3