Custom SystemRescueCd Modules

About SystemRescueCd Modules

SystemRescueCd-3.x introduced support for loading SRM Modules (System-Rescue-Modules) which are squashfs filesystems that contain extra files that are part of the system. This feature is not supported on SystemRescueCd 6.x

This feature is useful for adding new programs to SystemRescueCd as a module can contain a program, its data files and all its dependencies, but this features can also be used to add custom data files (your favourite scripts, configuration files, …) even though a backstore may be more appropriate in this case.

Adding SRM modules to SystemRescueCd

The SRM module and its MD5 checksum file have to be loaded after sysrcd.dat. Whatever the boot method is (from CDRom, from USB Stick, from HTTP or NFS) the SRM and MD5 files of the module have to be put in the same location as sysrcd.dat, which is the root of the device by default or the directory specified in the subdir boot option if different. If you boot SystemRescueCd from a block device (CDRom, USB Stick or Hard-disk) it will load all SRM files by default, in the alphabetical order (hence you can rename the module and its checksum file to change the order). If you boot from HTTP or NFS you have to specifically provide the name of each module using the loadsrm boot option.

SystemRescueCd-3.x comes with the new loadsrm boot option that allows you to control which SRM modules are going to be loaded.

  • loadsrm=off: Do not load any SRM module
  • loadsrm=*.srm: Load all SRM modules (works only for block devices)
  • loadsrm=module1.srm,module2.srm: Load explicit files (required for HTTP/NFS boot)

Adding SRM modules to the USB version of SystemRescueCd

Adding SRM modules to an USB stick is extremely simple as you just have to copy the SRM and MD5 files to the USB device.

Adding SRM modules to the ISO Image from Windows

Adding SRM modules to the CDRom version of SystemRescueCd is a bit more complicated as you have to recreate another ISO image with the extra files before you burn it. Under Windows this can be achieved using version 2.0 of the SystemRescueCd installer for Windows:

  • Download the SystemRescueCd ISO image from the download page
  • Download the SystemRescueCd installer for Windows
  • Execute the installer that you have just downloaded
  • Select a work directory which is just an empty temp folder on the hard-disk where files are going to be extracted
  • Select the original ISO image that you have downloaded previously
  • Customize files in the work directory If you wish you can add or modify files that have just been extracted, and you can copy the new module in the work directory (in the same directory as sysrcd.dat)
  • Select the new ISO image to build in the SystemRescueCd installer
  • Click on the Rebuild button to create the new ISO image

Adding SRM modules to the ISO Image from Linux

Under Linux you just have to mount the ISO image, add your files and recreate the ISO Image using xorriso

  • Mount the ISO image to a directory such as /media mount -o loop,ro /var/tmp/systemrescuecd-x86-x.y.z.iso /media
  • Copy all files from the mount point to a temp directory cp -a /media /var/tmp/sysrcd
  • Copy the extra SRM module files cp -a ~/mymodule.srm /var/tmp/sysrcd/mymodule.srm
  • Create a checksum file for each module md5sum /var/tmp/sysrcd/mymodule.srm > /var/tmp/sysrcd/mymodule.md5
  • Recreate the ISO Image using the following command:
xorriso -as mkisofs -joliet -rock \
        -omit-version-number -disable-deep-relocation \
        -b isolinux/isolinux.bin -c isolinux/ \
        -no-emul-boot -boot-load-size 4 -boot-info-table \
        -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
        -volid MyRescueCd -o /var/tmp/sysrcd-custom.iso /var/tmp/sysrcd

Creating your own SRM module

As SRM modules are standard squashfs filesystem images you can create your own module using mksquashfs. You just have to prepare a directory with all the files you want to put in the module. If you want to add extra programs to SystemRescueCd creating a module with standalone programs (such as static binaries) should be quite simple. If you want to add programs which have many dependencies this will be a lot more complicated.

Manual (EN)
LVM Guide
Disk partitioning

Git repository
Bug reports