4. Downloading Your First Image (In 5 Easy Steps)

We'll assume that you're starting from scratch and don't have any Debian ISOs on hand. Once you burn your set of ISOs, you can use jigdo-lite later to update them. We'll cover updating your ISOs in the next section.

4.1. Install Jigdo

First install the jigdo-file package:

      # apt-get install jigdo-file
      

Jigdo is under aggressive development. Bug fixes and enhancements are constant, so if you're using stable or testing, download jigdo-file from unstable at http://packages.debian.org/unstable/utils/jigdo-file.html. As of 28 Nov 2005 it's at version 0.7.2-2.

4.2. Download The .template And .jigdo Files

For each ISO image you want to download, you'll need both the .jigdo and .template file for that image. Both files follow the same naming convention:

      distro-arch-n.jigdo
      distro-arch-n.template
      

where distro is the name of the distro (like "sarge"), arch is the architecture (like "i386") and n is the disk number (like "1").

For example, sarge has 8 images, so you need to download 8 .jigdo files and 8 .template files. They can be downloaded from http://www.debian.org/CD/jigdo-cd/. The first .jigdo and .template file are named sarge-i386-1.jigdo and sarge-i386-1.template respectively.

4.3. Run jigdo-lite

Run jigdo-lite and give it the .jigdo file of the image you want to download. Using Sarge as an example:

      lucifer$ ls
      sarge-i386-1.jigdo  sarge-i386-1.template
      lucifer$ jigdo-lite sarge-i386-1.jigdo 
      
      Jigsaw Download "lite"
      Copyright 2001-2003 by Richard Atterer <jigdo@atterer.net>
      Getting mirror information from /etc/apt/sources.list
      
      -----------------------------------------------------------------
      Images offered by `sarge-i386-1.jigdo':
        1: 'Debian GNU/Linux testing "Sarge"
               - Official Snapshot i386 Binary-1 CD' (sarge-i386-1.iso)
      
      Further information about `sarge-i386-1.iso':
      Generated on Fri, 7 Feb 2003 20:31:28 -0700
      
      -----------------------------------------------------------------
      If you already have a previous version of the CD you are
      downloading, jigdo can re-use files on the old CD that are also
      present in the new image, and you do not need to download them
      again. Mount the old CD ROM and enter the path it is mounted under
      (e.g. `/mnt/cdrom').
      Alternatively, just press enter if you want to start downloading
      the remaining files.
      Files to scan:
      

If you suspended jigdo-lite with control+z (don't do this; I'll tell you what you'd see) and looked at the output of ls, you'd find a new file in the directory named sarge-i386-1.jigdo.unpacked. It turns out that .jigdo files are gzip'ed. This file is simply a gunzip'ed version of the .jigdo file.

Right now, jigdo-lite is telling us that if we have an outdated version of first CD of sarge, we should give the pathname to the CD. This is how you update your ISO images (or complete your incomplete downloads). Since we're assuming that you're starting from scratch and have no Debian ISOs yet, we have nothing to scan. We'll cover this in Section 5, so just press ENTER.

See also Section 7.2, "More About Scan Sources".

4.4. Specify A Mirror

You'll see:

      -----------------------------------------------------------------
      The jigdo file refers to files stored on Debian mirrors. Please
      choose a Debian mirror as follows: Either enter a complete URL
      pointing to a mirror (in the form
      `ftp://ftp.debian.org/debian/'), or enter any regular expression
      for searching through the list of mirrors: Try a two-letter
      country code such as `de', or a country name like `United
      States', or a server name like `sunsite'.
      Debian mirror [http://linux.csua.berkeley.edu/debian/]: 
			

By default, jigdo-lite pulls the mirror from your /etc/apt/sources.list. If you want to use a different mirror, you would specify a different mirror here. If this is the mirror you want to use, press ENTER. Jigdo-lite will then write a .jigdo-lite file in your home directory.

Next, if the .jigdo file you're using references a package which needs to be downloaded from a Non-US server, jigdo-lite will prompt you for a Debian Non-US mirror. The message displayed (and your response) will be very similar to the mirror dialog in the previous paragraph.

      -----------------------------------------------------------------
      The jigdo file also refers to the Non-US section of the Debian
      archive. Please repeat the mirror selection for Non-US. Do not
      simply copy the URL you entered above; this does not work because
      the path on the servers differs!
      Debian non-US mirror [http://linux.csua.berkeley.edu/debian-non-US//]: 
			

Jigdo-lite will write your choice to ~/.jigdo-lite. However, if the image you're about to download doesn't contain Non-US software you won't see this dialog.

If you want to change the default mirrors you use with jigdo at any time in the future, you can modify these two lines in ~/.jigdo-lite:

      debianMirror='http://some-mirror-to-use/debian/'
      nonusMirror='http://some-other-mirror/debian-non-US/'
      

4.5. Downloading Of The ISO

After you specify the mirror(s), jigdo-lite will begin downloading files to assemble the ISO image:

      Not downloading .template file - `sarge-i386-1.template' already present
      
      -----------------------------------------------------------------
      Merging parts from `file:' URIs, if any...
      Found 0 of the 826 files required by the template
      Will not create image or temporary file - try again with different input files
      --09:35:12--  http://mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
          => `sarge-i386-1.iso.tmpdir/mirror/debian/pool/main/p/pack/pack_3.10-1_i386.deb
      Resolving linux.csua.berkeley.edu... done.
      Connecting to linux.csua.berkeley.edu[128.32.112.231]:80... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 1,911,624 [application/x-debian-package]
      
      19% [======>                              ] 378,304      149.87K/s    ETA 00:09
      

There'll be a lot of messages flying across your screen; if this is confusing to you, see Section 6.13. While jigdo-lite is downloading the packages, switch to another console (or open another xterm) and do an ls in the directory you're running jigdo-lite in. Now there should be 6 files in the directory:

The sarge-i386-1.iso.tmpdir/ directory contains all the Debian packages that jigdo-lite downloads. Every so often, the directory gets flushed and the files get written to sarge-i386-1.iso.tmp, which is an temporarily incomplete version of the ISO image you want. Note that sarge-i386-1.iso.tmp won't appear until the first time sarge-i386-1.iso.tmpdir/ gets flushed.

jigdo-file-cache.db is a Berekeley DB file containing md5sums of any files read in when you specify a directory at the Files to scan: prompt. It's described in Section 7.3.

At this point, go play some Quake III because this will take some time (you may want to play on a different machine because jigdo is very disk intensive when it flushes files to the .iso.tmp file). At some point, the download will finish and you'll be staring at:

      FINISHED --13:32:58--
      Downloaded: 7,469,872 bytes in 9 files
      Found 9 of the 9 files required by the template                              
      Successfully created `sarge-i386-3.raw'
      
      -----------------------------------------------------------------
      Finished!
      The fact that you got this far is a strong indication that `sarge-i386-3.raw'
      was generated correctly. I will perform an additional, final check,
      which you can interrupt safely with Ctrl-C if you do not want to wait.
      
      OK: Checksums match, image is good!