[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

HOWTO reread boot and login messages

    Loading, please wait...
    fsck from util-linux 2.25.2
    john01: clean, 336746/977280 files, 2768454/3905795 blocks

    Welcome to Debian GNU/Linux 8 (jessie)!

    [  OK  ] Reached target Remote File Systems (Pre).

    [ ... lots of lines ... ]

    [  OK  ] Started LSB: set CPUFreq kernel parameters.

    Debian GNU/Linux jessie/sid west tty1 Wed Aug 5  2015  10:22:04

    west login: david
    Last login: Wed Aug  5 09:23:20 CDT 2015 on tty1
    Linux west 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt11-1+deb8u2 (2015-07-17) i686

> How did you get these files? I haven't been able to come up with a way
> to get a dump of the exact text that is on a console, short of manually
> typing it into an editor (probably on another computer, for
> convenience's sake). Parts of it are logged, but not as far as I can
> tell into a single file [...]

I posted this method about 15 years ago, but things have changed a
little. It's easy but tedious, and there are more preconditions.

To get boot messages at all, you probably need to modify
/etc/default/grub thus:
GRUB_CMDLINE_LINUX_DEFAULT="quiet systemd.show_status=true fbcon=scrollback:128K"

It was once enough to have   1:2345:respawn:/sbin/getty --noclear 38400 tty1
in /etc/inittab but now you need a file
/etc/systemd/system/getty@tty1.service.d/noclear.conf containing


You mustn't change VC before you've done capturing the messages,
so booting straight into X is out.

The scrollback buffer will be cleared (though not the screenful being
displayed at the time) if the font gets changed, so
/etc/default/console-setup should have
if they're there at all.

You need a mouse and gpm installed for cut-and-paste on the console.

Your login startup shouldn't make any of these changes either.

Finally, you need to start performing the steps below within X minutes
of booting up, ie before the kernel blanks the screen, which zaps the
scrollback buffer.

Boot up.
Log in.
$ cat > a-new-file
Hold down Shift-PageUp (assuming it autorepeats) to get as far back up
the screen as you can.
Drag the mouse with (usually) the left button pressed across the
entire text to highlight it.
Press the paste (right, usually) button. The text is inserted into
the file. Usually the cursor sits at the end of the last line; if so,
press Return to complete the line ready for the next batch.
Hold down Shift-PageUp to get back up the screen and then press
Shift-PageDown twice. This should place you exactly one screenful
below where you were the first time (ie two half-screenfuls).
Drag the entire screen and paste again.
Repeat ad nauseam, but pressing Shift-PageDown 4 times, then 6 times etc.
until you find yourself highlighting back where you started, ie your
login and cat command.
Paste, press Return and then ^D.

Now you can peruse a-new-file at leisure or archive it.


Reply to: