SDB:How To Create a Patch CD

From openSUSE


Version: 9.1 -

Contents

Situation

You want to create a Patch CD so you can distribute updates for SUSE LINUX to other machines possibly because they have slow or non-existent Internet connections.

Procedure

These instructions are targeted for experienced users.

Prerequisite: A specific directory tree is required for the CD:

<ARCHITECTURE>/update/<VERSION>

For example, if you use the i386 architecture and SUSE LINUX 9.2., the CD must feature the following directory tree:

i386/update/9.2

In order to create a Patch CD, you can simply redistribute the updates downloaded via YaST Online Update. This only works if the available patches are complete and you have not removed the sources after previous updates.

In this example, the patches are located at:

/var/lib/YaST2/you/mnt/i386/update/9.2

As you can see, the necessary directory tree is already available, thus enabling you to easily create a CD. Create the CD in such a way that the directory i386 is located in the CD's root directory. You can create the CD with the burning program k3b. For further information on k3b, refer to the User Guide.

In case you prefer to burn the CD from the command line, use the following command to create a CD image:

cd /var/lib/YaST2/you/
mkisofs -v -r -J -V "SuSE Update CD" -o /tmp/image.img mnt/

and the following one to write the generated image to a CD:

cdrecord -v -eject dev=/dev/hdc driveropts=burnproof /tmp/image.img

You might have to adjust the parameter dev=/dev/hdc according to the actual burner device on your system. Use the command cdrecord -scanbus to find out the device label for SCSI or USB burners. See also man cdrecord.

Refer to the "Update Installation" section further below for information on how to install the updates.

A Patch CD created according to these instructions can only be used in machines where the same SUSE LINUX version is installed.

Alternative Approach

Create the required directory tree e.g. by way of the following command under Linux:

mkdir -p /tmp/CDroot/i386/update/

Search for a server enabling mirroring (not ftp.suse.com). Read the server mirroring policy carefully. Change to the update directory on the FTP server. For example:

ftp://ftp.gwdg.de/pub/linux/suse/ftp.suse.com/suse/i386/update/

Download the update directory corresponding to your SUSE version and save it to the directory you have created. You can skip:

  • the directory "src/"
  • packages ending with "*.i586.rpm"

The kernel packages ("kernel-{default, bigsmp, smp, syms}*") must be downloaded.

You can use an FTP client or a browser to download the packages. We recommend you to use the synchronization tool rsync under Linux. Unfortunately, the use of this tool is not supported by all SUSE mirrors.

The command:

rsync -rltuzv --stats --progress --delete --delete-excluded \
 	--include "kernel-default*.i586.rpm" \
 	--include "kernel-smp*.i586.rpm" \
 	--include "kernel-source*.i586.rpm" \
 	--include "kernel-syms*.i586.rpm" \
 	--include "kernel-um*.i586.rpm" \
 	--exclude "*.i586.rpm" \
 	--exclude "src/" \
 	--exclude "x86_64/" \
 	--exclude "*.x86_64.delta.rpm" \
 	ftp.gwdg.de::pub/linux/suse/ftp.suse.com/suse/i386/update/9.2 /tmp/CDroot/i386/update/

saves all the required updates to the directory /tmp/CDroot/i386/update/. Unnecessary packages are skipped like e.g. packages for AMD 64 systems in this case. If you do require these packages, remove the "exclude" lines from the example above.(Hint: If you want to update your Patch CD in the future, simply execute the command above again. rsync will only download the new/changed files.)

Use a burning program of your choice (e.g k3b) to create the CD in such a way that the directory i386 is located in the CD's root directory. If you prefer to burn the CD from the command line, use the following command to create a CD image:

mkisofs -v -r -J -V "SuSE Update CD" -o /tmp/image.img /tmp/CDroot/

Burn the created image on a CD:

cdrecord -v -eject dev=/dev/hdc driveropts=burnproof /tmp/image.img

(Do not forget to adjust the burner device if necessary).


Notes added 2006-08-12:

For 32 bit x86 systems it is also useful to exclude ppc and ppc64 directories:

 	--exclude "ppc/" \
 	--exclude "ppc64/" \

openSuSE 10.1 is in a slightly different location, also gwdg advise using server ftp-1, so the source path becomes:

	ftp-1.gwdg.de::pub/suse/update/10.1

Update Installation

Insert the created Patch CD in the CD drive, start YaST2, and select:

  • Software --> Patch CD Update

Follow YaST's instructions to install the updates from the CD.