Anaconda/Updates

From FedoraProject

< Anaconda(Difference between revisions)
Jump to: navigation, search
(Updates types)
(How to Examine an Anaconda Updates Image)
Line 71: Line 71:
 
== How to Examine an Anaconda Updates Image ==
 
== How to Examine an Anaconda Updates Image ==
  
updates.img files provided by the Fedora project are ext2 filesystem images.  To examine one of these files complete the following steps:
+
<code>updates.img</code> files provided by the Fedora project are compressed cpio archives.  To examine one of these files, use <code>/sbin/lsinitrd</code>.
  
# Obtain an <code>updates.image</code>: <pre> wget http://people.redhat.com/~katzj/updates-f7t2.img</pre>
+
To explode one, do the following:
# Decide whether it is ext2 filesystem image or gzip compressed cpio archive: <pre> file updates-f7t2.img</pre>
+
  
To examine an ext2 filesystem image:
+
<pre>$ mkdir dest
 
+
$ cd dest
# Mount the file using looopback: <pre>mount -o loop updates-f7t2.img /misc</pre>
+
$ gunzip -dc /path/to/updates.img | cpio -id
 
+
</pre>
To examine a cpio archive image:
+
 
+
# create a top level directory to hold the updates.img contents: <pre> mkdir /tmp/updates</pre>
+
# unpack the updates into the directory: <pre> zcat updates.img | (cd /tmp/updates ; cpio -ivd) </pre>
+
  
 
----
 
----
 
[[Category:Anaconda]]
 
[[Category:Anaconda]]

Revision as of 15:17, 13 September 2010

Contents

Anaconda Updates

anaconda has the capability to incorporate updates at runtime to fix any bugs or issues with the installer. These updates are generally distributed as a disk image file (referred to as updates.img from here on out). The updates.img can be used in a few different ways.


Updates types

There are a number of sources for the updates.

Updates from the Network

The easiest and most popular way to use an update.img is via the network. This is how almost all updates images you'll see in bug reports and mailing lists are distributed. This does not require you modify your installation tree at all.

To use this method, simply boot with:

 linux updates=http://some.website.com/path/to/updates.img

If you have multiple network interfaces, anaconda will first prompt you to select one (unless you have used the ksdevice= boot parameter). It will then attempt to configure this link using DHCP. If you require other networking configuration, you will need to use various options. ksdevice= can be used to specify a different network device, and the ip= option (along with others for gateway, nameserver, and so forth) can be used for static configuration. All anaconda config options are described elsewhere .

If you are making your own updates.img, just upload it to a web server you have access to and pass the location as above.

Updates from a disk image

You can also put an updates.img on a block device (either a floppy or a USB key). This can be done only with an ext2 filesystem type of updates.img. For a floppy drive, insert your floppy and then run

 dd if=updates.img of=/dev/fd0 bs=72k count=20

to put the contents of the image on your floppy. Then, boot the installer with

 linux updates

and you will be prompted to provide the location of your update disk.

You can also use a USB key or flash media -- just replace /dev/fd0 with the device that your USB key is at.

Updates from the Tree

If you're doing a CD, hard drive, HTTP, or FTP install you can also put the updates.img in your tree to be picked up by all installs automatically. Put the file in the images/ directory.

For NFS installs, there are two options. You can either put the image in images/ as above or explode the image into the RHupdates/ directory in your installation tree.

How to Create an Anaconda Updates Image

If you are working on anaconda or looking at a bug and want to test your own bug fixes, it's easy to create your own updates.img file. There are two formats for the updates.img file. The first, and most common, is an ext2 filesystem. The second is a gzip-compressed cpio archive.

Just do the following steps.

ext2 filesystem image

This is the more traditional form of an updates.img and is required for older releases of anaconda. It is needed if you want to transfer it to a block device (floppy, usb disk, etc). Note that this requires root privileges.

  1. Create a 1.44MB updates.img image
    dd if=/dev/zero of=updates.img bs=1k count=1440
  2. Format as an ext2 filesystem
    mke2fs updates.img 
  3. Mount the image
    mount -o loop updates.img /mnt 
  4. Drop updated anaconda python files in a flat directory structure
  5. Unmount the updates.img
    umount /mnt

Compressed cpio archive

This is the newer form of an updates.img and is likely preferred in most cases with current releases of anaconda. In contrast to the above, this does not require root privileges. If can be used only with updates=http:// or updates=ftp:// anaconda boot option.

  • Drop updated anaconda files in a flat directory structure, eg: /tmp/updates
     (cd /tmp/updates ; find -type f | cpio -c -o) | gzip -c9 > updates.img 

How to Examine an Anaconda Updates Image

updates.img files provided by the Fedora project are compressed cpio archives. To examine one of these files, use /sbin/lsinitrd.

To explode one, do the following:

$ mkdir dest
$ cd dest
$ gunzip -dc /path/to/updates.img | cpio -id