Re: Move /tmp back to root
mkdir tmp
as everything into ram is lost after reboot of course (so nothing to move)
Re: Move /tmp back to root
That was easy! Just commented out the line in fstab which moved /tmp to RAM, then mkdir tmp in terminal, and rebooted. Thanks!
Re: Move /tmp back to root
Isn't that a bad idea for a computer which doesn't shuts down frequently? Suppose I need to burn a DVD it'll store everything in /tmp I guess. Also if burning takes lot of time and meanwhile I started my virtual box and start playing Scrabble on WinXP then it'll need more RAM. This will cause SWAP partition to be used, too much swap, system heat up and slow. I may be wrong, but if anyone can explain please share that how is mounting /tmp to RAM is going system's performance.
Re: Move /tmp back to root
If you have plenty of RAM and hardly ever need SWAP, then /tmp in RAM may speed up applications that use /tmp to write temporary data. If you end up in a scenario where lots of /tmp data is written, and you are running a lot of processes, then indeed it will have a negative impact, because swap kicks in earlier than if /tmp would not have been in RAM.
Re: Move /tmp back to root
Quote:
Originally Posted by
Wtwine
Hi
I moved /tmp to RAM to improve performance by adding the following to fstab:
Code:
# Move /tmp to RAM
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0
However, this turned out to be a bad idea for me (poor performance and can't install some packages in R because of the way it uses /tmp), so I want to move /tmp back to root.
How do I do that?
The following link refers with same query posted by somebody else (but no answers):
http://ubuntuforums.org/showthread.php?t=1158145
hi
your problems are the mount options. ---> nosuid, noexec .... will never work for /tmp. the idea is OK but you have to look at the permissions (example: some aps are looking not only for the user and group - they are evem looking for the permissions - especially for the t (is the sticky bit) bit is set.
ciao
Re: Move /tmp back to root
After I moved /tmp back to root, I have hit another snag.
Today I did an update, and when I did dist-upgrade, I got this error message:
Quote:
mount: /tmp not mounted or bad option
E: Problem executing scripts DPkg: Pre-Invoke 'mount -o remount,exec /tmp'
E: Sub-process returned an error code
Why is /tmp not mounting when I boot, and how do I resolve this?
Re: Move /tmp back to root
thats simple, ubuntu settings does not know about your choice. Changing the default settings need a bit more than moving /tmp :(
Re: Move /tmp back to root
IIRC, dpkg caches preinst/postinst scripts in /tmp and launches them from there. If /tmp is on a separate partition and mounted noexec, the partition needs to be remounted exec by APT before invoking dpkg. When you were moving /tmp to RAM, you probably added something like this in /etc/apt/apt.conf or in some file under /etc/apt/apt.conf.d/:
Code:
DPkg::Pre-Invoke {"mount -o remount,exec /tmp";};
DPkg::Post-Invoke {"mount -o remount /tmp";};
Since your /tmp isn't on a separate partition anymore, remove these lines from the file.
It's also a good idea to make /tmp world-writable, but set the restricted deletion flag:
Code:
sudo chmod +rwxt /tmp
Re: Move /tmp back to root
After deleting those lines in apt.conf, I managed to upgrade successfully after rebooting. I also changed the permissions on /tmp as advised.
Thanks!