For me the line is: reboot -d -f -iĪgain just insert the following on a new line above: read -p "Press enter to reboot" reply The command used here is of course reboot as opposed to halt and should again be at the end of the do_stop function. To do the same when the system reboots, you have to edit the /etc/init.d/reboot file. If this is still not enough, there are ways to increase the size of the scrollback buffer (perhaps a different question though). If there is more than a single screenful of text, you can see terminal scrollback by pressing Shift+PgUp. You can the read the messages printed on the screen. Now when you shutdown, the system will pause until you press enter (or CTRL-C, CTRL-D, etc). Once you find the line, just insert a new line above with the following: read -p "Press enter to halt" reply
![binary editor process not shutting down binary editor process not shutting down](https://dev.mysql.com/doc/workbench/en/images/wb-preferences-sql-editor.png)
Otherwise it should be at the end of the do_stop function and the only line that calls the halt command. For me this is the line: halt -d -f $netdown $poweroff $hddown For the halt script, run the command sudoedit /etc/init.d/halt (or use a GUI editor) and look for the line that does the actual halt. The easiest way I can see to view the messages is to edit the /etc/init.d/halt and/or /etc/init.d/reboot scripts to pause just before the actual halt/ reboot. Part of my shutdown/reboot process is to remount the rootfs readonly and umount everything else, after this logging to a file that will still be there at the next boot is virtually impossible.
![binary editor process not shutting down binary editor process not shutting down](https://www.howtogeek.com/thumbcache/2/200/b09d9e4fb29ddc10a9a34af38a15a2f3/wp-content/uploads/2009/12/1pwr.png)
As far as I can see there is no way to log with rsyslog either, and even if there was, there are messages printed after rsyslog is stopped. For the boot process, there is the bootlogd package which creates the file /var/log/boot, but nothing for the shutdown/reboot process. There seems to be no way to log this data to a file.