DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 30th August 2010
da1 da1 is offline
Fdisk Soldier
 
Join Date: Feb 2009
Location: Berlin, DE
Posts: 49
Default [SOLVED] - jail devfs.rules not loaded at boot

Hello fellas,

I have a 8.0-RELEASE, i386 box with 2 jails.

Here is my rc.conf:
Code:
jail_enable="YES"                                       # Set to NO to disable starting of any jails
jail_list="dns www"                                             # Space separated list of names of jails

jail_dns_rootdir="/jails/dns"                           # jail's root directory
jail_dns_hostname="dns"                                 # jail's hostname
jail_dns_ip="192.168.0.254"                             # jail's IP address
jail_dns_devfs_enable="YES"                             # mount devfs in the jail
jail_dns_devfs_ruleset="dns_ruleset"                    # devfs ruleset to apply to jail
jail_dns_exec_start="/bin/sh /etc/rc"                   # command to execute in jail for starting
jail_dns_exec_stop="/bin/sh /etc/rc.shutdown"           # command to execute in jail for stopping

jail_www_rootdir="/jails/www"                           # jail's root directory
jail_www_hostname="www"                                 # jail's hostname
jail_www_ip="192.168.0.253"                             # jail's IP address
jail_www_devfs_enable="YES"                             # mount devfs in the jail
jail_www_devfs_ruleset="www_ruleset"                    # devfs ruleset to apply to jail
jail_www_exec_start="/bin/sh /etc/rc"                   # command to execute in jail for starting
jail_www_exec_stop="/bin/sh /etc/rc.shutdown"           # command to execute in jail for stopping
/etc/devfs.rules:
Code:
[www_ruleset=1]
add hide
add path null unhide
add path zero unhide
add path random unhide
add path urandom unhide
add path crypto unhide
add path stdin unhide
add path stdout unhide
add path stderr unhide

[dns_ruleset=2]
add hide
add path null unhide
add path zero unhide
add path random unhide
add path urandom unhide
add path crypto unhide
add path stdin unhide
add path stdout unhide
add path stderr unhide
df -h:
Code:
[...]
devfs                 1.0K    1.0K      0B   100%    /jails/dns/dev
devfs                 1.0K    1.0K      0B   100%    /jails/www/dev
[...]
The problem:
At boot, the devfs.rules rules are not loaded and if I drop into the jail and do a ls in /etc, I can see everything the host machine has. However, if I manually restart the jails, the devfs rules are loaded.

I tried putting the rules in /etc/defaults/devfs.rules too (and removed them from /etc/devfs.rules) but didn't work. The behavior is the same.


Am I doing something wrong here ?

Last edited by da1; 5th September 2010 at 09:59 AM.
Reply With Quote
  #2   (View Single Post)  
Old 5th September 2010
da1 da1 is offline
Fdisk Soldier
 
Join Date: Feb 2009
Location: Berlin, DE
Posts: 49
Default

SOLVED

I had the following in /etc/fstab:
Code:
devfs     /jails/www/dev     ufs     rw     0     0
devfs     /jails/dns/dev     ufs     rw     0     0
The OS was mounting the /jails/dns/dev folder before the jails were doing their stuff. my mistake.

Anyway, removing those entries from fstab fixed it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PF Rules for DoS chazz FreeBSD Security 3 14th July 2009 09:35 PM
Help with pf rules TerranAce007 OpenBSD General 4 16th January 2009 10:14 PM
ATH not loaded during boot time?? disappearedng FreeBSD General 4 14th July 2008 06:57 AM
iwi not loaded by OS leonardz OpenBSD General 3 4th June 2008 12:35 AM
Dual-boot laptop won't boot OpenBSD after upgrade to 4.3 kbeaucha OpenBSD Installation and Upgrading 17 30th May 2008 02:40 PM


All times are GMT. The time now is 02:07 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick