sdt dud - tool for working with driver update media
sdt dud create [options] (–updatedir=UPDATEDIR | UPDATEDIR) PATH
The SUSE Linux distributions support a concept called Update Medium otherwise known as Driver Update Disk or DUD. The Update Medium is basically a directory structure containing kernel modules, YaST2 modules, and rpm packages. The kernel and YaST modules are used during the installation and can provide updates required for the installation. The rpm packages are installed to the target system at the end of the distro installation just before first boot.
In addition to kernel modules, YaST modules and rpm packages, the update media can deliver a tar-ball that is extracted to the root file-system of the target installation.
Lastly, the update media can provide a set of files to be written to the install environment that can be additions to or replacements of the standard installation system files.
The directory structure of the update media is documented at ftp://ftp.suse.com/pub/people/hvogel/Update-Media-HOWTO/Update-Media-HOWTO.html
Pack the resulting DUD into an archive specified by the FORMAT string. Current supported formats are:
cpio - cpio archive cpio.gz - gzip compressed cpio archive cpio.xz - xz compressed cpio archive tar - tar archive tar.gz - gzip compressed tar archive tar.xz - xz compressed ctar archive
Points to the contents of the initial installation media of the SUSE Linux Enterprise Product that the driver kit is designed to work with. Option can point to either a directory containing the contents of the installation media, or the media ISO image itself.
The base media is accessed to determine the proper DUD file structure whose specification is located in the linuxrc.config file on the initrd of the bootable media.
This option is not required if using the --distro and --arch-version options.
./updates)
-v VENDOR, –vendor VENDOR Specifies the base distro that the Update Media is for [default: suse]
To create an update media use the ‘create’ sub-command of the dud tool.
sdt dud create -u updates -b sles11sp1-x86_64 ./my-dud
The -ur/--updatedir option specifies a directory where the sdt command will find the files to be added to the Update Medium. The -b/--base option specifies the location of the base OS media (DVD/CD1) of the OS that the Update Medium is to be used with. If the --updatedir option is not specified, the updates subdirectory in the current working directory will be used by default.
The dud create command requires a specified output path as the last argument to the command string. If creating a none archived (see –archive option) DUD, path should be an empty directory. When creating an archived DUD and path is not a directory, it will be the filename of the archived DUD. When creating an archived DUD and specifying an existing directory as PATH, a file named out.dud will be created.
The top level path of the update medium is constructed as:
/linux/[vendor]/[arch]-[distro]
i.e.
/linux/suse/x86_64-sles11
The update media path for the target is configured in the linuxrc.config located in the initrd file on the base media. The SUSE driver tools will extract the linuxrc.config file and pull the needed information from it.
Optionally the distro and arch parts can be supplied via the following command line options:
-a ARCH, --arch=ARCH
-d DISTRO, --distro=DISTRO
-v VENDOR, --vendor=VENDOR
For example:
sdt dud create -u updates -v suse -a x86_64 -d sles11
The above command creates the following directory structure:
|-- linux
| `-- suse
| `-- x86_64-sles11
| |-- install
| | `-- rpms
| `-- modules
NOTE: The -v/--vendor option defaults to suse so it’s not required when building for a suse distribution.
The SUSE installer will execute the following scripts contained in the install directory:
To facilitate running multiple scripts at each checkpoint, the DUDs created by the SUSE Driver Tool will contain generic update.pre, update.post, and update.post2 scripts that each execute all scripts contained in the install/update.pre.d, install/update.post.d, and install/update.post2.d directories respectively. To include your own custom scripts, place them in the same update.*.d directory in your updatedir path. For example to supply three different scripts to run at the update.pre checkpoint place them in:
updates/update.pre.d/10-first-script.sh
updates/update.pre.d/20-second-script.pl
updates/update.pre.d/30-third-script.sh
where updates is the directory passed to the --updatedir option.
All RPMs in the install directory will installed. YaST will attempt to install RPMs in this directory using the following command:
rpm -Ufv *.rpm"
While this works OK for one or two RPMs that are guaranteed to install without any dependency issues, it breaks down when used for installing KMPs. When delivering KMP packages, you can’t be sure which kernel flavor will end up on the installed system. Therefore all matching KMP flavors must be provided. When providing all KMP flavors the rpm command that YaST calls will try to install them all in one swipe. This command will fail as soon as a KMP that does not match the installed kernel flavor(s) is attempted to be installed.
To remedy this situation, the SUSE Driver Tools puts the rpm packages in a sub-directory called rpms which is used as an add-on repository automatically passed to the installer. That way the packages can be selected or de-selected by the user via the standard installer software installation interface and the SUSE installer will manage all package interdependencies automatically. Note: unless auto-selected based on default installation dependencies, packages will need to be manually selected for installation. To automatically install all packages, use the --classic option as described below.
When using the --classic option, the DUD will be generated in a way the installs an update.post script that will attempt to install each package with a separate call to rpm. In addition, the script will log the installation process to /var/log/DUD.log.