LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to not clear screen at the end of boot sequence? (https://www.linuxquestions.org/questions/linux-general-1/how-to-not-clear-screen-at-the-end-of-boot-sequence-4175558608/)

dedec0 11-11-2015 12:59 PM

How to not clear screen at the end of boot sequence?
 
Hello everyone,

I running a Debian Whezzy with UML. I see the boot sequence, that starts with:

Code:

Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
[ ok ] ...
[ ok ] ...
[ ok ] ...

And goes on. When it ends, though, it erases the last few messages to clear the screen:

Code:

[ ok ] Starting the hotplug events dispatcher: udevd.
udevd[350]: starting version 175
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
EXT4-fs (ubda): re-mounted. Opts: (null)

### THERE WERE MORE MESSAGES HERE, WHERE THE START OF THE
### LOGIN PROMPT IS PUT, IN THE UPPER AREA OF THE SCREEN:
Debian GNU/Linux 7 coiso tty0

computer login: root
Last login: Wed Nov 11 18:34:31 UTC 2015 on tty0
Linux computer 4.2.6 #1 Wed Nov 11 15:14:29 BRST 2015 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
$

What should I do to keep all the messages? Where should I change something?

:-/

TobiSGD 11-12-2015 08:37 AM

Make a backup copy of /etc/inittab, then open your /etc/inittab as root in a text editor and find the entries that look like this
Code:

1:2345:respawn:/sbin/getty 38400 tty1
Add the --noclear option to the getty commands, so that they look like this
Code:

1:2345:respawn:/sbin/getty --noclear 38400 tty1

dedec0 11-12-2015 03:20 PM

Got it, thank you very much! Not hard at all, but something hard to search when you don't know exactly what it is. :) Too many unrelated results - glad we have fora like these here.

My case was a bit different, though, so I'm putting here my /etc/inittab, and the change I've made to it. It may be useful to others as well.

Code:

# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
#  <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
#0:2345:respawn:/sbin/getty 38400 tty0
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3

# Virtual environments rarely need more than one console:
c0:1235:respawn:/sbin/getty --noclear 38400 tty0 linux
s0:1235:respawn:/sbin/getty --noclear 115200 ttyS0 linux

The Debian image I use seems to be set up for UML, after reading these lines (and the only changes I did are the red parts in the end).

replica9000 11-12-2015 04:46 PM

You can also install bootlogd which will log all of those messages to /var/log/boot.

dedec0 11-13-2015 06:27 AM

Quote:

Originally Posted by replica9000 (Post 5448840)
You can also install bootlogd which will log all of those messages to /var/log/boot.

dmesg? (I think dmesg have these messages, at least for sometime until its limited space; probably a wrong guess)


All times are GMT -5. The time now is 08:27 AM.