PDA

View Full Version : Text whizzing by too fast



utu
07-28-2010, 12:00 AM
During Knoppix's start-up, I get a fleeting glimpse of about
a half screen-full of text. It goes by so fast I've never been
able to see what it says.

I'm pretty sure its not dmesg or Xorg.o.log or .xsession-errors.

I'd like to know if there is a record after start-up is over
that shows what it said, or failing that, is there a virtual
terminal where it might have been seen for a little longer?

mecho
07-28-2010, 01:17 AM
I am not sure if I can give you the right answer, but I can tell you what I think it is and someone can correct me if I am wrong.
All normal logging messages in Knoppix are sent to /dev/tty12 which in turn according to me is connected to /dev/null and this setup is is done by /etc/syslog-knoppix.conf
What you see for a brief second is the screen before /dev/tty12 kicks in
This is just a guess though

kl522
07-28-2010, 02:44 AM
On my computer there isn't much things to see. I am not sure if below is what you want to see :-

Press control-Alt-F1 the X window will switch to text mode.
Press control-Alt-F5 will bring me back to the X window again.
( These are probably configurable somewhere because some website says it's control-Alt-F7 )

krishna.murphy
07-28-2010, 04:19 AM
On my computer there isn't much things to see. I am not sure if below is what you want to see :-

Press control-Alt-F1 the X window will switch to text mode.
Press control-Alt-F5 will bring me back to the X window again.
( These are probably configurable somewhere because some website says it's control-Alt-F7 )

FWIW - I've not gotten ctrl-Alt-F1 to do anything; I've tried it on 3 or 4 systems, too. I have to use lxterm and then
sudo chvt 1 At that point, I can ctrl-Alt-Fx and it will work fine, but once I'm back in X then it stops working. And Yes - that number (max vterm--X window) is configurable.

Cheers!
Krishna :mrgreen:

kl522
07-28-2010, 07:23 AM
Yeah it accomplishes the same thing. Anyway, you are not alone in noticing 'ctrl-alt-f1' not working. Many people on the internet make the same observation. I am not offering an answer, I think it can be almost anything from graphic card driver, kernel, or Xwindow configuration. Take your pick. ;)

utu
07-28-2010, 02:43 PM
For reference, here's how I portray a 'normal' visual sequence:

A start-up screen initially shows progress in device discovery,
defined by multiple lines of colored text: a 'diary' of sorts.
This is followed by two lines of grey-on-black text and
a brief pause, then a switch to an already begun, different,
grey-on-black diary.
For a brief time then, there is about half a screen of grey-on-black
text which continues to expand by perhaps a few lines; there is
hardly enough time here to recall any particular text or phrase.
This is interrupted by the appearance of a Bavarian scene which fills
the middle 2/3 of my wide screen.
This is shortly replaced by a full-screen background display which
I've defined by settings in Compiz.
This background is finally overlaid with LXDE panels & icons, and
the system is then ready to go. It commences with getting on-line.
On shut-down, the screen reverts to all-black, then shortly resumes
a multiple-line colored text text diary.
At the very last there are two lines of grey-on-black text.


Relative to that normal sequence, I note the following.

My function keys, by themselves don't do anything.
So far, only alt-F12 does anything.
Ive tried a lot of alt-, fn-, ctrl- two & three key combos with
the function keys F1 thru F12, to no avail.
alt-F12 can interrupt the initial colored text diary, sometime
after it has started; this will then show a readable
continuation of the initial grey-on-black diary, until it is
in turn interrupted by the Bavarian scene and what follows.
Now on shutdown, unless alt-F12 is toggled again, the grey-on-black
diary continues until interrupted by a multiple-line colored
text shutdown diary.
At the very last there are two lines of grey-on-black text.

We've had a better look at this ghost, but now it's gone again.

utu
07-29-2010, 03:21 PM
If you have suffered thru my post #6, here's what I'm looking for:
I'd like to capture the grey-on-black 'diary' as described.

This 'diary' looks like /var/log/syslog might look, but there isn't one in
my Knoppix 6.2.1. I'd like to study this to see what's going on
behind the scenes.

Also, and embarassing amendment to post #6:
'Fn-F1 thru Fn-F12 on my laptop is 11 toggles.
Fn-F6 is unassigned.
Fn-F2 is wireless. Don't laugh, that's not funny.

mecho
07-29-2010, 05:29 PM
I wrote my theory in post #2, but I can explain it a bit more. Because Knoppix is a live distro, there is a lot of abnormal operations going on therefore a lot of kernel messages. All this messages a turned off so they will not overwhelm your log files and clutter your system. You want to save space on your flash, if you have all those /var/log files turned on you will soon find yourself having megabytes of useless log files.
The config files that blocks all those log files is /etc/syslog-knoppix.conf. On regular system the system messages are controlled by /etc/syslog.conf
Just open those 2 files and compare them to one another. You will notice that Knoppix only allows emergency messages to the console, all the rest is sent to /dev/tty12 which according to me does not exist or is connected to /dev/null, so they are gone for good.
If you want to allow some of those log files to be created, just modify /etc/syslog-knoppix.conf.
If you want to experiment - rename /etc/syslog-knoppix.conf to /etc/syslog-knoppix.conf-old and /etc/syslog to /etc/syslog-knoppix.conf
This will give your system normal logging setup, boot Knoppix and then look in your /var/log folder.
I did not try it :) it would be interesting to see the result

