Disable clearing of boot messages

From ArchWiki
Revision as of 16:55, 16 March 2011 by Madek (talk | contribs)
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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):

More permanent solution

For a more permanent change, the following can be used to add a pause, or wait for keypress while boot messages are still on the screen:

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

Add one of these to either the bottom of Template:Filename to pause when booting is finished, or the stat_fail() function in Template:Filename to pause when a boot script in /etc/rc.d fails with an explicit error code. Note that the latter is a system script and may be overwritten when that file is updated. If you're unsure what this means, use Template:Filename.

Have boot messages stay on tty1

Normal behaviour: Boot messages shoot past, screen is cleared, contents of Template:Filename are displayed, login (either CLI or login manager) is displayed.

Desired behaviour: Boot messages shoot past, login (either CLI or login manager) is displayed without clearing of tty1

There are two methods to achieve this. Choose the one that suits you best.

Method 1: edit /etc/inittab

If the default agetty, i.e. default arch, is used, it is possible to skip displaying the contents of Template:Filename altogether and instead keep the boot messages displayed on tty1. In Template:Filename, you will find a list of numbered consoles which look something like the following; just scroll down in the file to find it. Then you need to add the Template:Codeline option for the first virtual console (the c1 line) only:

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

Alternatively simply comment the first line. Note: this way the login dialogue doesn't appear, i.e. tty1 is locked.

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

But if you're using mingetty, you'll need to add the Template:Codeline and Template:Codeline options for your first virtual console (c1) only:

c1:2345:respawn:/sbin/mingetty --noclear --noissue tty1 linux
c2:2345:respawn:/sbin/mingetty tty2 linux

Method 2: edit /etc/issue

Simply cut the contents of the first line in /etc/issue so it looks like this:

Arch Linux \r  (\n) (\l)
Warning: Read the next section (Restoring /etc/issue) before attempting this!

Restoring /etc/issue

The characters can't be just typed again into the file because they are special characters not available on your keyboard!

After you cut the contents from line 1 in Template:Filename, paste it into a temporary file somewhere on you computer so you can copy and paste it back into Template:Filename later when you wish to restore original functionality. You can also backup the whole Template:Filename somewhere safe and restore it when needed.

Optionally, if you are more advanced, you can follow special procidures for typing in these special characters:

Methods of placing literal escape characters are editor dependent. In Vim:

ESC (exit insert mode)
:r !clear
:x (Save and Exit)

This will insert the literal characters equivalent to the shell Template:Codeline command. Optionally you can also insert the characters manually:

i (insert)
ctrl-v (insert literal character)
ESC (insert escape character)
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

See Also