systemd / zram-generator

Systemd unit generator for zram devices
MIT License
575 stars 48 forks source link

Symlinked zram-generator.conf from /home to /etc/systemd/zram-generator.conf not found until manual daemon-reload. #165

Closed ghost closed 1 year ago

ghost commented 1 year ago

So, I symlink zram-generator.conf from my $HOME ($HOME/Documents/git-stuff/dotfiles/system-setup/zram-geneator.conf) to /etc/systemd/zram-generator.conf, but on restart it isnt detected. set 16 12:50:22 Taihou zram_generator::config[686]: No configuration found.

...but if i do a sudo systemctl daemon-reload

set 16 13:03:02 Taihou kernel: zram: Added device: zram0
set 16 13:03:02 Taihou systemd[1]: Condition check resulted in /sys/devices/virtual/block/zram0 being skipped.
set 16 13:03:02 Taihou systemd[1]: Condition check resulted in /dev/zram0 being skipped.
set 16 13:03:02 Taihou systemd[1]: Created slice Slice /system/systemd-zram-setup.
set 16 13:03:02 Taihou systemd[1]: Starting Create swap on /dev/zram0...
set 16 13:03:02 Taihou kernel: zram0: detected capacity change from 0 to 48128000
set 16 13:03:02 Taihou zram-generator[3757]: Setting up swapspace version 1, size = 22,9 GiB (24641531904 bytes)
set 16 13:03:02 Taihou zram-generator[3757]: LABEL=zram0, UUID=5842813c-3807-4111-85fb-315fcf25ced9
set 16 13:03:02 Taihou systemd-makefs[3756]: /dev/zram0 successfully formatted as swap (label "zram0", uuid 5842813c-3807-4111-85fb-315fcf25ced9)
set 16 13:03:02 Taihou systemd[1]: Finished Create swap on /dev/zram0.
set 16 13:03:02 Taihou systemd[1]: Activating swap Compressed Swap on /dev/zram0...
set 16 13:03:02 Taihou systemd[1]: Activated swap Compressed Swap on /dev/zram0.
set 16 13:03:02 Taihou kernel: Adding 24063996k swap on /dev/zram0.  Priority:100 extents:1 across:24063996k SSDscFS

It is detected.

nabijaczleweli commented 1 year ago

Are you sure that's actually mounted at that point? /etc must be mounted and cohesive to boot the system in general, in this case to generate the units at reload time in the new root; putting /e/s/z-g.c on /home saves you from rendering your system unbootable solely because you don't appear to actually require z-g to boot correctly. Make the symlink the other way and use https://github.com/Alcaro/GitBSLR.

ghost commented 1 year ago

.-. oh. thanks