dracut/modules.d
Martin Wilck 4c2d98c75b emergency.service: use Type=idle
Type=oneshot, as currently set in dracut's emergency service file,
causes an awkward situation if emergency mode is entered e.g. because
of a root device timeout, and the root device appears later because it
just has taken longer than the timeout. In that situation, my
expectation (backed by past positive experience) is that the user should
be able to simply exit the emergency shell and resume normal boot.

:/# systemctl status sysroot.mount
● sysroot.mount - /sysroot
   Loaded: loaded (/proc/cmdline; bad; vendor preset: enabled)
   Active: active (mounted) since Mon 2017-10-09 14:32:15 CEST; 16s ago
    Where: /sysroot
     What: /dev/mapper/3600601600a30200024fbbaf3f500e411-part5
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 1873 ExecMount=/usr/bin/mount /dev/disk/by-uuid/63751805-6abc-46a3-a66f-427920dece4d /sysroot -o ro (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)

:/# systemctl list-jobs
JOB UNIT              TYPE  STATE
 56 emergency.target  start waiting
 57 emergency.service start running

2 jobs listed.
:/# exit
logout
Failed to start default.target: Transaction is destructive.

(system keeps idling from this point on, user has no chance to
do anything).

This results from the combination of two effects:
1) initrd-root-fs.target sets "OnFailureJobMode=replace-irreversibly",
2) emergency.service's Type=oneshot causes the start jobs for both
emergency.service and emergency.target to persist while the user is in
the emergency shell.

When the shell is exited, systemd tries to isolate "initrd.target"
again, but this fails with "the transaction is destructive" error
because of the still pending jobs.

