Ask a Question related to FreeBSD, Design and Development.
-
Paul Richards #1
Cleaning /tmp on boot
Hi,
Is there an easy way to have FreeBSD (RELEASE-5.3) clean /tmp on boot
by means of setting a flag or something in /etc/rc.conf? I'd like to
check before I start manually hacking up my boot scripts to get this
done.
Alternatively, is there something similar to tmpfs from Linux
available on FreeBSD? I've heard about mfs but it statically
allocates memory from the VM, I'd prefer if allocation was done only
as needed on demand.
--
Paul Richards
Paul Richards Guest
-
Creating a boot diskette that does nothing but boot from hard disk
Is it possible to create a boot diskette that does nothing more than boot from a specific hard disk? How would I go about doing so? If I can't... -
Cleaning
Dear All, I'm new to all this photography stuff and was wondering if someone could advise me. I noticed that I have got some dust/hair(?) on the... -
Cleaning Programs For Use with XP
I use to use RegClean and Easy Cleaner when I ran Windows 98. Are these safe to use with Windows XP or can you recommend a different cleaner.... -
Cleaning Lenses
Hi all, Is there a cleaning solution or cloth you can get to clean lenses? Or is it worth just giving it to the local camera repair man to clean... -
Use of DVD-RAM cleaning kit
Hello, The directions on the IBM DVD-RAM/CD-ROM cleaning kit are for windows. I have looked high-low, and everywhere for AIX usage...Does anyone... -
Nelis Lamprecht #2
Re: Cleaning /tmp on boot
On Thu, 24 Feb 2005 12:42:17 +0000, Paul Richards
<paul.richards@gmail.com> wrote:I believe it's: clear_tmp_enable="YES"> Hi,
> Is there an easy way to have FreeBSD (RELEASE-5.3) clean /tmp on boot
> by means of setting a flag or something in /etc/rc.conf? I'd like to
> check before I start manually hacking up my boot scripts to get this
> done.
Nelis
Nelis Lamprecht Guest
-
Matthew Seaman #3
Re: Cleaning /tmp on boot
On Thu, Feb 24, 2005 at 12:42:17PM +0000, Paul Richards wrote:
Add:> Is there an easy way to have FreeBSD (RELEASE-5.3) clean /tmp on boot
> by means of setting a flag or something in /etc/rc.conf? I'd like to
> check before I start manually hacking up my boot scripts to get this
> done.
clear_tmp_enable="YES"
to /etc/rc.conf. Also consider 'daily_clean_tmps_enable="YES"' in
/etc/periodic.conf, which will enable a daily job to clean out old
files from temporary directories.
Yes -- correct, it is called 'mdmfs' under 5.x -- but it isn't> Alternatively, is there something similar to tmpfs from Linux
> available on FreeBSD? I've heard about mfs but it statically
> allocates memory from the VM, I'd prefer if allocation was done only
> as needed on demand.
necessarily true that it allocates memory out of VM: depending on the
arguments used when configuring the underlying md(4) device, the
memory can be swap or file backed. When it's used to provide a /tmp
filesystem, it is specifically swap backed. As is explained in the
mdmfs(8) man page. Add the following to /etc/rc.conf to enable using a
memory filesystem for /tmp:
tmpmfs="YES"
tmpsize="128m"
Note that tmpsize should be smaller than the amount of swap space on
your machine -- preferably quite a bit smaller -- or you can end up
with a situation where any user can potentially DoS your server simply
by creating files under /tmp
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 8 Dane Court Manor
School Rd
PGP: [url]http://www.infracaninophile.co.uk/pgpkey[/url] Tilmanstone
Tel: +44 1304 617253 Kent, CT14 0JL UK
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iQCVAwUBQh3SoJr7OpndfbmCAQIOKAP/RFJbM50+/jPZ6kiunMFxWh/fpMYqKR7Y
VIR0vjScBmAXy2xRnuS3YfOXUh3V1D+zlgQLYmVZXjzFO7qnLr n1npBXgmikT2qZ
pyohDxFNUwB2sArKuO8lXICIbdnjxy3/6ntMlOh2OoJ1b3Q55vF/8pOrh0xuOfLV
Es2CRGlPUjc=
=/Je9
-----END PGP SIGNATURE-----
Matthew Seaman Guest
-
Giorgos Keramidas #4
Re: Cleaning /tmp on boot
On 2005-02-24 14:49, Nelis Lamprecht <nlamprecht@gmail.com> wrote:
True. I'm just replying here to note that this and other tunables of>On Thu, 24 Feb 2005 12:42:17 +0000, Paul Richards
><paul.richards@gmail.com> wrote:>>> Hi,
>> Is there an easy way to have FreeBSD (RELEASE-5.3) clean /tmp on boot
>> by means of setting a flag or something in /etc/rc.conf? I'd like to
>> check before I start manually hacking up my boot scripts to get this
>> done.
> I believe it's: clear_tmp_enable="YES"
the rc.d scripts are documented in rc.conf(5):
% man rc.conf
If anyone happens to find an option that is not documented, then it's a
bug of the manpage and the freebsd-doc people will be glad to hear about
it; either with a simple post to the list or (preferably) through a new
problem report submission :-)
- Giorgos
Giorgos Keramidas Guest
-
Lars Kristiansen #5
Re: Cleaning /tmp on boot
> Alternatively, is there something similar to tmpfs from Linux
Found these:> available on FreeBSD? I've heard about mfs but it statically
> allocates memory from the VM, I'd prefer if allocation was done only
> as needed on demand.
[url]http://docs.freebsd.org/cgi/mid.cgi?41E01905.3040200[/url]
[url]http://docs.freebsd.org/cgi/mid.cgi?45044.1105365790[/url]
So swap backed memory disks only swaps to disk when necessary.
Wish that could have been mentioned in the handbook or man-pages.
Should I try to PR that? Someone more knowledgeable will do it I hope :-)
--
Hilsen Lars
Lars Kristiansen Guest
-
Lowell Gilbert #6
Re: Cleaning /tmp on boot
"Lars Kristiansen" <lars+lister.freebsd@adventuras.no> writes:
--- src/share/man/man4/md.4.ORIG Thu Feb 24 11:51:37 2005>> > Alternatively, is there something similar to tmpfs from Linux
> > available on FreeBSD? I've heard about mfs but it statically
> > allocates memory from the VM, I'd prefer if allocation was done only
> > as needed on demand.
> Found these:
> [url]http://docs.freebsd.org/cgi/mid.cgi?41E01905.3040200[/url]
> [url]http://docs.freebsd.org/cgi/mid.cgi?45044.1105365790[/url]
>
> So swap backed memory disks only swaps to disk when necessary.
>
> Wish that could have been mentioned in the handbook or man-pages.
> Should I try to PR that? Someone more knowledgeable will do it I hope :-)
+++ src/share/man/man4/md.4 Thu Feb 24 11:51:51 2005
@@ -50,7 +50,7 @@
This allows for mounting ISO images without the tedious
detour over actual physical media.
.It Cm swap
-Backing store is allocated from swap space.
+Backing store is allocated from virtual memory space.
.El
.Pp
For more information, please see
Feel free to PR.
--
Lowell Gilbert, embedded/networking software engineer, Boston area
[url]http://be-well.ilk.org/~lowell/[/url]
Lowell Gilbert Guest
-
Lars Kristiansen #7
Re: Cleaning /tmp on boot
Lowell Gilbert skrev:
Thank you, done. (or tried to)>"Lars Kristiansen" <lars+lister.freebsd@adventuras.no> writes:
>
>
>>>>Found these:>>>Alternatively, is there something similar to tmpfs from Linux
>>>available on FreeBSD? I've heard about mfs but it statically
>>>allocates memory from the VM, I'd prefer if allocation was done only
>>>as needed on demand.
>>>
>>>
>>[url]http://docs.freebsd.org/cgi/mid.cgi?41E01905.3040200[/url]
>>[url]http://docs.freebsd.org/cgi/mid.cgi?45044.1105365790[/url]
>>
>>So swap backed memory disks only swaps to disk when necessary.
>>
>>Wish that could have been mentioned in the handbook or man-pages.
>>Should I try to PR that? Someone more knowledgeable will do it I hope :-)
>>
>>
>--- src/share/man/man4/md.4.ORIG Thu Feb 24 11:51:37 2005
>+++ src/share/man/man4/md.4 Thu Feb 24 11:51:51 2005
>@@ -50,7 +50,7 @@
> This allows for mounting ISO images without the tedious
> detour over actual physical media.
> .It Cm swap
>-Backing store is allocated from swap space.
>+Backing store is allocated from virtual memory space.
> .El
> .Pp
> For more information, please see
>
>Feel free to PR.
>
>
[url]http://www.freebsd.org/cgi/query-pr.cgi?pr=78041[/url]
--
Still dark.
Hilsen Lars
Lars Kristiansen Guest



Reply With Quote

