Red Hat Bugzilla – Bug 1359144
flag to reboot automatically when dropping to dracut emergency shell
Last modified: 2016-11-29 05:25:56 EST
Description of problem: It would be great to have a flag that allows a automatic reboot when dracut ends up in a emergency shell. The use case is, that we re-encrypt notebooks after we got them imaged from the factory of the vendor. After the re-encrypt is done, it drops into a dracut emergency shell. It would be great to reboot at this stage automatically instead of asking the user to reboot. An option similar to the "panic=N" for the kernel to reboot after N seconds on kernel panic would be great. Thanks Oliver
This is generally useful. Will be: rd.emergency=[reboot|poweroff|halt]: specify, what action to execute in case of a critical failure.
upstream commit https://github.com/dracutdevs/dracut/commit/c45e856a659a37537c107f7ef3e680abf60a96a5
Created attachment 1189721 [details] rdsosreport.txt Retested with dracut-033-450.el7, but the rd.emergency= option doesn't work, dracut drops to emergency mode even when rd.emergency=reboot is present on the kernel command line. rdsosreport is attached, moving back to ASSIGNED.
you have to turn off the shell: rd.shell=0 rd.emergency=reboot
OK, with rd.shell=0 it works as expected. If rd.shell=0 is really necessary for rd.emergency= to work, it should be mentioned in dracut.cmdline man page, the current description doesn't say anything about it: rd.emergency=[reboot|poweroff|halt] specify, what action to execute in case of a critical failure. Moving to ASSIGNED to improve the documentation.
dracut-033-457.el7
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2530.html