SDT-DUD(1) SUSE Driver Tools

Scott Bahling

19-03-2019

NAME

sdt dud - tool for working with driver update media

SYNOPSIS

sdt dud create [options] (–updatedir=UPDATEDIR | UPDATEDIR) PATH

DESCRIPTION

Update Medium

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

CREATE OPTIONS

-a ARCH, –arch ARCH
Specifies the architecture-version path of the Update Media e.g. “x86_64-sles11”
–archive FORMAT

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

-b BASE_MEDIA, –base BASE_MEDIA

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.

–classic
By default the DUD will create register the directory containing packages as a add-on product repository during installation. Using the –classic option will cause the DUD to use the old style bash script for installing the packages.
-d, TARGET_DISTRO –distro TARGET_DISTRO
Specifies the base distro that the Update Media is for e.g. “suse”
-I ID, –id ID
DUD id. Used as UpdateID in the dud.config file.
–instsys
Unpack update RPMs into DUD inst-sys location. Only user-space (non-KMP and non-kernel) packages are unpacked.
–uni-dud
Generate DUD to work with both SUSE Linux Enterprise Server and Desktop products.
-n NAME, –name NAME
Name of the DUD. Used as UpdateName in the dud.config file.
-u UPDATEDIR, –updatedir=UPDATEDIR
Directory to be scanned for update files to be added to driver kit. Directory will be scanned for kernel packages, KMP packages, YaST2 modules (.ybc), and tar files (.tgz). (Default: ./updates)

-v VENDOR, –vendor VENDOR Specifies the base distro that the Update Media is for [default: suse]

-w WORKDIR, –workdir WORKDIR
Work directory. Created if non-existent and remains after completion. If this option is not specified, temporary directory is created and deleted on exit.

USAGE

Creating Update Medium (DUD) with SUSE Driver Tools

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.

PATH ARGUMENT

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.

DISTRO PATH

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.

SCRIPTS

The SUSE installer will execute the following scripts contained in the install directory:

  • update.pre: executed right after YaST installer starst
  • update.post: After basic installation has finished
  • update.post2: Just before installer unmounts the installed system

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.

INSTALL DIRECTORY

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.

Classic Mode

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.