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 6th August 2008
chris chris is offline
Port Guard
 
Join Date: May 2008
Location: United Kingdom
Posts: 35
Thanked 6 Times in 3 Posts
Default Jails - mount: /usr/home: No such file or directory

Hi Guys,
Just setup a jail using this guide. I decided to locate my jail at /home/jail/irc rather than /usr/jail/irc because i have more space there. I've got to the step where i fire it up...

Code:
root# /bin/sh /etc/rc
...
Configuring jails:.
Starting jails:df: /usr/home/jail/irc/dev: No such file or directory
mount: /usr/home: No such file or directory
/etc/rc: WARNING: devfs_domount(): Unable to mount devfs on /usr/home/jail/irc/dev
/etc/rc: WARNING: devfs_mount_jail: devfs was not mounted on /usr/home/jail/irc/dev
cd: can't cd to /usr/home/jail/irc/dev
 cannot start jail "irc":
Here's the output of df;
Code:
root# df
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/ad4s1a   5156012  2895792   1847740    61%    /
devfs               1        1         0   100%    /dev
/dev/ad4s1b 703931506 -1119932 648736918    -0%    /home
procfs              4        4         0   100%    /proc
devfs               1        1         0   100%    /var/named/dev
When i create a sym link from /usr/home -> /home the jail still fails to start and says something about parent being a sym link. So, do i have to re-partition the hard disk to move /home/ to /usr/home/ or is there a quicker way of doing this?

Thanks,

Chris
Reply With Quote
  #2   (View Single Post)  
Old 6th August 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

At very least, it looks like you forgot to mount devfs. Post your jail-related rc.conf entries (on the host) for us to review.
__________________
Kill your t.v.
Reply With Quote
  #3   (View Single Post)  
Old 6th August 2008
Eam404 Eam404 is offline
Port Guard
 
Join Date: May 2008
Posts: 21
Thanked 1 Time in 1 Post
Default

Please post the correct configs

Personally I use ezjail and have never looked back -- any particular reason you decided to use the traditional method?
Reply With Quote
  #4   (View Single Post)  
Old 6th August 2008
chris chris is offline
Port Guard
 
Join Date: May 2008
Location: United Kingdom
Posts: 35
Thanked 6 Times in 3 Posts
Default

Code:
root# cat /etc/rc.conf
...
# Jails - general
jail_set_hostname_allow="NO"
jail_enable="YES"
jail_list="irc"
jail_interface="re0"
jail_devfs_enable="YES"
jail_procfs_enable="YES"
# Jails - specific
jail_irc_rootdir="/usr/home/jail/irc"
jail_irc_hostname="jail0.domain.com"
jail_irc_ip="x.x.250.143"
#jail_irc_devfs_ruleset="jail_ruleset"
jail_irc_devfs_ruleset="devfsrules_jail"
It seems strange to me that i'm seeing devfs try to mount /usr/home rather than just /home, i guess because the 'normal' fstab setup for freebsd would be /home symlinking to /usr/home ?
Reply With Quote
  #5   (View Single Post)  
Old 6th August 2008
anomie's Avatar
anomie anomie is offline
Local
 
Join Date: Apr 2008
Location: Texas
Posts: 446
Thanked 69 Times in 46 Posts
Default

I may be missing something, but I am confused about how the author of that article is starting up the jail. Instead, can you try:
# /etc/rc.d/jail start

Your rc.conf entries look ok, BTW. (It may not be necessary to start procfs, though, depending on what you're doing.)

-------- edit ----------------

I just took a closer look at your df output. (I didn't read carefully enough the first time.) What in the world is going on with that /home filesystem?

Quote:
Originally Posted by chris
i guess because the 'normal' fstab setup for freebsd would be /home symlinking to /usr/home ?
Normally /home is a symlink to /usr/home.
__________________
Kill your t.v.

Last edited by anomie; 6th August 2008 at 10:24 PM.
Reply With Quote
  #6   (View Single Post)  
Old 6th August 2008
chris chris is offline
Port Guard
 
Join Date: May 2008
Location: United Kingdom
Posts: 35
Thanked 6 Times in 3 Posts
Default

Dear oh dear i made such a silly error, I can't believe i took so long to realise

Code:
# Jails - specific
jail_irc_rootdir="/usr/home/jail/irc"

should be

jail_irc_rootdir="/home/jail/irc"
*sighs*
Thx guys lol

---Edit---

Yeah anomie i was also surprised to see /home/ existing rather than /usr/home, I don't know if that was the default for FreeBSD 7.0-Release (unlikely) or weather the data center configured it that way for some reason.

Last edited by chris; 6th August 2008 at 10:31 PM.
Reply With Quote
  #7   (View Single Post)  
Old 6th August 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
 
Join Date: Apr 2008
Location: Eindhoven, Netherlands
Posts: 2,088
Thanked 198 Times in 156 Posts
Default

/var is also MIA, and so is /usr.

This is a typical Linux layout.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
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
strange "~" directory in home directory gosha OpenBSD General 5 23rd February 2009 06:12 PM
FTP users sharing same home directory phreud FreeBSD General 6 11th November 2008 10:11 PM
jails, aliasing, router, and dmz? neurosis FreeBSD Security 17 7th November 2008 03:47 AM
NFS mount /usr/home? giddyupman FreeBSD General 1 1st September 2008 07:06 PM
Jails, ezjail, apache, very newbie question. neurosis FreeBSD General 15 23rd August 2008 01:38 PM


All times are GMT. The time now is 05:46 PM.


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