kldload linprocfs for MineOS

Status
Not open for further replies.

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
Hello everyone!

I am trying to installing MineOS which needs "kldload linprocfs".
It returns me this though:
kldload: can't load linprocfs: Operation not permitted
How can I get permissions do execute this command in a standard jail?

Thanks!
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
You can't kldload kernel modules in a jail. You need to run the the command outside the jail (the host and the jails share the same kernel).
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
Good to know!

Ok so I have this bit of code to execute:
echo 'linprocfs_load="YES"' >> /boot/loader.conf
kldload linprocfs
mkdir -p /usr/compat/linux/proc
mount -t linprocfs linprocfs /usr/compat/linux/proc
echo 'linproc /usr/compat/linux/proc linprocfs rw 0 0' >> /etc/fstab
I am logged on the main system as root via SSH.

When I try to execute the first line I get a
# echo 'linprocfs_load="YES"' >> /boot/loader.conf
/boot/loader.conf: Read-only file system.
I am logged in as root though. Is it safe for me to fiddle with the permissions of that file? How do I change a file that is not writable when I am root. There is nothing greater then root priveleges if I am correct.

When executing the second line I get
# kldload linprocfs
kldload: can't load linprocfs: File exists
I have no clue on how to fix this.

Third line returns
# mkdir -p /usr/compat/linux/proc
mkdir: /usr/compat: Read-only file system
Again, is it safe for me to force the main system so I can make this folder?


I can not execute the rest of the lines untill I can make the lines above work.

Thanks for the help!


Edit: I am folowing this guide: http://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS_(pkg_add)
I executed everything under the linprocfs bit. If I start the minecraft service I get this:
# service minecraft restart
Traceback (most recent call last):
File "mineos_console.py", line 125, in <module>
for i in mc.list_servers_up():
File "/usr/local/games/minecraft/mineos.py", line 1290, in list_servers_up
pids = dict(pid_cmdline())
File "/usr/local/games/minecraft/procfs_reader.py", line 34, in pid_cmdline
for pid in pids():
File "/usr/local/games/minecraft/procfs_reader.py", line 27, in pids
return set(int(pid) for pid in os.listdir(_procfs) if pid.isdigit())
NameError: global name '_procfs' is not defined
starting WolfCRAFT... global name '_procfs' is not defined
I am quite sure that is the result of the missing linprocfs.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
You don't need to do anything. FreeNAS already mounts procfs in every jail.
I tried the steps you linked and it worked -- the server started. You probably broke something when you tried to force procfs. Try a fresh jail, but do not execute anything from the linprocfs section.
 

efstone

Cadet
Joined
Jan 14, 2014
Messages
3
You don't need to do anything. FreeNAS already mounts procfs in every jail.
I tried the steps you linked and it worked -- the server started. You probably broke something when you tried to force procfs. Try a fresh jail, but do not execute anything from the linprocfs section.
I'm having the exact same problem. There's got to be something more to this. /proc exists within the jail and I see several things in there. I've been using MineOS for awhile on another system and it works great. (CentOS) But here...there are some real problems. Profiles can't be edited (for permissions reasons) even when logging in as root. So strange.
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
Yep, that's what I am struggeling with. I tought it had something to do with linproc. If it is already mounted in every jail and working, I am thinking the problem might be permissions. Altough I have tried giving the profile.config every permission there is, logged in as root or a user, the profiles are not editable. There is no "Group Ownership" and the created servers do not show (I can not create a new server with the same name though).
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
Hello again!

I updated freenas to the latest 9.2.1.2 Release and got rid of my previous atempt to install MineOS.

So starting off with a fresh jail, I skipped the linproc bit and went to the end with no hickup. Only when I try to start the minos service, I get
/usr/local/etc/rc.d/mineos: WARNING: run_rc_command: cannot run /usr/local/bin/python

All I can find is that run_rc_command has something to do with the services. I do not know
Python is installed, that I do know. If it is configured correctly, I do not.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hello again!

I updated freenas to the latest 9.2.1.2 Release and got rid of my previous atempt to install MineOS.

So starting off with a fresh jail, I skipped the linproc bit and went to the end with no hickup. Only when I try to start the minos service, I get


All I can find is that run_rc_command has something to do with the services. I do not know
Python is installed, that I do know. If it is configured correctly, I do not.
pkg install python

EDIT1
hmm, actually their instructions for freebsd ree a bit outdated. they use pkg_add. I think in going to play with this program a bit, I have an Ubuntu gameserver and this might help me switch it to freebsd.

EDIT2
Got this thing running. Wow, it's pretty sweet. Think I should be able to make a plugin for this =]
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
That would be sweet!

In the meantime, can you tell me what you did exactly? Do you know what I am doing wrong?

Thanks!
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That would be sweet!

In the meantime, can you tell me what you did exactly? Do you know what I am doing wrong?

Thanks!
the init script provided doesn't take into account the recent addition of Python meta packages. unless you have Python installed then bin/python doesn't exist.

and linprocfs does need to be mounted unfortunately. I should have a pbi complete this weekend. worked on this all last night.
 

Yaguznal

Explorer
Joined
Dec 23, 2013
Messages
63
You are my hero Joshua! Looking forward to it!

If you want me to test run this for you, drop me a line :)
 
Status
Not open for further replies.
Top