This patch fixes this by changing the Type of "emergency.service" from
"oneshot" to "idle".
2017-10-09 14:51:45 +02:00
..
00bash remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
00bootchart remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
00dash remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
00systemd Enable core dumps with systemd from initrd 2017-08-29 08:53:35 +02:00
00systemd-bootchart remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
01fips Try BOOT_IMAGE and fallback to vmlinuz-${KERNEL} 2017-06-29 10:40:29 +02:00
01systemd-initrd systemd-initrd: add initrd-root-device.target 2016-05-25 15:07:08 +02:00
02caps caps: make it a non default module 2016-09-02 07:51:55 +02:00
02fips-aesni remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
02systemd-networkd Do not use deprecated egrep/fgrep 2016-03-28 11:38:34 +03:00
03modsign remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
03rescue add support to F2FS filesystem (fsck) 2016-06-30 21:26:42 +02:00
04watchdog watchdog: start traversing the device tree from the right directory 2016-04-18 15:50:42 +02:00
05busybox remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
10i18n Merge pull request #163 from dracut-mailing-devs/1711921.0d4JtWs6XN@linux-lm3i.site 2017-03-30 11:01:22 +02:00
30convertfs change "while read x" to cope with EOF without newline 2015-04-28 11:39:15 +02:00
40network Merge pull request #285 from rldleblanc/fix-typos 2017-10-09 12:59:29 +02:00
45ifcfg network: enhance team support 2017-03-30 11:50:35 +02:00
45url-lib Handle curl using libnssckbi for TLS (RHBZ #1447777) 2017-05-11 10:13:22 -07:00
50drm drm: Install pwm modules on all architectures 2017-05-14 23:24:46 +02:00
50gensplash remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
50plymouth plymouth/plymouth-pretrigger.sh: also trigger acpi subsystem 2016-04-13 14:11:17 +02:00
80cms Add awk and getopt as dependencies of znetconf 2015-11-13 13:18:11 +01:00
80lvmmerge lvmmerge: depend on systemd 2017-08-14 09:47:22 +02:00
90btrfs guard ${arrays[@]} with "" 2015-07-09 15:36:25 +02:00
90crypt Add basic LUKS detached header support 2017-10-03 23:37:55 +01:00
90dm Enable the use of the OverlayFS for the LiveOS root filesystem. 2017-03-11 00:42:19 -05:00
90dmraid dmraid/61-dmraid-imsm.rules: add nowatch option for udev 2015-11-26 17:46:03 +01:00
90dmsquash-live systemd: fix setting of timeouts for device units 2017-10-06 10:05:25 +02:00
90dmsquash-live-ntfs Add NTFS support to 90dmsquash-live module (#191) 2017-06-30 00:15:57 +02:00
90kernel-modules kernel-modules: don't call instmods with empty arguments 2017-08-14 14:58:47 +02:00
90kernel-network-modules network: Try to load xennet 2016-11-10 16:05:58 +01:00
90livenet systemd: fix setting of timeouts for device units 2017-10-06 10:05:25 +02:00
90lvm add lvmmerge dracut module 2017-07-24 15:48:54 +02:00
90mdraid mdraid: wait for rd.md.uuid specified devices to be assembled 2017-05-16 11:37:27 +02:00
90multipath 95multipath: Pickup files in /etc/multipath/conf.d 2017-08-30 09:05:19 +02:00
90multipath-hostonly add 90multipath-hostonly module 2017-07-10 13:28:40 +02:00
90qemu qemu: include the qemu_fw_cfg kernel module 2016-08-16 13:43:18 -07:00
90qemu-net remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
91crypt-gpg crypt-gpg: Include module if CCID smartcard support requested 2017-03-30 14:54:26 +02:00
91crypt-loop Include both and in luks key name. 2017-08-03 21:47:06 -04:00
95cifs Add md4 and arc4 modules for ntlm 2016-11-17 16:56:53 +01:00
95dasd Reset IFS variable 2017-06-23 21:27:02 +02:00
95dasd_mod remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
95dasd_rules mark these as needing bash 2017-06-29 12:18:26 +02:00
95debug add systemd-analyze to debug and TEST-02-SYSTEMD 2017-07-28 10:17:06 +02:00
95fcoe fcoe: handle CNAs with DCB firmware support 2017-09-27 10:36:44 +08:00
95fcoe-uefi fcoe: check if needed for hostonly 2016-07-14 13:57:21 +02:00
95fstab-sys change "while read x" to cope with EOF without newline 2015-04-28 11:39:15 +02:00
95iscsi Do not "cp" the selinux context 2017-01-16 14:27:39 +01:00
95nbd nbd: use systemd-run to start nbd-client 2017-07-28 15:15:02 +02:00
95nfs handle rpcbind /run/rpcbind directory 2017-06-06 13:38:29 +02:00
95resume 95resume: avoid possible symbolic link creation error on bootup 2016-04-15 10:38:04 +02:00
95rootfs-block rootfs-block/module-setup.sh: check root_devs in cmdline_rootfs() 2017-08-18 14:44:19 +08:00
95ssh-client ssh-client: Include nss_ libraries 2017-08-15 16:10:50 +02:00
95terminfo Do not "cp" the selinux context 2017-01-16 14:27:39 +01:00
95udev-rules Do not use deprecated egrep/fgrep 2016-03-28 11:38:34 +03:00
95virtfs guard ${arrays[@]} with "" 2015-07-09 15:36:25 +02:00
95zfcp Check rd.zfcp= format in dracut hook:cmdline process stage 2015-11-13 14:02:19 +01:00
95zfcp_rules mark these as needing bash 2017-06-29 12:18:26 +02:00
95znet remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
96securityfs Revert securitfs change 2015-08-03 12:36:05 +02:00
97biosdevname remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
97masterkey remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
98dracut-systemd emergency.service: use Type=idle 2017-10-09 14:51:45 +02:00
98ecryptfs remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
98integrity Check the proper variable for a custom IMA keys directory 2017-04-27 07:55:58 -04:00
98pollcdrom remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
98selinux Revert "Let user specify the action after fail" 2015-11-13 13:22:34 +01:00
98syslog add imjournal.so to read systemd journal 2016-10-11 08:51:13 -04:00
98usrmount Revert "Let user specify the action after fail" 2015-11-13 13:22:34 +01:00
99base systemd: fix setting of timeouts for device units 2017-10-06 10:05:25 +02:00
99fs-lib fs-lib: f2fs needs crc32 not crc32c 2016-07-08 10:01:52 +02:00
99img-lib add support for Zstandard 2017-09-05 01:23:38 +02:00
99shutdown shutdown: guard against read-only /run 2015-11-30 11:27:03 +01:00
99uefi-lib uefi-lib: remove bogus comment 2015-06-23 15:29:43 +02:00