Travel Solo But Never Alone
Find the right memory at MemorySuppliers.com!

Change download mirror for Fedora when using jigdoChange download mirror for Fedora when using jigdo

Posted May 13th, 2008 in Linux/Unix/BSD

With the release of Fedora 9 I have discovered that Fedora CD and DVD ISO images can be updated using jigdo like Debian and Ubuntu can. (I have posted about jigdo in the past, including how to use jigdo-lite, create CDs from a DVD with jigdo, and create multiple ISO images with jigo-lite). When creating the new images, the Fedora jigdo settings use download.fedoraproject.org to get the files; this server automatically redirects you to a geo-targeted local mirror. If for some reason you need to specify a particular server, or a local repository instead, it is possible by editing the .jigdo file. This post looks at how to do this.

In order to do this we need to download the jigdo file first and make a change to it. It is just a text file so you can edit it using your favourite text editor. The examples used in this post use the x86_64 DVD, but simply adjust the filenames and locations to the correct platform and CD/DVD.

Download it like so:

wget http://download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/x86_64/jigdo/Fedora-9-x86_64-DVD.jigdo

The file by default will look like this:

# JigsawDownload
# See <http://atterer.net/jigdo/> for details about jigdo

[Jigdo]
Version=1.2
Generator=jigdo-file/0.7.3

[Image]
Filename=Fedora-9-x86_64-DVD.iso
Template=http://download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/x86_64/jigdo/Fedora-9-x86_64-DVD.template
Template-MD5Sum=hD_kYaNbC6PS2PDqgaKJ0w

[Servers]
Base-x86_64=http://download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/x86_64/os/

[Mirrorlists]
Base-x86_64=http://mirrors.fedoraproject.org/mirrorlist?path=pub/fedora/linux/releases/9/Fedora/x86_64/os/

...

The [Servers] section is where you need to modify the path to the server you wish to use. For example, of you wanted to use ftp.example.com (a made up example), you would change it to:

[Servers]
Base-x86_64=ftp://ftp.example.com/pub/fedora/linux/releases/9/Fedora/x86_64/os/

The exact path the mirror uses might be different so you need to make sure you get the first part right. It should normally always end in releases/9/Fedora/[platform]/os/ where [platform] is your chosen platform: x86_64, i386, source or ppc.

If you already have a copy of all the files on a local filesystem, then you can use those instead. If they were stored at e.g. /path/to/fedora/x86_64/os/ then you change it like so:

[Servers]
Base-x86_64=file://path/to/fedora/x86_64/os/

Please note that the path, whether it is local or remote, must contain a trailing / in order to work.

Once you have made your changes, save the file and exit your text editor. You should then be able to run jigdo-lite to create new Fedora ISO images using your specified mirror or local files.