Skip to content

Instantly share code, notes, and snippets.

@silverhadch
Created May 27, 2025 15:01
Show Gist options
  • Save silverhadch/ceb1e9059fd86f3e00fbccc5f8bf678a to your computer and use it in GitHub Desktop.
Save silverhadch/ceb1e9059fd86f3e00fbccc5f8bf678a to your computer and use it in GitHub Desktop.
SystemRescueCD on SystemD-Boot

Add SystemRescueCD to systemd-boot

A guide for adding SystemRescue (systemrescue.iso) directly to your EFI System Partition and booting it via systemd-boot — no USB needed.


Requirements


Step 1: Extract the ISO (Do not mount!)

Use bsdtar or 7z to extract the ISO contents:

mkdir systemrescue-extracted
bsdtar -xf systemrescue-[Version]-amd64.iso -C systemrescue-extracted

Or:

7z x systemrescue-[Version]-amd64.iso -osystemrescue-extracted

Step 2: Copy Files to the ESP

Assuming your ESP is mounted at /boot:

sudo mkdir -p /boot/EFI/sysrescue
sudo cp systemrescue-*-amd64.iso /boot/EFI/sysrescue/
sudo cp systemrescue-extracted/sysresccd/boot/x86_64/vmlinuz /boot/EFI/sysrescue/
sudo cp systemrescue-extracted/sysresccd/boot/x86_64/sysresccd.img /boot/EFI/sysrescue/

Step 3: Label your ESP

Label your EFI System Partition as ESP:

sudo fatlabel /dev/sdXY ESP

Replace /dev/sdXY with your ESP device (check with lsblk or blkid).


Step 4: Create Boot Entry

Create a new entry file:

# /boot/loader/entries/sysrescue.conf
title   SystemRescue
linux   /EFI/sysrescue/vmlinuz
initrd  /EFI/sysrescue/sysresccd.img
options img_label=ESP img_loop=/EFI/sysrescue/systemrescue-[Version]-amd64.iso archisobasedir=sysresccd copytoram=y

Boot Options Explained

Option Description
img_label=ESP Label of the ESP containing the ISO
img_loop=… Path to the ISO file relative to the ESP
archisobasedir=… Base directory inside ISO; for SystemRescue always sysresccd
copytoram=y Loads everything into RAM; allows unmounting/removing ESP after boot

Done!

Reboot and select SystemRescue from the systemd-boot menu. You now have a rescue OS stored permanently on your internal disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment