Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Root Filesystem Questions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
forgotten1
Guru
Guru


Joined: 11 Jan 2005
Posts: 477
Location: East Coast, USA

PostPosted: Wed Jul 06, 2005 6:39 pm    Post subject: Root Filesystem Questions Reply with quote

Filesystem Hierarchy Standard wrote:
Applications must never create or require special files or subdirectories in the root directory. Other locations in the FHS hierarchy provide more than enough flexibility for any package.

When I list the contents of the root filesystem (with the -a switch) I find the following files:

.bash_history
.rnd

And I find the following empty directory:

.reiserfs_priv

The .bash_history file appears to be an artifact left during installation. I have no idea what the .rnd file is or what its purpose may be. I am using the reiserfs 3.6 filesystem, but have not configured the kernel to use ReiserFS extended attributes (which I believe causes the .reiserfs_priv directory to be created).

Three questions:

1. How would the .bash_history file have been created in the / directory? The active .bash_history files are located in the /root and /home/<user> directories. I feel comfortable deleting this file.

2. What is the .rnd file, it was last modified this morning, but does not change upon shutdown, or reboot.

3. If ReiserFS extended attributes are not being used, can the empty .reiserfs_priv directory be safely deleted?
Back to top
View user's profile Send private message
Nil_Spaar
Apprentice
Apprentice


Joined: 10 Jul 2004
Posts: 179
Location: Berlin, Germany

PostPosted: Wed Jul 06, 2005 9:38 pm    Post subject: Re: Root Filesystem Questions Reply with quote

forgotten1 wrote:

1. How would the .bash_history file have been created in the / directory? The active .bash_history files are located in the /root and /home/<user> directories. I feel comfortable deleting this file.

I believe this happens in the time of the installation after you chrooted into / and before doing source /etc/profile. I never bothered to find the actual reason but I guess quite a lot of environment variables with paths don't make sense after the chroot so the bash just dumps the it's history in /. I usually delete this file just after sourcing /etc/profile.

forgotten1 wrote:

3. If ReiserFS extended attributes are not being used, can the empty .reiserfs_priv directory be safely deleted?

I usually install Gentoo with a Knoppix CD and it apparently has ReiserFS extended attributes on so this directory get's created. After the installation finishes I delete it and have never had problems with that.
Back to top
View user's profile Send private message
forgotten1
Guru
Guru


Joined: 11 Jan 2005
Posts: 477
Location: East Coast, USA

PostPosted: Thu Jul 07, 2005 12:10 pm    Post subject: Reply with quote

Appreciate the feedback. I do believe both the .bash_history file and .reiserfs_priv may safely be deleted. I checked the kernel config of the Universal LiveCD and it does indeed set the ReiserFS extended attributes to "yes," so this is probably what causes the file to be created.

I've done a bit more research on the .rnd file in conjunction with observing the file. What I have is observed is that when I start the laptop up in the morning, anacron runs the cron jobs that were scheduled to run while the machine was off. I have a daily cron job which fires of tripwire creating a report which is then sent via qmail to the main user mail directory. It is during this operation the the .rnd file is created/modified.

So I believe at this point that the file is used by qmail and/or openssl, and that .rnd is used for seeding operations. Evidently (mentioned in both rand and openssl-rand manpages), the .rnd file is looked for in either $HOME/.rnd or .rnd. As the manpage doesn't show the second option as being located in /.rnd, I can only assume that is what is meant. All this means is that I now have to learn if I can simply move the file to the /root directory without any complication.

A simple test will validate this theory. Unfortunately, I do not yet understand this seeding operation enough to trigger it myself, and it is generated/modified during the daily anacron/cron operation. So I'll know more tomorrow.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum