Difference between revisions of "Disable clearing of boot messages"

From ArchWiki
Jump to: navigation, search
m (Restoring /etc/issue: casing for Vim and Emacs, add ln)
m (Restoring /etc/issue: added full reset of terminal on logout)
Line 48: Line 48:
  
 
<!-- The tip is kind of unrelated to the article -->
 
<!-- The tip is kind of unrelated to the article -->
{{tip|to just clear the screen after logging out on a virtual terminal, do: {{codeline|echo clear >> ~/.bash_logout}}}}
+
{{tip|to just clear the screen after logging out on a virtual terminal, do: {{codeline|echo -e "clear\nreset" >> ~/.bash_logout}}}}

Revision as of 21:47, 2 March 2010

Summary help replacing me
Preventing the boot sequence printout from dissapearing.
Language

Template:I18n entry

Related
Arch Boot Process

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 Template:Codeline.

Using flow control

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

Flexible /etc/rc.local solution

For a more permanent change, add one of the following to the bottom of Template:Filename:

  • Wait for a keypress before clearing the screen:
 read -n1
  • Wait for at most 5 seconds or until a keypress occurs:
 read -t5 -n1

Delete the first escape code of /etc/issue

The offending escape code: Template:Codeline. Consider that in addition to not clearing the screen after booting, this will stop the screen from being cleared after logging out from regular sessions.

In some cases the whole first line will need to be deleted, as there is more than one instructions, i.e. one clears the screen and the other one places the cursor at the top.

If using the default agetty, it is possible to skip displaying /etc/issue altogether. In /etc/inittab, add the Template:Codeline option for the first virtual console:

c1:2345:respawn:/sbin/agetty -i -8 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux

Restoring /etc/issue

The characters can't be just typed again into the file; the literal escape character needs to be placed and the way of doing so is editor dependent. In Vim:

i (insert)
ctrl-v (insert literal character)
ESC (insert escape character)
c
ESC (exit insert mode)
ZZ (Save and Exit)

In Emacs:

C-q ESC (to insert literal escape)
Tip: to just clear the screen after logging out on a virtual terminal, do: Template:Codeline