Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What would be the preferred way to mount linprocfs in a pot jail? #87

Open
0mp opened this issue Apr 30, 2020 · 2 comments
Open

What would be the preferred way to mount linprocfs in a pot jail? #87

0mp opened this issue Apr 30, 2020 · 2 comments
Labels

Comments

@0mp
Copy link
Contributor

0mp commented Apr 30, 2020

I'd like to run a Linux binary with Linuxulator in a pot jail and I need the Linux filesystems like linprocfs to be available in the pot.

What would be the preferred way to mount linprocfs in a pot jail? Is it out of the scope of the pot framework and should be handled manually by the admin?

@0mp 0mp added the feature label Apr 30, 2020
@pizzamig
Copy link
Collaborator

no, it's not out of scope, even if from inside you cannot load the Linuxulator module.
It could be possible to implement an attribute for those features, similarly to procfs and fdescfs

While waiting for those attributes to be implemented, there is a way to do everything you need automatically using hooks (feature not properly documented yet, but available).
Hooks are script that can be executed before/after start/stop in the host environment, outside the jail, that you can set using the set-hook command
Hooks are the ideal way to extend/customize the framework.

To proper support linuxulator in a jail, I guess all Linux related feature should be supported, like

  • linprocfs
  • linsysfs
  • linux.osname, linux.osrelease, linux.oss_version

Am I missing something?

@0mp
Copy link
Contributor Author

0mp commented May 7, 2020

no, it's not out of scope, even if from inside you cannot load the Linuxulator module.
It could be possible to implement an attribute for those features, similarly to procfs and fdescfs

Nice, that's good news.

While waiting for those attributes to be implemented, there is a way to do everything you need automatically using hooks (feature not properly documented yet, but available).

I've got one problem with hooks, however. How do I know from a hook script what is the path to my jail? So for example if I want to mount linprocfs in a jail, then I've got to know its "mount" path.

To proper support linuxulator in a jail, I guess all Linux related feature should be supported, like

* linprocfs

* linsysfs

* linux.osname, linux.osrelease, linux.oss_version

Am I missing something?

I am not sure, I've not played around with Linuxulator that much in a jail context. I just mounted desired filesystems manually to get the Folding@home client working (and it just worked!):

# fstab
linprocfs   /opt/pot/jails/fah/m/compat/linux/proc  linprocfs       rw,failok,noauto      0       0
linsysfs    /opt/pot/jails/fah/m/compat/linux/sys   linsysfs        rw,failok,noauto      0       0
tmpfs       /opt/pot/jails/fah/m/compat/linux/dev/shm  tmpfs   rw,mode=1777,failok,noauto       0       0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants