[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tmp & swap ?
Hi,
You can do it this way:
#! /bin/sh
# /etc/rc.d/rc.sysinit - run once at boot time
.
.
.
# mount /tmp
/bin/echo "y" | /sbin/mkfs.ext2 /.tmp_file
/bin/mount -t ext2 -o loop,nosuid /.tmp_file /tmp
/bin/chmod 1777 /tmp
I use this on my system to add swap space.
Shachar.
On Wed, 31 Dec 1997, Peter L. Peres wrote:
>
> There are no filesystems that 'delete themselves' under UNIX. These are a
> monopoly of a firm located in Redmond. They are so good, they delete
> several filesystems at once, and also transcode the freed disk space thus
> obtained, for better security, lest someone can restore the deleted
> information.
>
> The way to do what you want, is to create an application that can
> generate space on-demand (using malloc for example), and then add some
> magic to make it mountable by the loop device. Once you do this, every
> time you write to it, it allocates the respective chunks by malloc. This
> is RAM, and when that runs out, swap space. When you shut down, you loose
> all information in it. It is relatively easy to implement such a beast by
> hacking the ramdisk devices (look in the kernel sources), but bear in
> mind that kmalloc and malloc are 2 different things, and you do NOT want
> to use kmalloc for disks larger than a few Megs (very few).
>
> On Wed, 31 Dec 1997, Eddie Harari wrote:
>
> >
> > no , it is not what i ment ,
> >
> > what I ment was that the tmp will not be a partition or a directory
> > just a virtual file sysetm that deletes itself everytime the computer
> > boots ...
> >
> >
> >
> > --
> > Eddie Harari - phone: 972-3-6190999
> > fax : 972-3-6190992
> > ___________________
> > Take A Walk In The Wild Side ...
> >
> >
> >
>
>
-----------------------------------------------------------------------------
Shachar Tal - Computer Science, Technion, Israel Institute of Technology
email: shachar@vipe.technion.ac.il, shachar@il.eu.org
KeyID 0481FEF1 fingerprint = 52 1B 97 6A F2 77 AE C6 64 B6 5A 5E 14 28 8E 7E
-----------------------------------------------------------------------------