Difference between revisions of "Disable clearing of boot messages"

From ArchWiki
Jump to: navigation, search
(Have boot messages stay on tty1: add info about early KMS and increasing scrollback buffer)
Line 21: Line 21:
 
== Have boot messages stay on tty1 ==
 
== Have boot messages stay on tty1 ==
  
By default, arch has the {{ic|getty@tty1}} service enabled. The service file already passes {{ic|--noclear}}, which stops agetty from clearing the screen. However [[systemd]] clears the screen before starting it because the unit file uses {{ic|1=TTYVTDisallocate=yes}}. To disable this:
+
By default, arch has the {{ic|getty@tty1}} service enabled. The service file already passes {{ic|--noclear}}, which stops agetty from clearing the screen. However [[systemd]] clears the screen before starting it. To disable this behavior edit {{ic|/etc/systemd/system/getty.target.wants/getty@tty1.service}} and set {{ic|1=TTYVTDisallocate=no}}.
  
# sed /TTYVTDisallocate=/s/yes/no/ -i /etc/systemd/system/getty.target.wants/getty\@tty1.service
+
Late KMS starting may still cause the first few boot messages to clear. If this is the case, try enabling [[KMS#Early KMS start|early KMS start]].
 +
 
 +
If there are too many boot messages you still might not be able to see all of them by scrolling up. Try increasing the size of your [[Scrollback buffer|scrollback buffer]].
  
 
=== Disable clearing in /etc/issue ===
 
=== Disable clearing in /etc/issue ===

Revision as of 04:10, 3 September 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

After the boot process, the screen is cleared and the login prompt appears, leaving users unable to read init output and error messages. This default behavior may be modified using methods outlined in this article.

Note that regardless of the chosen option, kernel messages can be displayed for inspection after booting by using dmesg or all logs from the current boot with journalctl -b.

Using flow control

This is basic management that applies to most terminal emulators, including virtual consoles (vc):

  • Press Ctrl+S to pause the output
  • And Ctrl+Q to resume it
Note: This pauses not only the output, but also programs which try to print to the terminal, since they'll block on the write() calls for as long as the output is paused. If your init appears frozen, make sure the system console is not paused.

Have boot messages stay on tty1

By default, arch has the getty@tty1 service enabled. The service file already passes --noclear, which stops agetty from clearing the screen. However systemd clears the screen before starting it. To disable this behavior edit /etc/systemd/system/getty.target.wants/getty@tty1.service and set TTYVTDisallocate=no.

Late KMS starting may still cause the first few boot messages to clear. If this is the case, try enabling early KMS start.

If there are too many boot messages you still might not be able to see all of them by scrolling up. Try increasing the size of your scrollback buffer.

Disable clearing in /etc/issue

If you have an old /etc/issue that has the "clear TTY" escape sequences, remove them.

# sed -i $'s/\e\[H//; s/\e\[2J//' /etc/issue