Bug 1359144

Summary: flag to reboot automatically when dropping to dracut emergency shell
Product: Red Hat Enterprise Linux 7 Reporter: Oliver Ilian <oliver>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact: Maxim Svistunov <msvistun>
Priority: unspecified    
Version: 7.3CC: dracut-maint-list, harald, jstodola, mbanas, msvistun
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
*dracut* update The *dracut* initramfs generator has been updated with a number of bug fixes and enhancements over the previous version. Notably: * `dracut` gained a new kernel command-line option "rd.emergency=[reboot|poweroff|halt]", which specifies what action to execute in case of a critical failure. When using "rd.emergency=[reboot|poweroff|halt]", the "rd.shell=0" option should also be specified. * The "reboot", "poweroff", and "halt" commands now work in the emergency shell of `dracut`. * `dracut` now supports multiple bond, bridge, and VLAN configurations on the kernel command line. * The device timeout can now be specified on the kernel command line using the "rd.device.timeout=<seconds>" option. * DNS name servers specified on the kernel command line are now used in DHCP. * `dracut` now supports 20-byte MAC addresses. * Maximum Transmission Unit (MTU) and MAC addresses are now set correctly for DHCP and IPv6 Stateless Address AutoConfiguration (SLAAC). * The "ip=" kernel command line option now supports MAC addresses in brackets. * `dracut` now supports the NFS over RDMA (NFSoRDMA) module. * Support for *kdump* has been added to Fibre Channel over Ethernet (FCoE) devices. The configuration of FCoE devices is compiled in `kdump initramfs`. Kernel crash dumps can now be saved to FCoE devices. * `dracut` now supports the "--install-optional <file list>" option and the "install_optional_items+= <file>[ <file> ...]" configuration file directive. If you use the new option or directive, the files are installed if they exist, and no error is returned if they do not exist. * `dracut` DHCP now recognizes the "rfc3442-classless-static-routes" option, which enables using classless network addresses.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 08:05:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rdsosreport.txt none

Description Oliver Ilian 2016-07-22 11:58:15 UTC
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

Comment 1 Harald Hoyer 2016-07-22 12:14:31 UTC
This is generally useful.

Will be:

rd.emergency=[reboot|poweroff|halt]:
   specify, what action to execute in case of a critical failure.

Comment 4 Jan Stodola 2016-08-10 16:12:53 UTC
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.

Comment 5 Harald Hoyer 2016-08-12 09:34:33 UTC
you have to turn off the shell:

rd.shell=0 rd.emergency=reboot

Comment 6 Jan Stodola 2016-08-12 12:31:33 UTC
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.

Comment 7 Harald Hoyer 2016-08-17 15:38:36 UTC
dracut-033-457.el7

Comment 10 errata-xmlrpc 2016-11-04 08:05:49 UTC
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