cd /dev
dd if=/dev/zero of=Tmp bs=1024 count=512000
dd if=/dev/zero of=varTmp bs=1024 count=102400
mkfs -t ext3 /dev/Tmp
mkfs -t ext3 /dev/varTmp
cd /
cp -aR /tmp /tmp_backup
mount -o loop,noexec,nosuid,rw /dev/Tmp /tmp
cp -aR /tmp_backup/* /tmp/
chmod 0777 /tmp
chmod +t /tmp
cd /var/
cp -aR /var/tmp /var/tmp_backup
mount -o loop,noexec,nosuid,rw /dev/varTmp /var/tmp
cp -aR /var/tmp_backup/* /var/tmp/
chmod 0777 /var/tmp
chmod +t /var/tmp
df -h (Confirm everything is working)
Add the mount to your /etc/fstab
/dev/Tmp /tmp ext3 loop,noexec,nosuid,rw 0 0
/dev/varTmp /var/tmp ext3 loop,noexec,nosuid,rw 0 0
/dev/sda1 5.0G 1.3G 3.4G 28% /
/dev/sda2 224G 33M 213G 1% /home
/dev/shm 1005M 0 1005M 0% /dev/shm
/dev/Tmp 485M 16M 444M 4% /tmp
/dev/varTmp 97M 5.6M 87M 7% /var/tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 5.0G 1.3G 3.4G 28% /
/dev/sda2 224G 33M 213G 1% /home
/dev/shm 1005M 0 1005M 0% /dev/shm
Hi,
I don't know, if it's a good idea to post here.
My /tmpMnt file is corrupted. I have some file in it, that are impossible to delete, and a lot of errors in /var/log/message (probably cause by this problem).
Is it possible to destroy this file ? and do it again ?
What is the best solution for that ?