Re: Partitioning on existing system

2006-04-10 Thread Giorgos Keramidas
On 2006-04-09 18:56, Wil Hatfield [EMAIL PROTECTED] wrote:
  tmpmfs=YES
  tmpsize=100m
  tmpmfs_flags=-S -M -o noexec,nosuid
 
  Is there something wrong with this because it isn't creating a
  /tmp at all.
 
  Copyright (c) 1992-2006 The FreeBSD Project.
  Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
  The Regents of the University of California. All rights reserved.
  FreeBSD 6.1-PRERELEASE #4: Mon Apr  3 22:25:51 PDT 2006

 Ok, I am going to solve my own problem just for search engine food.

 Aside from adding the rc.conf variables there has to also be a /tmp folder
 in the first place. I don't know why.

Because that's the mount point where the memory disk is attached.
As usual, you need a directory to hook new mount entries onto :)

 I would figure that if needed that
 that would be part of the boot scripts. But it isn't, so for us tmpmfs
 newbies:

 Create an empty /tmp folder

 Add the following to rc.conf:
 tmpmfs=YES
 tmpsize=50m
 tmpmfs_flags=-S -M -o noexec,nosuid
 clear_tmp_enable=YES

 reboot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Partitioning on existing system

2006-04-09 Thread Wil Hatfield
Chad,

 this appears that you want a file backed image file mounted as your /
 tmp.  This should be easy to do.  Read the handbook for file-backed md
 (4) devices.

 I don't use them for /tmp but I run them with jails...  I have about
 60 such image files mounted now for example

Thanks for the great kick in the right direction. Is it really this easy? I
guess so cause it is working. I dropped in a helloworld script, chmoded it
and even as root I couldn't run it. Supreme!

mdmfs -M -o noexec,nosuid -s 100m md0 /tmp
chmod 1777 /tmp

Now anybody know of an easy way to search for chroot.


Cheers,

--
Wil Hatfield


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Partitioning on existing system

2006-04-09 Thread Wil Hatfield
 Thanks for the great kick in the right direction. Is it really
 this easy? I
 guess so cause it is working. I dropped in a helloworld script, chmoded it
 and even as root I couldn't run it. Supreme!

 mdmfs -M -o noexec,nosuid -s 100m md0 /tmp
 chmod 1777 /tmp


Ahhh crud! I guess it isn't that easy. After a reboot the old /tmp comes
back with executable permissions. What do I have to do to keep the device
around?

--
Wil Hatfield


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Partitioning on existing system

2006-04-09 Thread Lowell Gilbert
Wil Hatfield [EMAIL PROTECTED] writes:

  Thanks for the great kick in the right direction. Is it really
  this easy? I
  guess so cause it is working. I dropped in a helloworld script, chmoded it
  and even as root I couldn't run it. Supreme!
 
  mdmfs -M -o noexec,nosuid -s 100m md0 /tmp
  chmod 1777 /tmp
 
 
 Ahhh crud! I guess it isn't that easy. After a reboot the old /tmp comes
 back with executable permissions. What do I have to do to keep the device
 around?

tmpmfs and related variables in rc.conf(5).
By default it does a memory-backed disk instead of file-backed, but
that can be adjusted.

Personally, I find memory-backed /tmp to be more useful anyway.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Partitioning on existing system

2006-04-09 Thread Wil Hatfield
 tmpmfs and related variables in rc.conf(5).
 By default it does a memory-backed disk instead of file-backed, but
 that can be adjusted.
 
 Personally, I find memory-backed /tmp to be more useful anyway.

tmpmfs=YES
tmpsize=100m
tmpmfs_flags=-S -M -o noexec,nosuid

Is there something wrong with this because it isn't creating a /tmp at all.

Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 6.1-PRERELEASE #4: Mon Apr  3 22:25:51 PDT 2006


--
Wil Hatfield

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Partitioning on existing system

2006-04-09 Thread Wil Hatfield
 tmpmfs=YES
 tmpsize=100m
 tmpmfs_flags=-S -M -o noexec,nosuid

 Is there something wrong with this because it isn't creating a
 /tmp at all.

 Copyright (c) 1992-2006 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 The Regents of the University of California. All rights reserved.
 FreeBSD 6.1-PRERELEASE #4: Mon Apr  3 22:25:51 PDT 2006

Ok, I am going to solve my own problem just for search engine food.

Aside from adding the rc.conf variables there has to also be a /tmp folder
in the first place. I don't know why. I would figure that if needed that
that would be part of the boot scripts. But it isn't, so for us tmpmfs
newbies:

Create an empty /tmp folder

Add the following to rc.conf:
tmpmfs=YES
tmpsize=50m
tmpmfs_flags=-S -M -o noexec,nosuid
clear_tmp_enable=YES

reboot

--
Wil Hatfield


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Partitioning on existing system

2006-04-09 Thread Chad Leigh -- Shire.Net LLC


On Apr 9, 2006, at 3:05 AM, Wil Hatfield wrote:


Thanks for the great kick in the right direction. Is it really
this easy? I
guess so cause it is working. I dropped in a helloworld script,  
chmoded it

and even as root I couldn't run it. Supreme!

mdmfs -M -o noexec,nosuid -s 100m md0 /tmp
chmod 1777 /tmp



Ahhh crud! I guess it isn't that easy. After a reboot the old /tmp  
comes
back with executable permissions. What do I have to do to keep the  
device

around?


you have to have a startup script that will mount it for you.

Chad



--
Wil Hatfield


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Partitioning on existing system

2006-04-08 Thread Dhénin Jean-Jacques
I don't see what the trouble. If you want a /tmp directory on a disk,
just do :

$ cd /foo# the disk you want, may be /
$ mkdir /tmp

Thats all.

2006/4/9, Wil Hatfield [EMAIL PROTECTED]:
 Ok I screwed up on one of my machines and forgot to put the /tmp directory
 on its own slice. How can I do this on an existing system? Linux has this
 procedure. Anything like it for FreeBSD?

 dd if=/dev/zero of=tmpMnt bs=1024 count=10
 /sbin/mke2fs /dev/tmpMnt
 cd /
 cp -R /tmp /tmp_backup
 mount -o loop,noexec,nosuid,rw /dev/tmpMnt /tmp
 chmod 1777 /tmp
 cp -R /tmp_backup/* /tmp/
 rm -rf /tmp_backup

 Any help is greatly appreciated.

 --
 Wil Hatfield




 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]



--
jjd
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Partitioning on existing system

2006-04-08 Thread Chad Leigh -- Shire.Net LLC


On Apr 8, 2006, at 9:57 PM, Wil Hatfield wrote:

Ok I screwed up on one of my machines and forgot to put the /tmp  
directory
on its own slice. How can I do this on an existing system? Linux  
has this

procedure. Anything like it for FreeBSD?

dd if=/dev/zero of=tmpMnt bs=1024 count=10
/sbin/mke2fs /dev/tmpMnt
cd /
cp -R /tmp /tmp_backup
mount -o loop,noexec,nosuid,rw /dev/tmpMnt /tmp
chmod 1777 /tmp
cp -R /tmp_backup/* /tmp/
rm -rf /tmp_backup


this appears that you want a file backed image file mounted as your / 
tmp.  This should be easy to do.  Read the handbook for file-backed md 
(4) devices.


I don't use them for /tmp but I run them with jails...  I have about  
60 such image files mounted now for example


Read the handbook on md(4) devices and look up mdconfig(8) in the man  
pages


Chad



Any help is greatly appreciated.

--
Wil Hatfield




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


---
Chad Leigh -- Shire.Net LLC
Your Web App and Email hosting provider
chad at shire.net



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]