Reply
 
Thread Tools Display Modes
  #1  
Old 01-01-2013, 02:18 AM
gja gja is offline
Member
 
Join Date: Dec 2012
Location: Melbourne, Australia
Posts: 45
Thanks: 1
Thanked 4 Times in 4 Posts
Default Gentoo jail & epoll not supported
So, I've started experimenting with the Warden's ability to create Linux Jails under PCBSD 9.1 (x64, DVD install).

I created a Gentoo jail by selecting "gentoo-stage3-i486" in the Warden's creation dialog. All went fine, started the jail and launched a Terminal via the Warden.

Given that this is Gentoo I figure I need 'emerge' to install useful packages. Per http://www.gentoo.org/doc/en/handboo...ap=1#doc_chap1 I tried running 'emerge-webrsync' to kick things off. However, emerge-webrsync ultimately fails, apparently because python (inside the Gentoo jail) tries to use an epoll_create() syscall which FreeBSD (hosting the jail) doesn't support.

So I'm wondering if any one else has managed to get a useful Gentoo jail built via the Warden, where you can use emerge to install packages, etc?

Some more background:

The jail appeared to be created just fine, I could start it and open up a Terminal fine. It even looked linux-y inside:

Code:
  localhost / # uname -a
  Linux localhost 2.6.16 FreeBSD 9.1-RELEASE #2: Tue Nov 27 03:45:16 UTC 2012 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux
  localhost / #
  localhost / # cat /proc/version
  Linux version 2.6.16 (des@freebsd.org) (gcc version 4.2.1 20070831 patched [FreeBSD]) #4 Sun Dec 18 04:30:00 CET 1977
  localhost / #
The emerge-webrsync output inside my jail:

Code:
  localhost / # emerge-webrsync
  !!! Invalid PORTDIR_OVERLAY (not a dir): '/usr/portage'
  !!! main-repo not set in DEFAULT and PORTDIR is empty.
  Fetching most recent snapshot ...
  Trying to retrieve 20121231 snapshot from http://distfiles.gentoo.org ...
  Fetching file portage-20121231.tar.xz.md5sum ...
  Fetching file portage-20121231.tar.xz.gpgsig ...
  Fetching file portage-20121231.tar.bz2.md5sum ...
  Fetching file portage-20121231.tar.gz.md5sum ...
  20121231 snapshot was not found
  Trying to retrieve 20121230 snapshot from http://distfiles.gentoo.org ...
  Fetching file portage-20121230.tar.xz.md5sum ...
  Fetching file portage-20121230.tar.xz.gpgsig ...
  Fetching file portage-20121230.tar.bz2.md5sum ...
  Fetching file portage-20121230.tar.bz2.gpgsig ...
  Fetching file portage-20121230.tar.bz2 ...
  Checking digest ...
  Getting snapshot timestamp ...
  Syncing local tree ...

  Number of files: 160084
  Number of files transferred: 136203
  Total file size: 267.83M bytes
  Total transferred file size: 267.83M bytes
  Literal data: 267.83M bytes
  Matched data: 0 bytes
  File list size: 4.07M
  File list generation time: 0.002 seconds
  File list transfer time: 0.000 seconds
  Total bytes sent: 126.14M
  Total bytes received: 2.68M

  sent 126.14M bytes  received 2.68M bytes  1.68M bytes/sec
  total size is 267.83M  speedup is 2.08
  Cleaning up ...
  Traceback (most recent call last):
    File "/usr/lib/portage/bin/emerge", line 48, in <module>
      retval = emerge_main()
    File "/usr/lib/portage/pym/_emerge/main.py", line 1021, in emerge_main
      gc_locals=locals().clear)
    File "/usr/lib/portage/pym/_emerge/actions.py", line 3436, in run_action
      _global_updates(trees, mtimedb["updates"], quiet=("--quiet" in myopts)):
    File "/usr/lib/portage/pym/portage/_global_updates.py", line 41, in _global_updates
      quiet=quiet, if_mtime_changed=if_mtime_changed)
    File "/usr/lib/portage/pym/portage/_global_updates.py", line 46, in _do_global_updates
      portdb = trees[root]["porttree"].dbapi
    File "/usr/lib/portage/pym/portage/util/__init__.py", line 1374, in __getitem__
      result = lazy_item.func(*pargs, **kwargs)
    File "/usr/lib/portage/pym/portage/dbapi/porttree.py", line 1013, in __init__
      self.dbapi = portdbapi(mysettings=settings)
    File "/usr/lib/portage/pym/portage/dbapi/porttree.py", line 99, in __init__
      self._event_loop = EventLoop(main=False)
    File "/usr/lib/portage/pym/portage/util/_eventloop/EventLoop.py", line 67, in __init__
      self._poll_obj = _epoll_adapter(select.epoll())
  IOError: [Errno 38] Function not implemented
  localhost / #

The related /var/log/messages output outside my jail:

Code:
	  [..]
  Jan  1 12:40:36 gjadesktop kernel: linux: pid 8598 (python3.2): syscall pipe2 not implemented
  Jan  1 12:40:37 gjadesktop kernel: linux: pid 8598 (python3.2): syscall prlimit64 not implemented
  Jan  1 12:40:37 gjadesktop kernel: linux: pid 8598 (python3.2): syscall epoll_create not implemented
http://wiki.freebsd.org/linux-kernel suggests that epoll_* is not supported in FreeBSD (yet?) so it seems we are at an impasse.

Anyone care to point out what I'm missing? (I did a straightforward PCBSD 9.1 DVD installation, no custom tweaks or mods... so far!)

Last edited by gja; 01-01-2013 at 08:14 PM. Reason: Missing URL
Reply With Quote
The Following User Says Thank You to gja For This Useful Post:
Cousk1982 (09-29-2013)
  #2  
Old 01-27-2013, 02:08 PM
bpaddock bpaddock is offline
Junior Member
 
Join Date: Jan 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by gja View Post
So, I've started experimenting with the Warden's ability to create Linux Jails under PCBSD 9.1 (x64, DVD install).

I created a Gentoo jail by selecting "gentoo-stage3-i486" in the Warden's creation dialog. All went fine, started the jail and launched a Terminal via the Warden.

Given that this is Gentoo I figure I need 'emerge' to install useful packages. Per http://www.gentoo.org/doc/en/handboo...ap=1#doc_chap1 I tried running 'emerge-webrsync' to kick things off. However, emerge-webrsync ultimately fails, apparently because python (inside the Gentoo jail) tries to use an epoll_create() syscall which FreeBSD (hosting the jail) doesn't support.

So I'm wondering if any one else has managed to get a useful Gentoo jail built via the Warden, where you can use emerge to install packages, etc?

http://wiki.freebsd.org/linux-kernel suggests that epoll_* is not supported in FreeBSD (yet?) so it seems we are at an impasse.

Anyone care to point out what I'm missing? (I did a straightforward PCBSD 9.1 DVD installation, no custom tweaks or mods... so far!)

Did you ever get a Gentoo jail to work? Seeing that Gentoo was listed as a supported Jail, was a selling point to make me try PC-BSD. Finding that Gentoo has apparently never been tested, makes me wonder if I should reconsider using PC-BSD? As I had been using Gentoo for years, and wanted to give PC-BSD a try on a new box.
Reply With Quote
  #3  
Old 01-29-2013, 08:08 PM
gja gja is offline
Member
 
Join Date: Dec 2012
Location: Melbourne, Australia
Posts: 45
Thanks: 1
Thanked 4 Times in 4 Posts
Default
Sadly, I've not spent any more time on the Gentoo Jail. I was hoping whomever put Gentoo Jails into PCBSD 9.1 would chime in to point out where I'd gone wrong
Reply With Quote
  #4  
Old 01-29-2013, 10:52 PM
bpaddock bpaddock is offline
Junior Member
 
Join Date: Jan 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by gja View Post
Sadly, I've not spent any more time on the Gentoo Jail. I was hoping whomever put Gentoo Jails into PCBSD 9.1 would chime in to point out where I'd gone wrong
Me too.

Also the i486 jail is unlikely to work on a AMD64 arch.

When installing Gentoo the host and the target chroot for building need to be the same arch or it won't boot when you leave the chroot for the real world, on the first boot. Don't know how this plays into BSD Kernel being used.

Has anyone gotten Gentoo running in PC-BSD?

If Gentoo's emerge command doesn't work due to the lack of epoll, I'd remove it from the list of workable jailes before the next PC-BSD release.
Reply With Quote
  #5  
Old 02-11-2013, 11:04 PM
earthy earthy is offline
Junior Member
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default
I never used webrsync for install.Instead I downloaded a portage snapshot as was described in the handbook before.Then some geniuses decided they could simplify things by complicating them.
http://www.gossamer-threads.com/lists/gentoo/dev/263417

What idiots.

I found this and am trying it out as we speak.

https://wiki.sabayon.org/index.php?t...g_Linux_system
This should be done right after stage3* unpacking and to dir /mnt/gentoo/usr
Use tar xvpjf if u wanna see what is going on.
At least emerge --sync is working
I will post if something fails
Reply With Quote
  #6  
Old 02-14-2013, 08:18 AM
gja gja is offline
Member
 
Join Date: Dec 2012
Location: Melbourne, Australia
Posts: 45
Thanks: 1
Thanked 4 Times in 4 Posts
Default
Some more data points....

@bpaddock -- "gentoo-stage3-i486" gentoo jail does appear to 'work' on my x64 (amd64) PCBSD 9.1 so long as I'm not running commands needing epoll_* support from the underlying linuxulator. In other words, the simple things (like 'ls', 'cd', etc...) all work inside the gentoo jail even though they appear to be 32-bit executables.

Code:
localhost / # uname -a
Linux localhost 2.6.16 FreeBSD 9.1-RELEASE #2: Tue Nov 27 03:45:16 UTC 2012 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux
localhost / #
localhost / # ls
bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  sys  tmp  usr  var
localhost / #
localhost / # file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
localhost / #
@earthy -- I wish 'emerge --sync' worked inside my gentoo jail. It relies on epoll_* support too, and just barfs immediately.

@${pcbsd_deity} -- Since no-one has stepped up to explain why the Gentoo Jail option was added to the Warden, I agree with bpaddock that it ought to be removed before PCBSD 9.2.
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


All times are GMT. The time now is 04:07 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.