mecho
07-29-2010, 07:57 PM
@ Utu

Hi Utu,
I have one off topic question for you and I don't want to open a new thread for it.
You mentioned that you are using SD card for Knoppix. Does you system recognize it as USB and you boot the same way as booting USB ?
And what is the read speed of your SD card and what brand and model it is ?
I would like to substitute my USB with SD card. I don't like my USB sticking out of my laptop.
Can you also post the output of:
sudo hdparm -Tt /dev/sdb
This measures your access speed

utu
07-29-2010, 09:12 PM
@ mecho (regarding your post #9)

My 'system' is a Dell Inspiron 1545; it sees SD cards as USBs.
The Dell has USB ports on the left and right and an SD card slot in front.
I have an old USB on the left that I use to sneaker-net stuff to my other computers.
I have a nano-chip on the right for my laser mouse.
I have a 2 Gb SanDisk in th SD card slot. I leave it there all the time.
I got 2 SanDisks in a set for about twelve dollars at BestBuy. Spare no expense, I say.
You should weigh the pros & cons of 4 and 8 Gb cards before you buy;
2 Gb is a bit edgy, if you're used to 12 or 15 Gb for your systems.

The DELL favors a certain order of things USB, so I have to remember to unplug
the sneakernet USB before boot-up, or quickly interrupt the boot process.
The Dell has its own boot screen which I can both re-order and intercept the boot-up
process to use USB (which includes SD cards), HDD or CDROM.
This is ever-so-much preferable to multi-booting ala Grub or Lilo, IMO.
This boot screen also has a few additional options for diagnosis & testing.

The Dell also has a well-behaved Windows 7, 4GB of ram and 350 Gb of hard drive.
The Win7 system works so well it is no fun at all. No danger. It just works.

The output of sudo hdparm -Tt /dev/sdb is as follows:
/dev/sdb:
Timing cached reads: 2146 MB in 2.00 seconds = 1073.60 MB/sec
Timing buffered disk reads: 30 MB in 3.20 seconds = 9.37 MB/sec

The only ID on the chips is 8E0924714400, both the same, exactly so.
My only complaint with the chips is I don't know how to keep them apart:
I can't write on them, tape doesn't work.

kl522
07-29-2010, 09:20 PM
Post #6 refered.

Seems that you are complicating it yourself. Knoppix booting is rather straight forward. The messages only come from mainly two locations.

1. 'init' inside 'minirt.gz'
2. after 'init', then all the rest of messages from /etc/init.d/knoppix-autoconfig.

If there are a lot of messages flying on the screen, most likely it's one or more commands in /etc/init.d/knoppix-autoconfig generated them.

Somewhere in the middle of /etc/init.d/knoppix-autoconfig, knoppix started syslog. It's easy to modify /etc/syslog-knoppix.conf to redirect output to somewhere you can see. For my case, it's configured to go to /tmp/syslog.

When I say ctrl-alt-F1, we ask you to do it after have booted into the comfort of LXDE environment. It never worked for knoppix 6.2, but 'chvt 1' thingie inside a lxde terminal does the same thing.

What else you want to see ?

utu
07-29-2010, 09:32 PM
@mecho

Thanks, mecho. That's very useful (regarding your post #8

I would like to make a current-session log-file out of
the grey-on-black 'diary'. That's only kilo-bytes,
la few screens at best.

I've modded .xsession-errors to current-session-only,
I still find that useful, except for the repetition,
and un-helpful-ness if 'XID collision'reports due to flash.

After all, I'm allotting 20 Mb to urlclassifier data-base.
What's a few more Kb, here or there?

I'm collecting a few ideas to make better use of the
Log File Viewer, and if this this grey-on-black stuff
has anything interestin in it, I'll add it to my list.

utu
07-29-2010, 09:58 PM
@kl522, referring to your post #11

I much appreciate your comments in regard to my question
regarding the puzzling but unstoppable text that greets us
on Knoppix 6.2.1 start-up.

You have also pointed out a number of valuable clues I am
interested in examining further, and will.

You deserve extra credit for this.

As to what else I'd like to see: I'd like to see a good
primer on Policy Kit errors, what causes them and how
to get rid of them. Preferably on another thread.

mecho
07-29-2010, 10:15 PM
I will open another thread regarding the media used for KNoppix - please join me there

klaus2008
07-29-2010, 11:25 PM
@utu

If you want to see the output that is made by startx on /dev/tty5 then you have to modify /etc/init.d/knoppix-startx. I use the tee program to copy that output into a file /var/log/knoppix-startx-dev-tty5.log:


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"
I also redirect the output to /dev/tty6 so that I am able to read it on the virtual terminal 6.

utu
07-30-2010, 12:50 AM
I hope you all will be patient with me, for I am a slow learner.

You have helped me find the material I'm after. Now I need to
figure out how to apply it. I know how, in principle to proceed
to establish a file to read. I've seen a few ideas on how to
achieve a virtual terminal, but I've not mastered that yet.

I lost a few hours being disconnected, by the unfortunate choice
of Fn-F2 on my laptop keyboard. I was attempting to establish
what, if anything, happened with a whole lot of key combinations.
I Thought my wifi or router had died.

Many thanks to you all. My cup runneth over.

klaus2008, I'm very interested to try what you suggest.
I will now re-apply myself to the virtual terminal problem;
once I get over that hump, I'll get back to you.

utu
07-30-2010, 07:30 PM
Progress:

In an lxterminal either as knoppix or root,
ctl-alt-F2 gets a virtual terminal (I don't know which one).
alt-F12 then takes you to virtual terminal #12 (vt #12).
vt #12 displays the last 46 lines of the grey-on-black diary.
From vt #12, alt-F5 then takes you back to your X-session.

Note: The previous is true in my Knoppix 6.2.1, with my
Inspiron 1545 keyboard, but not in Ubuntu 10.04 on another
computer.

Musings:

I am guessing that the diary which may have existed on prior
screens probably went to /dev/null, and isn't retrievable.

I don't know how to pre-arrange for an lxterm to be active
to see this stuff from the get-go.

I suspect a well-placed tee command might capture this
lost material in a logfile for later viewing.

utu
07-30-2010, 09:29 PM
@klaus2008, specifically in regard to your post #15.

I think I'm ready to try your idea.

Am I permanently modifying any files with your long command,
or will the change only persist for the immediate session?

If any files are permanently changed, which are they?

Also, I might add to my previous observations,
1. The first virtual terminal seems like it should be vt #5.
2. It is possible to enter 'ctl-alt-F2' during the start-up
sequence without firing up any lxterm. In one instance,
this allowed viewing earlier progress of start-up, but it also
stalled some of Network Manager magic. This magic resumed
successfully as soon as I returned to Xsession.

utu
07-30-2010, 09:46 PM
@klauss2008

Also,
Isn't the vt #6 portion unnecessary, if we just view the file saved by vt #5,
say sometime later via an xterm?

klaus2008
07-30-2010, 10:56 PM
@utu:

As long as you use a persistent image or an HD istall all modifications will be permanent. I think you should make a backup copy of the files you want to modify. /etc/init.d/knoppix-startx is the only file I would change. In this file you can search for the command line which calls startx and alter the command. You have to restart your Xserver after this customisation. Usually you can restart the Xserver from inside the graphical environment by hitting the key combo Ctrl-Alt-Backspace. It is also possible to change the system's runlevel from a virtual terminal:


init 2
init 5
The first command changes the runlevel to a runlevel without the Xserver. The second command starts runlevel 5 which includes the Xserver. You should close all your applications inside the grahical environment (like Iceweasel or LXTerminals) before you kill the Xserver. The log file will be created and you will able to read it.

If you like to keep your log file during reboots then it must be created in a directory that is permanent. I would use the home diretory /home/knoppix for this purpose.

You don't need vt #6 for logging purposes, but on my system switching over to a virtual terminal is faster than opening an xterm and starting an application to read the log file.

utu
07-31-2010, 12:09 AM
@klaus2008

If I understand correctly, the /etc/init.d/knoppix-startx file
has a single long line to which you merely add material via a tee command.

I dont look for every instance of 'startx', do I?

And that I should save a copy of the init.d file before so editing.

Have I got that right?

klaus2008
07-31-2010, 01:04 AM
@utu:

The file /etc/init.d/knoppix-startx is a file with many lines of code. But there is only one long line with startx being issued.


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 >/dev/tty5 2>&1 ; RC="$?"
I changed this line so that the output goes into a log file and to virtual terminal #6 instead of vt #5 since vt #5 is invisible while the Xserver is running.


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"
I think it is always a good idea to make a backup copy of the file before altering it.

krishna.murphy
07-31-2010, 01:50 AM
@utu:

The file /etc/init.d/knoppix-startx is a file with many lines of code. But there is only one long line with startx being issued.


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 >/dev/tty5 2>&1 ; RC="$?"
I changed this line so that the output goes into a log file and to virtual terminal #6 instead of vt #5 since vt #5 is invisible while the Xserver is running.


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"
I think it is always a good idea to make a backup copy of the file before altering it.

One can also make a backup of knoppix-data.XXX to be certain that whatever changes are made can be entirely overridden in case a problem develops unexpectedly. Sometimes things just start acting goofy without much in the way of clues about what is needed to fix it.

Cheers!
Krishna :mrgreen:

utu
07-31-2010, 03:08 AM
@klauss2008:

Houston, we have a problem.

This line has a syntax error, according to Knoppix, cut-and-pasted from my new /etc/init.d/knoppix-startx:

su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"

This is the line you suggested, cut-and-pasted from Knoppix forum:

su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"

utu
07-31-2010, 03:35 AM
@Klauss2008:

The original Knoppix line ends with:

"$USER" </dev/tty5 >/dev/tty5 2>&1 ; RC="$?"

Should we now have at this point:

"$USER" </dev/tty5 >/dev/tty5 2>&1; | /usr/bin/tee...

klaus2008
07-31-2010, 01:32 PM
@utu:



exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp </dev/tty5 >/dev/tty5 2>&1
The intention is to direct input from /dev/tty5 to the program /usr/bin/startx and redirect the output from stdout and stderr to /dev/tty5. But the output is invisible while the Xserver is running.


exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp </dev/tty5 2>&1 | /usr/bin/tee -a /var/log/knoppix-startx-dev-tty5.log >/dev/tty6 ; RC="$?"
The aim is to redirect /usr/bin/startx's output (stdout plus stderr) to /usr/bin/tee via a pipe. The program /usr/bin/tee appends its input to the file /var/log/knoppix-startx-dev-tty5.log or creates that file if it does not exist. In addition the tee program's output is redirected to /dev/tty6.

If you do not need the output on a terminal then you could try


su -l -c "export STARTUP=$STARTUP ; exec /usr/bin/startx -- vt5 -dpi "$DPI" -br -noreset -nolisten tcp" "$USER" </dev/tty5 >>/var/log/knoppix-startx-dev-tty5.log 2>&1 ; RC="$?"
Maybe you are interested in reading more about I/O Redirection in the Advanced Bash-Scripting Guide: http://tldp.org/LDP/abs/html/io-redirection.html
There is also a simple example of using a pipe in the BASH Programming - Introduction HOW-TO http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-4.html

If you write a semicolon ; then the Bash thinks that you want to mark the end of a command. In the example


</dev/tty5 >/dev/tty5 2>&1; | /usr/bin/tee
is no program that delivers input to the pipe. Thus you should get an error message.

utu
07-31-2010, 03:44 PM
@klauss2008

I appreciate your tutelage, but I'd like to stick with your first suggestion.
As near as I can tell, I have exactly input your first proposed command.
If I have, there is a syntax error in it.
If I haven't then I can't see the difference.

Perhaps you can look more closely at my post #24, forget my post #25, and
see what needs to be done.
I think this might be the simplest way to proceed at this point.
I grasp your idea, but I'd like to defer 'understanding' the syntax to later.

So, is there a difference in the two lines I posted in #24?

Thanks for your patience.

klaus2008
07-31-2010, 04:57 PM
@utu:

I do not see the difference between the two lines in your post #24. I put the old and the new knoppix-startx in a zip file so that you can compare them yourself. I do not get any syntax error messages and the log file is created as expected.
20

kl522
07-31-2010, 05:06 PM
As near as I can tell, I have exactly input your first proposed command.
If I have, there is a syntax error in it.
If I haven't then I can't see the difference.


How do you know that there is a syntax error ? Did you arrive at the conclusion based on the log file produced ? But 'tee' command appends to the log, so it could be the previous 'startx' which produced the syntax error. I suggest you remove the '-a' in the 'tee' command and test it again. This will make sure you are not seeing the history.

utu
07-31-2010, 08:37 PM
@kl522 & klauss2008

Doing as root...
Having revised /knoppix-startx, either with or without -a in the tee command,
when I ctl-alt-backspace, I get the syntax error, and am locked out of X for 5 min.
Reboot gives the same syntax & lock-out situation

I get back here by re-writing knoppix-startx from knoppix-startx.orig
which I saved before we began tinkering with X itself.

I get the idea, however, this is not actually the file I want per se.
This file probably duplicates only a segment of the whole on-screen experience
that originally got my curiosity.

I can probably figure out the syntax problem on my own, eventually, I just thought
it might be obvious to some of the old hands at this.

If I can't figure this problem out in a short while, I think I need to research the init process
and get to understand it better. I've always felt like a daredevil when tinkering with
the guts of the X machinery up close.

utu
08-01-2010, 01:28 AM
@klauss2008

I've spent a little time with the I/O Redirection reference, for which thanks.
This is a marvelous goldmine of ideas; not mere definitions.
Not a quick read.

utu
08-01-2010, 01:46 AM
@klauss2008 re your post #28

You did not get a syntax error, and you got the file established.
I'm cut-and-pasting your exact command, into /etc/init.d/knoppix-startx.
Seems like we should get the same result.

Is yours a live system or normal Debian installed?
I know some here are poor-man installs.

utu
08-01-2010, 03:53 PM
@mecho & kl522, in regard to posts #8 & #11

In reviewing this thread, I believe I did not follow-up enough
on your references to the relevancy of /etc/syslog-knoppix.conf.

I've seen what I want in vt #12 in real-time;
I just need a way to capture it for non-real-time study.

Perhaps It is possible to alter this .conf file to get
vt #12 logged to something like /var/log/vt12.log.

This may be a shorter learning curve than trying to tap into
init and/or minirt.gz for some elegant I/O re-direction.

mecho
08-01-2010, 05:05 PM
Just comment out the line in /etc/syslog-knoppix.conf and make a new line like this:
# *.*;auth,authpriv.none /dev/tty12
*.*;auth,authpriv.none -/var/log/syslog

This should send the syslog where it supposed to be.

utu
08-01-2010, 07:44 PM
@mecho

Outstanding.

Did what you said in post #34 & it works just as I wanted in post #1.

Adding this to my System Tools/Log File Viewer menu collection along with
.xsession-errors.

Thanks a heap.

utu
08-01-2010, 07:59 PM
As a postscript.

My syslog now gives a nice current-session-only, scrolllable record of about one minute, 28 seconds
of the boot-up process, which if viewed with Log File Viewer, continues on in real time.

klaus2008
08-01-2010, 09:29 PM
@utu re your post #32

My system is not an HD install. I copied the Knoppix directory to my hard disk and use a persistent image.

utu
08-01-2010, 10:03 PM
@klaus2008 re post #37

I'm still baffled why I get a syntax error.
I do appreciate all you help.
The references are excellent, but it'll take some time to absorb all that.

mecho
08-02-2010, 01:02 AM
Both /tmp and /var/log are mounted using tmpfs, so it really makes no difference at all where syslog is going to be routed to. /var/log only exist in RAM

utu
08-02-2010, 01:34 AM
@mecho

So, where do I look for dmesg or kern.log?
I know how to get dmesg from the command line,
but it used to be in /var/log as well.

Why have all the logs been removed, anyway?
I originally thought maybe they'd all been turned-off at one place. You knew better.

Seems like all the XID trash in .xsession-errors, and the db for urlclassifiers amounts
to a lot more Mb than these missing logs.

Also, you are mentioned in another thread about Log File Viewer.
Hope you don't mind.

kl522
08-02-2010, 01:59 AM
I'm still baffled why I get a syntax error.


Which you should get to the bottom of it. That helps in your own understanding of the behavior of shell scripts. Mind you, shell scripts are not the most friendly animal, there are a lot of pitfalls which you should learn from this exercise.

mecho
08-02-2010, 06:01 AM
The line you should enter in /etc/syslog-knoppix.conf for kern.log is :
kern.* -/var/log/kern.log
And I think syslog should expose everything that dmesg command does, you just remove the minus sign - in fron of it.
All log files are disabled because they interfere with the screen reader, at least that is what /etc/syslog-knoppix.conf says, but I don't think you use screen reader