We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.

Fedora Core 1 How To

This howto is supposed to guide you through the process of installing a new box with fedora core 1, turning it into a host, create a vserver and get it updated to the latest packages available. This HowTo? should also work for any earlier version of RedHat? linux (like 9.0). Just use install-rh9.0 rather then install-fc1.

What about Fedora Core 2 and 3?
This Howto only covers FC1 for the mere reason that FC2/FC3 is based on Linux kernel 2.6 and the current vserver implementation for this series of :kernels is not yet in stable condition. Since anyone in need for a howto should not be bothered to use experimental code more then required, this :howto only deals with the stable branch for a 2.4-series of linux kernels. There'll be a seperate howto for FC2/FC3 once the 2.6-branch of vserver is :declared stable.

A. Requirements

  1. What do I need to get started?
    • The Fedora Core 1 CD Set ( 3 CDs )
    • Internet connection for updates and kernel-download
    • a spare computer to install on
  2. Do I have to use a blank computer?
    • This howto assumes you have a blank (read: nothing installed) computer. Vserver doesn't require that of course, but for the the sake of a stable and clean system, it is a requirement of this howto.
  3. Do I have to have multiple offical IP Addresses?
    • Short Answer: Yes
    • Long Answer: No, for a start they can be private and you can use Destination-Nat (man iptables) to make services on a vserver available to the outside world. This is not recommended though.

