Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is magic about .term_color ?

Posted on 2004-10-27
11
Medium Priority
?
324 Views
Last Modified: 2008-01-16
Dear experts.

I have a wierd problem, that this command

echo "any_string" > .term_color

resets my Linux box !
Reset mean, the system boots immediatelly,
like if I press the reset button.
Normal shutdown procedure is by passed.

I have tried to nail this problem, but no luck.
Here are some detail.
Distro : Slackware current (10.0 ++).
Kernel : 2.4.27.
X-Windows : Xorg 6.8.1. It happens only from a GUI, not from a concole.
Window Manager : does not matter. It happens on KDE or IceWM.
Terminal : does not matter. It happens on xterm, aterm or konsole.
User : It does matter. Only on one particular user.
Root did not have the problem. I created a new user, and it was normal.

So I though, it must be something with the file on the problematic user. Here is the checking:

-----------------
## Just test to echo blue
tux@engpc23:$ echo "blue"
blue
~
## echo blue to term, normal
tux@engpc23:$ echo "blue" > term
~
## the content of term
tux@engpc23:$ cat term
blue
~
## The permission of term
tux@engpc23:$ ls -l term        
-rw-r--r--  1 tux users 5 2004-10-28 10:44 term

## Nor the problematic file, the content is blue
tux@engpc23:$ cat .term_color
blue
~
## and the permission is allright too
tux@engpc23:$ ls -l .term_color
-rw-r--r--  1 tux users 5 2004-10-28 10:03 .term_color
~
## If I do this, system will reset !
tux@engpc23:$ echo "blue" > .term_color

-------------------

Could you give me a clue, what is going wrong here ?

0
Comment
Question by:Kocil
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12430426
Can you try
echo "blue" > ./.term_color
to see what happen?

Wesly
0
 
LVL 5

Author Comment

by:Kocil
ID: 12430445
It resets the computer.

This one too
echo "blue" > $HOME/.term_color
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12430476
How about echo "yellow" >> /tmp/.term_color?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 5

Author Comment

by:Kocil
ID: 12430519
Normal.

But I just found another things.
I was trying to 'clean up' the $HOME,
so I deleted some files using mc (midnight commander).
So far, I found 2 files that if I delete them, the computer resets.
- the .term_color
- another file named libhardware-0.7.4.tar.gz.

Is it a file system failure ?
I'm using reiserfs 3.6, on a RAID-1 partitions.

Still cannot believe a robust system like Linux
can be reseted by a silly things like this.

0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1000 total points
ID: 12430552
Hi,

   Before jump to the comclusion, can you do some more check?
1. touch .term_color  --> result?
2. fuser .term_color (there might be some option for fuser, basically to see which process open the .term_color)
3. umount that filesystem and do "fsck" on that file system to see whether any error.
4. mount that filesystem to other mount point (say /tmp/test ) and do echo > .term_color

Wesly
 
0
 
LVL 5

Author Comment

by:Kocil
ID: 12430616
1. touch .term_color  --> result?
Normal, no reset.
But after that, echo "aaa" > .term_color reset the computer.

2. fuser .term_color
Nothing

3. fsck, a lot of messages like this:
bad_stat_data: The objectid (9999) is shared by at least two files, can be fixed with --rebuild-tree only

In the end, it said:
Fatal corruption were found, Semantic pass skipped
1 found corruptions can be fixed only when running with --rebuild-tree.

So what should I do now ?


0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12430649
Since you use RAID1 (mirror), you can try to disconnect one disk and do "fsck" to determine which disk have problem.
Then rebuild the corrupted one by using the RAID controller utility.

Wesly
0
 
LVL 5

Author Comment

by:Kocil
ID: 12430697
Ok.

I'm backing up the data first now.
It may take a long time.

I will tell you later.
Thank you very much, up to this point.
0
 
LVL 5

Author Comment

by:Kocil
ID: 12430748
Hmmm the backup is finished faster than I expected.
Turned off the RAID-1, do fsck on each harddisk
fsck /dev/hda10    -----> error
fsck /dev/hdc10    ------> error

The errors are SIMILAR.
The RAID does pretty well including duplicating the error, LOL.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12433996
Hi,

   Then check the backup to make sure everything is backup.
Re-format hda10 and restore the data and re-do RAID1.

Wesly
0
 
LVL 5

Author Comment

by:Kocil
ID: 12442031
DONE.

So, nothing was magic about .term_color. :)

Thanks Wesly.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question