{"id":3159,"date":"2022-12-20T16:43:39","date_gmt":"2022-12-20T19:43:39","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/dracutshutdown-s-man8\/"},"modified":"2022-12-20T16:43:39","modified_gmt":"2022-12-20T19:43:39","slug":"dracutshutdown-s-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/dracutshutdown-s-man8\/","title":{"rendered":"DRACUT&minus;SHUTDOWN.S (man8)"},"content":{"rendered":"<h1 align=\"center\">DRACUT\u2212SHUTDOWN.S<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">dracut-shutdown.service \u2212 unpack the initramfs to \/run\/initramfs<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">dracut\u2212shutdown.service<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This service unpacks the initramfs image to \/run\/initramfs. systemd pivots into \/run\/initramfs at shutdown, so the root filesystem can be safely unmounted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following steps are executed during a shutdown:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd switches to the shutdown.target<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd starts \/lib\/systemd\/system\/shutdown.target.wants\/dracut\u2212shutdown.service<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 dracut\u2212shutdown.service executes \/usr\/lib\/dracut\/dracut\u2212initramfs\u2212restore which unpacks the initramfs to \/run\/initramfs<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd finishes shutdown.target<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd kills all processes<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd tries to unmount everything and mounts the remaining read\u2212only<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 systemd checks, if there is a \/run\/initramfs\/shutdown executable<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 if yes, it does a pivot_root to \/run\/initramfs and executes .\/shutdown. The old root is then mounted on \/oldroot. \/usr\/lib\/dracut\/modules.d\/99shutdown\/shutdown.sh is the shutdown executable.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 shutdown will try to umount every \/oldroot mount and calls the various shutdown hooks from the dracut modules<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This ensures, that all devices are disassembled and unmounted cleanly.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">To debug the shutdown process, you can get a shell in the shutdown procedure by injecting &#8220;rd.break=pre\u2212shutdown rd.shell&#8221; or &#8220;rd.break=shutdown rd.shell&#8221;.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"># mkdir \u2212p \/run\/initramfs\/etc\/cmdline.d <br \/> # echo &#8220;rd.break=pre\u2212shutdown rd.shell&#8221; > \/run\/initramfs\/etc\/cmdline.d\/debug.conf <br \/> # touch \/run\/initramfs\/.need_shutdown<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Harald Hoyer<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>dracut<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  dracut-shutdown.service \u2212 unpack the initramfs to \/run\/initramfs <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,302,4],"class_list":["post-3159","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-dracut-shutdown","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3159"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3159\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}