AutoYast2: SLES8 - Automatic Linux Installation and Configuration with YaST2 | ||
---|---|---|
<<< Previous | Next >>> |
UnitedLinux defines a core set of packages which implement the UnitedLinux runtime environment. All tests, certifications, and applications are based on this set of packages which should not be altered in any way. The ideal way to guarantee unaltered data, is providing it on CD-ROM.
However, this makes including (vendor specific) extensions and bug-fixes on the same media impossible. A separate media must be supplied for installation.
The 'multiple source' approach of YaST gives a solution as it allows installation from several (package) sources. So a customer can start installing from the original UnitedLinux CDs, proceed with a product CD, and end with a patch CD containing the latest security patches.
When starting the installation from a media (CD, DVD, NFS, ...), linuxrc looks for a /boot/root file containing a complete (cramfs based) root-fs for YaST.
Usually, this file is on the boot CD, but other installation types are also supported by linuxrc. The information, where the /boot/root file came from, is passed to YaST and defines the installer source.
YaST now looks at this installer source for a /yast/order file. If this file exists, YaST goes into the 'multiple installation' mode.
In this mode, the source description (information about the packages) is on the installer source and the source data (the rpm packages itself) is on separate media.
If the order file does not exist, YaST does not separate the source description from the source data and both must reside on the same media. (The latter is what happens if you boot the first UnitedLinux CD.)
The order file defines which sources are needed for installation and their priority for installation. A typical example for an order file is given here:
# yast/order: priority of installation sources # # source- product # description path /yast/sles8 /sles8-i386/CD1 /yast/ul /unitedlinux-i386/CD1 / / |
The order file is ASCII, line based, '#' at the beginning of a line denote a comment line.
Each non-comment line should contain two (tab separated) directory specifications. If the second one is omitted, it defaults to "/".
The first directory specifies the location of the description. The second directory specifies the location of the product as defined here. For CD/DVD bases products, this is usually "/". But for network installations, or if several product are placed on a single CD, each product needs a separate path. You can even specify a full URL (e.g. "nfs://my-nfs-server.domain.org/product/CD1") in the second column. During installation, you can't switch the type of media. If your installer source is CD, every other source must be CD based. If your installer source is NFS, every other source is expected to be on the same NFS server.
In the above example of the order file, note the last line being "/". This means the last of the three installation sources is on the same media as the installer.
As stated above, the /yast/order file lists the sources in priority order. So a package from a source listed earlier in this file overrides a package (of the same name) from a later source. This technique is used to override the yast2-translation packages from unitedlinux-i386 (where all help texts refer to UnitedLinux) with yast2-translation packages from sles8-i386 (where all help texts refer to SuSE Linux).
But the /yast/order also defines the installation order, which might not be wanted when the 'base' packages are on a lower-priority source This is where /yast/instorder comes into play. This defines the installation order by repeating the entries of the first column of /yast/order in the right order.
A typical example for an instorder file is given here:
# yast/instorder: order of installation sources # # install 'ul' before 'sles8' # /yast/ul /yast/sles8 / |
Combining multiple sources requires that all sources comply to the UnitedLinux media description standard.
On the installer source create a yast/order as described above and copy the description data of all sources to separate directories. List these directories in the order file and check for conflicting package (.rpm) or selection (.sel) names.
If names conflict, the name coming 'first' in the order file wins.
In the 'order' example above, the 'order' directory structure looks as follows:
yast/ instorder # instorder file order # order file ul/ # product 'ul', placing it below yast isn't really needed # but practical. media.1/ media # media ID for first CD content # content file, describing the paths UnitedLinux/ setup/ descr/ *.sel packages packages.DU packages.en packages.de ... packages.pt sles8/ media.1/ media content suse/ setup/ descr/ *.sel packages packages.DU packages.en packages.de ... packages.pt |
YaST now takes this description instead of the one from the 'real' media for the installation. So when asking for a specific media, this media must match the media.1/media file from the order directory.
All dependencies (package or selection) are fulfilled by looking at all installation sources. If multiple sources provide a dependency, the source listed first in the 'order' file wins. (The installation order equals the installation priority currently).
You should at least copy the first CD from both UnitedLinux and SLES 8 sets, depending on what selection of software you want to install.
On the NFS server, create a directory which will serve as the installation source and make sure it is exported via NFS. This directory will be used later to specify the installation source using linuxrc.
The following script illustrates what directories need to be created and where you should copy the data from the CDs. In this script, it is assumed that you have ISO images. In most cases you will have CDROMs instead. Do not use this script as provided. If you wish to use it, please make sure you have changed the directory names to something suitable to your environment.
#!/bin/sh instsource="/exports/sles8" # # Create CD directories # cd $instsource mkdir -p sles8-i386/CD1 mkdir unitedlinux-i386/CD{1,2,3} # # Copy SLES CD # cd sles8-i386/CD1 mount -oloop /iso/SLES-8-i386-CD1.iso /mnt cp -a /mnt/* . umount /mnt cd ../.. # # Copy UL CDs # # 1 cd unitedlinux-i386/CD1 mount -oloop /iso/UnitedLinux-1.0-i386-CD1.iso /mnt cp -a /mnt/* . umount /mnt # 2 cd ../CD2 mount -oloop /iso/UnitedLinux-1.0-i386-CD2.iso /mnt cp -a /mnt/* . umount /mnt # 3 cd ../CD3 mount -oloop /iso/UnitedLinux-1.0-i386-CD3.iso /mnt cp -a /mnt/* . umount /mnt # # back to root of source # cd ../.. # # Now we have to move some data around to make this # a multiple source directory # # first we copy the order directory described above. cp -a sles8-i386/CD1/yast . # # Then the boot directory with the installation image # cp -a sles8-i386/CD1/boot . # # The content file and the media directory # cp sles8-i386/CD1/content . cp -a sles8-i386/CD1/media.1 . # # Now we copy the description files from SLES to the order directory as # described earlier. # Note: This can be in different ways. For example, you can reference # the already existing description directories instead of copying them to # yast. # mkdir -p yast/sles8/suse/setup/descr cp -a sles8-i386/CD1/suse/setup/descr yast/sles8/suse/setup cp sles8-i386/CD1/content yast/sles8/ cp -a sles8-i386/CD1/media.1 yast/sles8/ # # Same applies for UL # mkdir -p yast/ul/UnitedLinux/setup/descr cp -a unitedlinux-i386/CD1/UnitedLinux/setup/descr yast/ul/UnitedLinux/setup cp unitedlinux-i386/CD1/content yast/ul/ cp -a unitedlinux-i386/CD1/media.1 yast/ul/ # # We are almost done.. # Now we'll adapt the order files. # Fields of the order files are TAB delimited printf "/yast/sles8\t/sles8-i386/CD1\n" > yast/order printf "/yast/ul\t/unitedlinux-i386/CD1\n" >> yast/order echo "/yast/ul" > yast/instorder echo "/yast/sles8" >> yast/instorder EOF # # End # |
![]() | Fields of the order files have TAB as delimiter. |
The above script can be used for additional sources. For example one can add a new source for SLES Service Packs and customized sources for non-SuSE packages. The script above should cover most cases, for a SLES only installation however, one can achieve the same by following the instructions available in the Support Database.
<<< Previous | Home | Next >>> |
System Configuration | Advanced Linuxrc Options |