#!/bin/sh -x # vserver-fc1 # Creates a Fedora Core 1 vserver using yum. # Note that it won't work as-is -- before running it you'll need to # read and understand it all (perhaps run it line-by-line), and then # make appropriate modifications to suit your local conditions. # Geoffrey D. Bennett # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # location of fedora-core-1 RPMs FEDORA=/vservers/somewhere/var/ftp/pub/fedora FC1=$FEDORA/linux/core/1/i386/os/Fedora/RPMS # location of fixed glibc FC73=/vservers/somewhere/var/ftp/pub/netcraft/fedora73 # name of our vserver and where it will go VSERVER=fc1-test VSERVERDIR=/vservers/$VSERVER # create vserver /dev mkdir -p $VSERVERDIR/dev cd /dev cp -a fd full null ptmx random tty urandom zero $VSERVERDIR/dev/ # initialise the RPM database mkdir -p $VSERVERDIR/var/lib/rpm rpm --root $VSERVERDIR --initdb # create a minimal /etc/mtab mkdir -p $VSERVERDIR/etc cat > $VSERVERDIR/etc/mtab < $VSERVERDIR/etc/yum.conf < $VSERVERDIR/tmp/post-install <