-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dracut-lib): use poweroff instead of halt #2332
base: master
Are you sure you want to change the base?
Conversation
This looks good to me, but for consistency should the following change as well to poweroff instead of halt (in dracut-lib.sh).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this was done on purpose in e2ecc2d8, unfortunately we don't have access to https://bugzilla.redhat.com/show_bug.cgi?id=1053655 :)
Maybe to (at least) see some info on the screen of what caused the die()
, instead of power off the display?
Fixed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I like the idea of adding a few (30?) seconds delay before poweroff for the user to see what has happened on the screen and what is about to happen, but I would not wait for user input before issuing the shutdown. This could be done as a follow-up patch.
There is no very good solution here and poweroff is less confusing than halt. For some remote/unattended setup this could even damage the HW.. perhaps poweroff at least safer for the HW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also need to be changed:
[ -z "$_emergency_action" ] && _emergency_action=halt |
IMHO if we replace halt
with poweroff
, we should add the delay proposed by @rmetrich, so that the message passed to die
can at least be seen, otherwise that message would be meaningless.
Sure, we can do a follow-up with sleep. I think thirty seconds is a bit too much; ten should be enough. |
Using halt will keep the HW still powered on. This can be confusing for users. The screen is blank, but for example the fan is still running and they have no idea what is going on. So let's call poweroff.
@aafeijoo-suse what do you think of the latest version of this PR ? |
This is a problem for https://bugzilla.redhat.com/show_bug.cgi?id=2246410 . See also #2545 . Ten seconds seems waaaaay too short to me. In general, boot takes a while; people get bored and go to do something else while it's happening. For the specific case of media check, it takes longer. You can't assume someone will stay glued to the screen during the process such that they will catch a message that appears for ten seconds before the system suddenly shuts down. I'd think ten minutes at least is the flat minimum to be reasonably sure someone caught the message. |
We also have "rd.debug" in our toolbox. I think dracut already recommends setting "rd.debug" to debug dracut issues for the NOT unattended case. Users should not just reboot and try again. They should reboot set "rd.debug" in the bootloader and try again instead. Perhaps if "rd.debug" is NOT set, poweroff is still the best possible action (with not much of a wait). Crossposted also at #2545 . |
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
Using halt will keep the HW still powered on. This can be confusing for users. The screen is blank, but for example, the fan is still running, and they have no idea what is going on. So let's call poweroff.