Skip to content

Bug: initrd-zfs-generator creates self-referential symlinks causing boot failure #39

@MrLutik

Description

@MrLutik

Summary

The initrd-zfs-generator in sd-zfs creates broken symlinks in /run/systemd/generator/initrd-root-device.target.wants/, causing systemd to fail with "Too many levels of symbolic links" during boot. This prevents ZFS pools from being imported and the root dataset from being mounted.

Affected Repository

Problem Description

When the generator creates symlinks in .wants/ directories, it creates them pointing to themselves instead of using relative paths:

Current (broken):

zfs-import-cache.service -> zfs-import-cache.service

Expected (correct):

zfs-import-cache.service -> ../zfs-import-cache.service

Symptoms

  • systemd error: Too many levels of symbolic links
  • zfs-import-cache.service never runs
  • ZFS pool import fails
  • Root dataset cannot be mounted
  • System fails to boot

Environment

  • OS: Arch Linux
  • Kernel: 6.17.9-arch1-1
  • ZFS: 2.3.5
  • Package: mkinitcpio-sd-zfs (AUR)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions