m (→Updates from the Tree: : Make clear that the name must be exactly updates.img (often distributed in form updates*img)) |
(→Updates from the Tree: only stage2 location is searched, per https://bugzilla.redhat.com/show_bug.cgi?id=1170623) |
||
Line 46: | Line 46: | ||
For NFS installs, there are two options. You can either put the image in <code>images/</code> as above or explode the image into the <code>RHupdates/</code> directory in your installation tree. | For NFS installs, there are two options. You can either put the image in <code>images/</code> as above or explode the image into the <code>RHupdates/</code> directory in your installation tree. | ||
This <code>updates.img</code> is only retrieved from the location where stage2 image is pulled from. If you use [[Anaconda_Boot_Options#repo|inst.repo]] boot option to specify your installation tree, but you also use [[Anaconda_Boot_Options#stage2|inst.stage2]] boot option with a different location, only the <code>inst.stage2</code> location is going to be searched for the <code>updates.img</code> file, and not the <code>inst.repo</code> location. | |||
{{Anchor|create-images}} | {{Anchor|create-images}} |
Revision as of 09:21, 8 December 2014
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. It must have exactly the name updates.img
, even if you received it with a different name.
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.
This updates.img
is only retrieved from the location where stage2 image is pulled from. If you use inst.repo boot option to specify your installation tree, but you also use inst.stage2 boot option with a different location, only the inst.stage2
location is going to be searched for the updates.img
file, and not the inst.repo
location.
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. anaconda supports two formats: an ext2 filesystem image and the more common gzip-compressed cpio archive. The automatic tools shipped with anaconda deal in the second form, so that's what will be discussed here.
The easiest way to create an image is to run
./configure make updates
from the anaconda source tree. This will package up all the changes to the tree since the last release and create a file named "updates.img" in the top of the tree. Remember to use the correct git branch for the Fedora release you are working on or testing. If you need finer control over this process (like creating an image from an even older release), or you don't want to run ./configure first (the make command will fail unless ./configure has been run), run
scripts/makeupdates
by hand. The help screen documents the several options that can be used.
An updates.img
can include more than just files from anaconda, though. It can also include shared libraries, graphics, other python modules, and certain data files used by anaconda. To add files to an existing image (or create an entirely new one), just do the following:
scripts/upd-updates updates.img file1 file2 ...
Note that the placement of files in an image is a little picky. For instance, python modules must be in their proper subdirectory mirroring the layout of /usr/lib/python?.?/site-packages/
.
How to Examine an Anaconda Updates Image
updates.img
files provided by the Fedora project and generated by the makeupdates script 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