From Fedora Project Wiki

< Anaconda‎ | Updates

Revision as of 21:15, 24 March 2010 by Kruvalig (talk | contribs) (Created page with '{{Draft}} <!-- page was renamed from Anaconda/UpdatesImage --> = Обновления Anaconda = У программы anaconda существует возможность вк...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Обновления Anaconda

У программы anaconda существует возможность включить обновления для исправления ошибок установщика. Эти обновления обычно распространяются как файл-образ (здесь и ниже по тексту называющийся updates.img). updates.img можно использовать одним из следующих способов.


Виды обновления

Существует ряд способов There are a number of sources for the updates.

Обновление с образа диска

Самым распространенным способом использования updates.img состоит в том что бы подключить его как block устройство (either a floppy or a USB key). Для гибкого магнитного диска, вставьте флоппи-иск и затем выполните команду

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

для того чтобы записать содержимое образа на диск. Затем загрузите программу установки с помощью

 linux updates

, вам будет задан вопрос о метонахождении диска обновлений.

Вы также можете использовать USB key или флешь накопитель -- просто замените /dev/fd0 на имя USB устройства.


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 from that tree. For Fedora Core 6 and later, put the file in as images/updates.img in your Fedora installation tree. Earlier releases look in Fedora/base/updates.img.

NFS installs, however, look for the exploded contents of the updates.img in the RHupdates directory in your Fedora installation tree.

Updates from the Network

If you're doing a network install and cannot modify your installation tree, you can place an updates.img in another location and boot with

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

to load the updates.img from a remote web server.

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 .

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 a gzip-compressed ext2 filesystem. The second is a gzip-compressed cpio archive.

Just do the following steps.

Compressed ext2 filesystem image

This is the more traditional form of an updates.img and is required for older releases of anaconda. It is also slightly more preferred if you are going to transfer the updates image to a floppy disk. 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.

  • 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 ext3 filesystem images. To examine one of these files complete the following steps:

  1. Obtain an updates.image:
     wget http://people.redhat.com/~katzj/updates-f7t2.img
  2. Mount the file using looopback:
    mount -o loop updates-f7t2.img /misc

To examine a cpio updates.img complete the following steps:

  1. create a top level directory to hold the updates.img contents:
     mkdir /tmp/updates
  2. unpack the updates into the directory:
     zcat updates.img | (cd /tmp/updates ; cpio -ivd)