B. Host installation

  1. Fedora Core installation
    It's assumed that you know how to do a basic setup of Fedora Core in general, thus only a few things required/recommended for a vserver system are listed here
    • Do a minimalistic install - you don't want to use the host server for anything but beeing host
    • If you want to use reiserfs, pass the option "reiserfs" on the fedora boot prompt (warning: ext3 is recommended for the vserver. If you want to use reiserfs with vserver, you have to mount your reiserfs partitions with the "attrs" mount option, or you won't get all the securities of vserver)
    • You'll have to build your own kernel, thus installing the kernel-development group is a good idea
    • Vserver are installed in /vserver, so it might be a good idea to create a seperate partition for them ( make it big enough!! >8 GB for a full install )
    Besides these hints, do a normal install of Fedora Core 1 on your system.
  2. Fedora Core update
    Since Core 1 is out for quite some time now, many packages have been updated. To get your system updated, we're going to use 'yum'. The default setup uses the redhat.com main server in the US, so it's going to be slow ;) You can either choose a [local mirror] with a better performance and/or go to [frehsrpms.net] and get the yum supplied by freshrpms. Besides beeing a very fast system, freshrpms has a lot of other goodies, so you might really want to try it if you don't already use it.
  3. New vserver enabled kernel
    The Fedora default Kernel is highly patched already and thus might not be compatible with the patches supplied by linux-vserver.org. For this reason, we are going to use a vanialla-kernel (read: an unmodified original linux kernel) from kernel.org. If you do require a patch supplied by redhat/fedora this howto doesn't work for you, please check the contact page for ways to contact us, maybe someone can help you out.
    • Ftp to a local kernel.org mirror ( usually the url ftp://ftp.<country-code>.kernel.org should work, e.g. ftp.de.kernel.org for germany)
    • Go to /pub/linux/kernel/v2.4/
    • Get the latest linux-2.4.??.tar.bz2 ( where ?? is the kernel subversion, by the time of this writing, the latest is 28)
    • Get the matching .sign file
    Once both files are downloaded, verify the pgp signature of the archive:
    • Add the linux kernel OpenPGP? signature to your local gpg by running gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E
    • Now verify the kernel: gpg --verify linux-2.4.??.tar.bz2.sign linux-2.4.??.tar.bz2 ( for more details about this, visit [Kernel.org])
    move the kernel archive to /usr/src (mv linux-2.4.??.tar.bz2 /usr/src/) and unpack it (tar -xjf linux-2.4.??.tar.bz2)
    The vanilla kernel is ready, let's get the patch:
    • Donwload [the Patchset] now ( by the time of this writing, the latest stable version is 1.29)
    • Extract it in /usr/src and run patch ( patch -p0 < patch-2.4.??-vs1.29.diff ) from within /usr/src
    • Now enter the linux-2.4.?? source directory and run make menuconfig. You need to make sure all the reliquired vserver options are enabled, besides that, build a kernel as usual. ( on help how to build a custom kernel, please google ;) )
  4. Using the vserver kernel
    Before you can make use of the kernel, we need to do some minor modifications to the /etc/fstab and the lilo.conf/grub.conf. Redhat/Fedora uses LABEL for partitions, which is good idea but requires a kernel patch we don't have. For our kernel to work, the real device needs to be defined, thus the fstab needs to be changed. Depending on your setup, this can be only / or some more. To find out, which partitions is what, do a simple mount to get a list of mounted devices and compare them with the labled locations in the /etc/fstab. For example if / is mounted on /dev/hda1, you'll have to modify LABEL=/ to be /dev/hda1. Do the same for the kernel options (root=...) in lilo.conf or grub.conf, depending on your bootloader. Do not use the vserver only. Keep a working backup-kernel ready so you know you can reboot to a working system neverthe less.
    Reboot :)
    If you didn't break your kernel setup and i didn't loose you on the way to this line, you should have a vserver enabled kernel ready by now.
  5. Vserver utils
    A vserver enabled kernel might be nice, but its pretty pointless unless you have some tools to make use of its functionality.
    • Download [util-vserver](v0.30)
    • Run rpmbuild on it (rpmbuild -tb util-vserver-0.30.tar.bz2) (if you don't have rpmbuild installed do yum install rpm-build)
    • Install the compiled package (rpm -ihv /usr/src/redhat/RPMS/i386/util-vserver-0.30-0.i386.rpm)
    • In case you want to use the linuxconf tui version, install the 2nd package, too - we won't need it for this howto
  6. Getting Fedora Support into Vserver utils
    • To install a vserver you now need the first Fedora Core 1 CD again mounted to /mnt/cdrom (you can mount the iso, too)

C. VServer creation

  1. Build a new vserver
    The first step is to build a basic new server. Using the install-script from the util-vserver package, you can create a very basic server (using the minimum filelist) or a full install of CD 1:
    • A minimum vserver named "test": cd /usr/lib/util-vserver && ./install-fc1 test minimum
    • A full CD1 install vserver: cd /usr/lib/util-vserver && ./install-fc1 test
    The installer script will create a new vserver with the give name in /vservers and the appropiate config and startup files in /etc/vservers
    • For the vserver to work standalone with a real ip, you need to modify the <servername>.conf file in /etc/vservers to suit your needs
    • If you want your vserver to come up at boot time, set ONBOOT=yes ( you need to enable the vservers service on your host for that to work, too! - run ntsysv to enable it)
    • Disable all unwanted services on the hostserver while you're at it. We don't need xinetd or sendmail in daemon mode...
  2. Enter the new vserver
    Once the vserver has been created, you can use it. Usually you want at least syslog and cron to run, so we need to configure that.
    • Enter the vserver (vserver test enter) and run ntsysv again - now in the vserver - to select the services (at least syslog and cron a recommended)
    • Leave the vserver and try to run in standalone: vserver test start
    • You should see the usual booting messages of starting services along with some vserver specific notes
    • To verify that your vserver is up and running, you can call vserver-stat

D. VServer updates

Since the vserver creation has been run from the original CD, the installed packages are pretty much out of date and should be updated as we already did for the host server.
To avoid downloading all the packages again and again, we're going to run yum from the host to update the vserver with a special parameter:
  • yum --installroot=/vservers/test update
This will run the update process based on the rpm-database within the vserver while using the packages already downloaded for the host as source.

Congratulations - You're done ;)