Bug 953542 - dracut && systemd masked services
Summary: dracut && systemd masked services
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 19
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: dracut-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-18 12:16 UTC by GV
Modified: 2015-02-17 15:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 15:00:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description GV 2013-04-18 12:16:52 UTC
Description of problem:
There is no way for me to disable auto-swap during boot.

# cat /boot/initramfs-3.8.8-202.AES.f18g.x86_64.img | gzip -d | cpio -t | grep swap
usr/lib/systemd/system/swap.target

# systemctl mask swap.target
ln -s '/dev/null' '/etc/systemd/system/swap.target'

# systemctl is-enabled swap.target
masked

# dracut -v -f
....
I: Wrote /boot/initramfs-3.8.8-202.AES.f18g.x86_64.img:
I: -rw-------. 1 root root 13389807 Apr 18 08:06 /boot/initramfs-3.8.8-202.AES.f18g.x86_64.img

# cat /boot/initramfs-3.8.8-202.AES.f18g.x86_64.img | gzip -d | cpio -t | grep swap
usr/lib/systemd/system/swap.target

I still want to be able to run swapon -a (I need the swap entry in fstab for loop-aes).

Comment 1 GV 2013-04-22 07:10:52 UTC
Actually, swap.target is not a good example (I have to mask dev-sdaX.swap, and this is not included in initramfs image.).
Still, I may want to mask something else, let's say systemd-ask-password-console.service. Right now is not possible.
Or, maybe, I want something else for single.service.

Comment 2 Harald Hoyer 2013-04-22 07:24:07 UTC
(In reply to comment #1)
> Actually, swap.target is not a good example (I have to mask dev-sdaX.swap,
> and this is not included in initramfs image.).
> Still, I may want to mask something else, let's say
> systemd-ask-password-console.service. Right now is not possible.
> Or, maybe, I want something else for single.service.

single.service is not in the initramfs. But I get your point.

You can always include items in the initramfs by creating a /etc/dracut.conf.d/80-myconfig.conf file adding additional files:

install_items+="/etc/systemd/system/<servicefile>"


I don't know, if dracut should default to include those files automatically, since it can lead to an unbootable system.

Comment 3 GV 2013-04-22 07:51:41 UTC
> single.service is not in the initramfs.
yes, is not in fedora 19. Is still in fedora 18. It was just an example.

The initramfs has been created automatically.

Yes, I know how to add files to initramfs. Thanks for your suggestion.
The problem I see with install_items is that you may forget to add the file names.

Maybe a new parameter in dracut.conf to force include those files automatically?

Comment 4 Harald Hoyer 2013-05-29 12:13:55 UTC
Hmm, swap is not activated in the initramfs anyway, IIRC, because fstab is empty.

Comment 5 Fedora End Of Life 2015-01-09 17:54:44 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-02-17 15:00:26 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.