Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SUSE Linux Enterprise Server Documentation / Deployment Guide / Customizing installation images / Customizing installation images with mksusecd
Applies to SUSE Linux Enterprise Server 15 SP6

15 Customizing installation images with mksusecd

mksusecd is a useful tool for creating a customized installation image. Use it to modify the regular SUSE Linux Enterprise installation images, add or remove files, create a minimal network installation image, customize boot options or software repositories, and create a minimal boot image as an alternative to booting a system from a PXE server.

15.1 Installing mksusecd

In SLE 15, mksusecd is in the Development Tools module. If this module is not enabled, you must enable it first. Find the exact module name and SUSEConnect activation command with zypper:

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

Package              Module or Repository
-------------------- -------------------------------------------------------------------
---------------------- -----------------------------------------------------------------
mksusecd             Development Tools Module (sle-module-development-tools/15.4/x86_64)
                       SUSEConnect --product sle-module-development-tools/15.4/x86_64

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

Enable the module with SUSEConnect:

> sudo SUSEConnect --product sle-module-development-tools/15.4/x86_64

Install mksusecd:

> sudo zypper in mksusecd

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

After you create your custom image, either burn it to a CD/DVD medium using your preferred disk-writing program, or create a bootable USB flash drive using the dd command. Make sure the device is not mounted, then run the following command:

# dd if=myinstaller.iso of=/dev/SDB bs=4M

Then your new bootable device is ready to use.

15.2 Creating a minimal boot image

Use mksusecd to create a minimal boot image to start client machines from a CD/DVD or USB flash drive, instead 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 17.1, “Setting up an installation server using YaST”).

Run the following command to create the minimal ISO image:

> 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 17.1, “Setting up an installation server using YaST”.

15.3 Setting default kernel boot parameters

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

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

Verify that your custom parameters load correctly after start-up by querying /proc:

> cat /proc/cmdline

15.4 Customizing modules, extensions, and repositories

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 can create an installation image containing all additional Modules and Extensions you want. Start by querying existing images, like this example for SUSE Linux Enterprise 15 SP6:

> sudo mksusecd --list-repos SLE-15-SP6-Full-ARCH-GM-media1.iso
Repositories:
  Basesystem-Module [15.6-0]
  SUSE-CAP-Tools-Module [15.6-0]
  Containers-Module [15.6-0]
  Desktop-Applications-Module [15.6-0]
  Development-Tools-Module [15.6-0]
  HPC-Module [15.6-0]
  Legacy-Module [15.6-0]
  Live-Patching [15.6-0]
  Public-Cloud-Module [15.6-0]
  Python2-Module [15.6-0]
  SAP-Applications-Module [15.6-0]
  Server-Applications-Module [15.6-0]
  Transactional-Server-Module [15.6-0]
  Web-Scripting-Module [15.6-0]
  SLEHA15-SP6 [15.6-0]
  SLE-15-SP6-HPC [15.6-0]
  SLED15-SP6 [15.6-0]
  SLES15-SP6 [15.6-0]
  SLE-15-SP6-SAP [15.6-0]
  SLEWE15-SP6 [15.6-0]
  [...]

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

> sudo mksusecd --create myinstaller.iso --enable-repos auto \
--include-repos Basesystem-Module,Desktop-Applications-Module \
SLE-15-SP6-Full-ARCH-GM-media1.iso

This example creates an image for installation from the internet. To create an image for offline installation, additionally add the repository of the base product, for example SLES15-SP6 for SUSE Linux Enterprise Server.

> sudo mksusecd --create myinstaller.iso --enable-repos auto \
   --include-repos SLES15-SP6,Basesystem-Module,Desktop-Applications-Module \
   SLE-15-SP6-Full-ARCH-GM-media1.iso

Replace --enable-repos auto with --enable-repos ask to have the installer present a dialog for choosing modules.

Note
Note: AutoYaST control file

When using the --enable-repos option, mksusecd adds an add_on_products.xml file for use with AutoYaST to the new image. Modules in this file do not need to be listed in the in the AutoYaST control file.

15.5 Creating a minimal netinstall ISO

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

> sudo mksusecd --create netinstall.iso \
--nano SLE-15-SP6-Online-ARCH-GM-media1.iso

15.6 Change default repository

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

> sudo mksusecd --create localinstall.iso \
--net "https://example.com/local" SLE-15-SP6-Online-ARCH-GM-media1.iso