sdt initrd - tool for working with SUSE installer initrd images
sdt initrd unpack [options] INITRD PATH
sdt initrd pack [options] PATH INITRD_FILE
sdt initrd update [options] (–base=BASEMEDIA | INITRDFILE) DEST
sdt initrd update [options] [–modspec=MODSPEC] (–base=BASEMEDIA | INITRDFILE) DEST
sdt initrd compare [options] INITRD1 INITRD2
The sdt initrd tool provides the following commands:
unpack: Unpack an initrd to a specified location pack: Pack an unpacked initrd filesystem into an initrd image update: Update an initrd images based on update files provided compare: Create a report showing the difference between two initrd imagse
To unpack an initrd image use the ‘unpack’ command as follows:
sdt initrd unpack /path/to/initrd unpackdir
This will unpack the initrd images located at ‘/path/to/initrd’ into the directory ‘unpackdir’ in the current path. ‘unpackdir’ must exist and be empty.
To re-packing an initrd image is just as simple using the ‘pack’ command as follows:
sdt initrd pack unpackdir /path/to/new/initrd-image
This creats a new initrd image located at ‘/path/to/new/initrd-image’ containing all files under ‘unpackdir’
The following examples updates an existing initrd image ‘initrd’ and write the new image to ‘newinitrd’
sdt initrd update -u updates -b ./distro/sles11sp1-x86_64 newinitrd
The -b/--base option to points to the distro installation media and required when adding kernel module package updates to the initrd.
The -u/--updatedir option specifies a directory where the sdt tool will find the files to be added to the Update Medium. Any KMPs, kernel packages, or other files found in the directory will be added to the initrd appropriately, and the 'linux file exported will be based on any default flavor kernel package provided. If no updated kernel package is provided, the linux kernel image will be exported from the base media. If the --updatedir option is not specified, the updates subdirectory in the current working directory will be used by default.
./updates)
Additional module to add to module.config such that it’s added to initrd and linuxrc considers it while probing hardware. MODSPEC is of the following format:
SECTION:MODULE,DESCR,PARAM,PRE_INST,POST_INST,INITRD,AUTO
If the kernel doesn’t contain any new driver which should be loaded for installation compared to the kernel contained in the base ISO, this option isn’t necessary.
The compare command compares two initrd images and creates a report to stdout listing any differences
sdt initrd compare initrd1 initrd2
The command compares the mode, UID, GID and hash (md5sum) of each file. If the files differ, the will be listed along with the compared data as follows:
- initrd1: lib/modules/3.12.28-4-default/initrd/igb.ko: MODE: 0600 UID 10651 GID 0 hash: 43a37a2f9e2d6d669f0704cf6673a025e8df40a6
+ initrd1: lib/modules/3.12.28-4-default/initrd/igb.ko: MODE: 0600 UID 10651 GID 0 hash: da39a3ee5e6b4b0d3255bfef95601890afd80709
This shows that the igb.ko file has changed (different hash) between the two initrd images.
If a file exists in one image and not the other, the file data will be shown for the existing file, and “NOT FOUND” for the initrd that does not contain the file. For example:
- initrd1: lib/modules/3.12.28-4-default/initrd/igb.ko: MODE: 0600 UID 10651 GID 0 hash: 43a37a2f9e2d6d669f0704cf6673a025e8df40a6
+ initrd1: lib/modules/3.12.28-4-default/initrd/igb.ko: NOT FOUND
When scanning the UPDATEDIR for files to be added to the driver kit, certain files will be automatically detected and specific actions taken. See sdt-file-detection (7) for more information on how files are detected.
sdt(1), sdt-file-detection(7)