Local mirror of the latest Skolelinux CD-ROM
There are only small changes between the different CD images, so it makes
little sense to download the entire image for each version of the Skolelinux-CD,
as it is wastfull of both time and bandwidth.
To create a local mirror, you need to have rsync installed.
If you don't, become the root user, and install it, by executing the
following commands:
su -
apt-get install rsync
To start with, we only want to download the CD ISO file. To do this, we execute the
following command(where XX is the version of the CD you want to download):
rsync rsync.skolelinux.no::skolelinux-cd/skolelinux-i386-prXX.iso /var/tmp/skolelinux-i386.iso
/var/tmp/skolelinux-i386.iso is the name you want to use for the file locally.
rsync will try to compare the file on the server with any file with the same name
you may have locally.
To find which versions are available, execute the following command:
rsync rsync.skolelinux.no::skolelinux-cd
This should give a listing that looks something like this:
tommy@dell-laptop:~$ rsync rsync.skolelinux.no::skolelinux-cd
drwxr-xr-x 4096 2003/05/10 19:42:33 .
-rw-r--r-- 1357 2003/05/10 19:42:33 MD5SUM
-rw-r--r-- 654532159 2003/01/21 12:17:49 skolelinux-i386-pr1.raw.gz
-rw-r--r-- 633968583 2003/01/21 13:14:09 skolelinux-i386-pr10.iso.gz
-rw-r--r-- 639065991 2003/01/21 13:21:35 skolelinux-i386-pr11.iso.gz
........
-rw-r--r-- 649742605 2002/12/16 00:45:32 skolelinux-i386-pr33.iso.gz
-rw-r--r-- 680427520 2003/01/21 17:09:06 skolelinux-i386-pr34.iso
-rw-r--r-- 682000384 2003/02/04 23:26:47 skolelinux-i386-pr35.iso
-rw-r--r-- 680132608 2003/03/04 00:47:06 skolelinux-i386-pr36.iso
-rw-r--r-- 680656896 2003/03/14 21:08:21 skolelinux-i386-pr37.iso
-rw-r--r-- 680329216 2003/05/10 19:42:29 skolelinux-i386-pr38.iso
tommy@dell-laptop:~$
From this, we can see that the latest version is pr38(Pre-Release).
Assuming your local copy of the CD is older than version 38, you can
get your local copy up to date by writing:
rsync rsync.skolelinux.no::skolelinux-cd/skolelinux-i386-pr38.iso /var/tmp/skolelinux-i386.iso
To streamline this process, we can create a small script that will help keep
our local copy of the CD up to date. This script will ensure that
rsync does not try to transfer the entire file, but only downloads
what is necessary to update the local copy you have.
Furthermore, we want to avoid rsync consuming all our bandwidth.
We therefor specify how many Kilobytes per seconds(KB/s) the transmission
should use. One Kilobyte is 8192bits. A 1Mbit connection equals approx 122 Kilobytes.
The example uses approx. 1/4 of the total bandwidth.
The script can be placed in /usr/local/sbin, and you can f.ex call it
skolelinux.rsync. The script takes one parameter, the filename of the
version you want to download.
#!/bin/bash
LOCALIMAGE=/var/tmp/skolelinux.iso
FILENAME=$1
REMOTEIMAGE=rsync.skolelinux.no::skolelinux-cd/$FILENAME
BANDWIDTH=32
# Check rsync exists
test -x /usr/bin/rsync || exit 0
# Check if a local image exists, or emit a warning
if [ ! -e $LOCALIMAGE ]; then
echo "Warning: No local Skolelinux CD-image available in the specified location."
echo "Downloading the entire CD."
fi
rsync \
--no-whole-file \
--bwlimit=$BANDWIDTH \
$REMOTEIMAGE $LOCALIMAGE || exit 1
Make sure the script is runnable, by executing:
chmod +x skolelinux.rsync
Now, to update you local image, all you have to do is:
skolelinux.rsync skolelinux-i386-pr38.iso
Local mirror of daily development version of the Skolelinux CD-ROM
If you are interested in testing the daily builds of the development CDs,
exchange skolelinux-cd with skolelinux in the commands listed above.
By executing the following command:
rsync rsync.skolelinux.no::skolelinux
you will get a result approx. like this:
klaus@kreta:~$ rsync rsync.skolelinux.no::skolelinux
drwxr-xr-x 4096 2002/08/11 10:33:00 .
-rw-r--r-- 408 2002/08/11 10:34:31 MD5SUMS
-rw-r--r-- 679641088 2002/08/11 10:27:12 woody-i386-1.raw
-rw-r--r-- 679837696 2002/08/11 10:27:53 woody-i386-2.raw
-rw-r--r-- 683999232 2002/08/11 10:28:51 woody-i386-3.raw
-rw-r--r-- 675840000 2002/08/11 10:29:37 woody-i386-4.raw
-rw-r--r-- 679936000 2002/08/11 10:31:31 woody-i386-5.raw
-rw-r--r-- 675020800 2002/08/11 10:32:11 woody-i386-6.raw
-rw-r--r-- 680165376 2002/08/11 10:32:56 woody-i386-7.raw
-rw-r--r-- 76120064 2002/08/11 10:33:07 woody-i386-8.raw
klaus@kreta:~$
The woody-i386-1.raw is the forerunner for the stable versions of the
Skolelinux CD. This file is updated every 4 hours, and can be downloaded from
ftp.skolelinux.no/debian-cd. It can also be downloaded using
rsync if you already have a skolelinux-i386-prXX.iso
file on your harddrive.
The first thing you need to do, is to rename the file to woody-i386-1.raw
with this command:
mv skolelinux-i386-prXX.iso woody-i386-1.raw
To stay up to date, you can use the commands and the script described above. You must
remember to use woody-i386-1.raw instead of skolelinux-i386-pr38.iso
Warning: these CDs are meant for developers, and will often have problems and, may not
work at all.
A useful command is man rsync.
Lars Bahner