Installing ports on FreeNAS base system

Status
Not open for further replies.

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
SSH into the server and then run jexec (jail ID) tcsh and you will be in the root of the jail. Type exit to get back to the system shell.

You really should familiarize yourself with jails and jail management. It's all covered in the FreeBSD handbook.
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
SSH into the server and then run jexec (jail ID) tcsh and you will be in the root of the jail. Type exit to get back to the system shell.

You really should familiarize yourself with jails and jail management. It's all covered in the FreeBSD handbook.
Yea, I read through it. Someone seemed to think it was amusing that I was mentioning jexec, thats why I was wondering if it was the wrong way to do it.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Correct me if I'm wrong, but my impression is that the OP wants to be able to run a command that exists inside the jail, but actually have it run outside the jail. So he wants to be able to run a different shell in the main part of the system. I didn't think this was possible. It's like trying to install Top in a jail and running it from outside the jail and expecting to see all process (not just the jail processes).
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Correct me if I'm wrong, but my impression is that the OP wants to be able to run a command that exists inside the jail, but actually have it run outside the jail. So he wants to be able to run a different shell in the main part of the system. I didn't think this was possible. It's like trying to install Top in a jail and running it from outside the jail and expecting to see all process (not just the jail processes).

Try it. Works fine, assuming that there's no incompatibility with the running kernel.

As I originally suggested, installing the command on the pool and setting up an appropriate shell environment

ABSOLUTELY FRICKIN WORKS.

All this jail BS is ... BS.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
That's awesome! My bad.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
*grin* The files are just ... files. That you choose to run them inside a jail is not the base system's problem; it will happily run them not-in-jail too. You just have to execute them.

So the quick fix here is to create:

/mnt/poolname/bin/my-odd-shell-executable

Then either set the user's shell to that, or if maybe it won't let you, set it to /bin/csh and then a .login of "exec /mnt/poolname/bin/my-odd-shell-executable"

Whether or not this is a GOOD idea is completely debatable, and there's a reasonable argument to be made that this could lead to various forms of badness, depending on how much you're married to the idea of FreeNAS-as-an-appliance.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Am I missing out on something cool that can be done with my freenas CLI? I don't understand the need for this. I try to spend as little time as possible in the CLI of my freenas. I spend lots of time playing in jail CLI though.

Just wondering what the purpose really is for this.
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Correct me if I'm wrong, but my impression is that the OP wants to be able to run a command that exists inside the jail, but actually have it run outside the jail. So he wants to be able to run a different shell in the main part of the system. I didn't think this was possible. It's like trying to install Top in a jail and running it from outside the jail and expecting to see all process (not just the jail processes).

Yes, you are correct, that's what I was wondering about.


Am I missing out on something cool that can be done with my freenas CLI? I don't understand the need for this. I try to spend as little time as possible in the CLI of my freenas. I spend lots of time playing in jail CLI though.

Just wondering what the purpose really is for this.

First of all I like using zsh shell which isn't available on FreeNAS, I also use oh-my-zsh which is why I was mentioned it as well. I probably wouldn't install oh-my-zsh, but I was more wondering about whether or not it was possible to use it in that way.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Yes, you are correct, that's what I was wondering about.




First of all I like using zsh shell which isn't available on FreeNAS, I also use oh-my-zsh which is why I was mentioned it as well. I probably wouldn't install oh-my-zsh, but I was more wondering about whether or not it was possible to use it in that way.
I understand that. I use oh my zsh on all my computers. What i don't understand is what value it has on freenas. I spend so little time in my Freenas CLI that I didn't see that it was worth the trouble.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
*grin* The files are just ... files. That you choose to run them inside a jail is not the base system's problem; it will happily run them not-in-jail too. You just have to execute them.

So the quick fix here is to create:

/mnt/poolname/bin/my-odd-shell-executable

Then either set the user's shell to that, or if maybe it won't let you, set it to /bin/csh and then a .login of "exec /mnt/poolname/bin/my-odd-shell-executable"

Whether or not this is a GOOD idea is completely debatable, and there's a reasonable argument to be made that this could lead to various forms of badness, depending on how much you're married to the idea of FreeNAS-as-an-appliance.
Thanks for the clarification. I guess I was thrown off by the run 'jexec jailid commandname' conversations.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Yeah, there's a point at which we're just missing the OP's original intent, and that was the line. :smile:
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Yea, yer all grumpy bastards.
 

STREBLO

Patron
Joined
Oct 23, 2015
Messages
245
Status
Not open for further replies.
Top