You are not logged in.

#1 2007-03-18 17:58:24

soloport
Member
Registered: 2005-03-01
Posts: 442

[solved] Understanding /tmp

Something changed with /tmp when the kernel26-2.6.20.3-2.pkg.tar.gz was installed on a PC.  It now looks like this (i.e. regular folder?):

  drwxr-xr-x   8 root root  4096 2007-03-18 10:38 tmp

This results in the WM being unable to start, complaining about "/tmp permission denied" (xorg starts just fine).  When /tmp is changed with 'chmod 777' the WM starts, of course.

Have tried removing /tmp and re-booting to see if init would create it properly, but that results in no /tmp available.

On another pre-2.6.20.3-2 kernel PC, /tmp looks like this (true temp folder?):

drwxrwxrwt  4 root root  4096 2007-03-18 10:01 tmp

So, was wondering if someone could help explain how /tmp works in Arch.  Is it RAM-based?  What might have changed in 2.6.20.3-2 (what do I look for)?  Is there something that could be changed to restore it to its previous incarnation?  Should I report a bug?

It's very important to me that /tmp be RAM-based.  Was it ever so with Arch?  How can it be configured so?

Thanks!

EDIT: Actually, is not so important that /tmp be RAM-based;  tpmfs (RAM or swap) is ok.

Last edited by soloport (2007-03-18 19:26:38)

Offline

#2 2007-03-18 18:19:33

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: [solved] Understanding /tmp

One way in which I might have screwed up was to 'cpio -ivp < initrd.img' before understanding what that would do.  A 'cpio --no-absolute-filenames -iv < initrd.img' worked, but spent several hours cleaning up the other.  Have a sense some things were missed.

So there is probably nothing wrong with 2.6.20.3.-2 kernel.  But how to restore /tmp?  Is it created at boot?  By what script?  Have looked at udev.rules, rc.sysinit, etc.  Just shooting in the dark, here.

Thanks.

EDIT: Installed 2.6.20.3.-2 kernel on another PC and /tmp didn't change (i.e. must have been the cpio thing).

Last edited by soloport (2007-03-18 18:53:22)

Offline

#3 2007-03-18 18:25:12

shilder
Member
From: Russia
Registered: 2007-02-13
Posts: 13

Re: [solved] Understanding /tmp

/tmp is just a directory usually writable by everyone. It usually cleaned at boot smile


it is somewhat difficult for me to express my thoughts in english language... so sorry me for my english smile

Offline

#4 2007-03-18 18:33:27

somairotevoli
Member
Registered: 2006-05-23
Posts: 335

Re: [solved] Understanding /tmp

adding the following to your fstab will make /tmp "RAM-based" .

none                  /tmp           tmpfs     defaults            0      0

Offline

#5 2007-03-18 19:01:03

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: [solved] Understanding /tmp

somairotevoli wrote:

adding the following to your fstab will make /tmp "RAM-based" .

none                  /tmp           tmpfs     defaults            0      0

That makes perfect sense.  Thanks.  However, would still like to know how to restore the "official" way.  Updated the kernel on another PC and /tmp survived -- no changes.  So, am pretty sure the cpio thing wrote over /tmp.  So, again, how does one recover /tmp to normal?

Offline

#6 2007-03-18 19:15:50

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,911
Website

Re: [solved] Understanding /tmp

tmpfs                  /tmp          tmpfs     defaults            0      0

emmmm


Mr Green

Offline

#7 2007-03-18 19:25:30

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: [solved] Understanding /tmp

In /etc/rc.shutdown, just before:

stat_busy "Remounting Root Filesystem Read-only"
/bin/mount -n -o remount,ro /
stat_done

Added the following:

rm -Rf /tmp
mkdir /tmp

Rebooted and /tmp was auto-mounted as tmpfs again!

(Have removed the new lines from /etc/rc.shutdown, etc.)

Thanks for all the replies!

Offline

Board footer

Powered by FluxBB