Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 15 SP1

14 Customizing Installation Images with mksusecd Edit source

mksusecd is a useful tool for creating a customized installation image. Use it to modify the regular SUSE Linux Enterprise installation images, adding and removing files, creating a minimal network installation image, customizing boot and repository options, and creating a minimal boot image as an alternative to booting a system from a PXE server.

14.1 Installing mksusecd Edit source

In SLE 15 mksusecd is in the Development Tools Module. If you have not enabled this module you must enable it. First find the exact module name with zypper:

tux > zypper search-packages mksusecd
Following packages were found in following modules:

Package               Module or Repository
--------------------  -----------------------------------------------------------------
mksusecd              Development Tools Module (sle-module-development-tools/15/x86_64)
mksusecd-debuginfo    Development Tools Module (sle-module-development-tools/15/x86_64)
mksusecd-debugsource  Development Tools Module (sle-module-development-tools/15/x86_64)
mksusecd              Available
srcpackage:mksusecd   Available

To activate the respective module or product, use SUSEConnect --product.
Use SUSEConnect --help for more details.

Enable it with SUSEConnect:

tux > sudo SUSEConnect -p sle-module-development-tools/15/x86_64

In SLE 15.1 and later it is in the Main Update Repository, which is enabled by default.

Install mksusecd in the usual way:

tux > sudo zypper se mksusecd

Run mksusecd --help to see a complete list of commands.

After you create your custom image, copy it to a CD/DVD using your preferred disk-writing program such as Brasero or mybashburn.

Create a bootable USB drive using the dd command. Make sure the device is not mounted, then run the following command:

root # dd if=min-install.iso of=/dev/SDB bs=4M

Then your new bootable device is ready to use.

14.2 Creating a Minimal Boot Image Edit source

Use mksusecd to create a minimal boot image to start client machines from a CD/DVD or USB drive, in place of starting them from a PXE boot server. The minimal boot image launches the kernel and initrd, and then the remaining installation files are fetched from a local NFS server (see Section 16.1, “Setting Up an Installation Server Using YaST”).

Run the following command to create the minimal ISO image:

tux > sudo mksusecd --create min-install.iso \
--net=nfs://192.168.1.1:/srv/install/ARCH/OS_VERSION/SP_VERSION/cd1  \
/srv/tftpboot/EFI/ARCH/boot

Replace the NFS server address with your own. Replace ARCH with the directory corresponding to the target system architecture. Also replace OS_version and SP_VERSION (service pack) according to your paths in Section 16.1, “Setting Up an Installation Server Using YaST”".

14.3 Set Default Kernel Boot Parameters Edit source

Rather than waiting for a boot prompt to enter your custom kernel boot parameters, configure them in a custom mksusecd image:

tux > sudo mksusecd --create install.iso \
--boot "textmode=1 splash=silent mitigations=auto"

Verify that your custom parameters loaded correctly after startup by querying /proc:

tux > cat /proc/cmdline

14.4 Customize Modules, Extensions, and Repositories Edit source

SUSE Linux Enterprise 15 supports Modules (not to be confused with kernel modules) and Extensions for different product components. These are add-ons to the default Basesystem, such as Development Tools, Desktop Applications, and SUSE Linux Enterprise Live Patching. For more information refer to the Modules and Extensions Quick Start guide.

With mksusecd you may create an installation image containing all the additional Modules and Extensions you want. Start by querying existing images, like this example for SUSE Linux Enterprise 15 SP1:

tux > sudo mksusecd --list-repos SLE-15-SP1-Installer-DVD-ARCH-GM-DVD1.iso \
  SLE-15-SP1-Packages-ARCH-GM-DVD1.iso
Repositories:
  SLES15-SP1 [15.1-0]
  SLES15 [15.1-0]
  Basesystem-Module [15.1-0]
  SUSE-CAP-Tools-Module [15.1-0]
  Containers-Module [15.1-0]
  Desktop-Applications-Module [15.1-0]
  Development-Tools-Module [15.1-0]
  [...]

Create a new installation image that is built from the Modules, Extensions, and repositories that you select, and automatically enable them:

tux > sudo mksusecd --create myinstaller.iso\
  --enable-repos auto --include-repos Basesystem-Module,Desktop-Applications-Module \
  SLE-15-SP1-Installer-DVD-ARCH-GM-DVD1.iso \
  SLE-15-SP1-Packages-ARCH-GM-DVD1.iso

This creates and adds the add_on_products.xml file to the new image. Replace --enable-repos auto with --enable-repos ask to have the installer present a dialog for choosing modules.

Note
Note: AutoYaST Control File

If you are using AutoYaST to configure your installations, it is not necessary to list these modules in the AutoYaST control file when you use the --enable-repos option.

14.5 Creating a Minimal Netinstall ISO Edit source

To create a minimal installation image to launch a network installation, use the --nano option:

tux > sudo mksusecd --create netinstall.iso \
--nano SLE-15-SP1-Installer-DVD-ARCH-GM-DVD1.iso

14.6 Change Default Repository Edit source

To set a different repository, such as your own local repository, use the --net option:

tux > sudo mksusecd --create localinstall.iso \
--net "https://example.com/local" SLE-15-SP1-Installer-DVD-ARCH-GM-DVD1.iso
Print this page