For this, first step is to bind and export devcmd2. In my case, devcmd2 is automatically mounted at /cmd2 location. You can read previous blog for how to do this manually. Now for exporting this filesystem, use following command.
styxlisten -A tcp!*!6666 export /cmd2
And you are done!!!
Any inferno system that wants to mount this filesystem can do it by following command.
mount -A tcp!127.0.0.1!6666 /mpoint
This command mounts the filesystem exported at address tcp!122.0.0.1!6666 on location /mpoint. -A disables any authentication as we are not using any.
Now lets execute commands on remote inferno filesystem.
; cd mpoint
; ls
local
; cd local
; ls
arch clone env fs ns status
; cat clone
0
; cd 0
; ls
args ctl env ns status stderr stdin stdout wait
; echo exec hostname > ctl
; cat stdio
BlackPearl
;
Wow!!! We just executed remote command using Inferno.
This mounted filesystem can be unmounted by unmount command.
unmount /mpoint
Next step is to mount this inferno devcmd2 from Linux. For this you will need to install 9mount, which can be done as follows for debian/Ubuntu based systems.
sudo apt-get install 9mount
And, now use following command to mount it.
9mount 'tcp!127.0.0.1!6666' mpoint
You can unmount this filesystem by
9umount mpointcommand. But before unmounting it, lets try and execute some remote commands using this mount point.
$ cd mpoint
$ cd local
$ ls
arch clone env fs ns status
$ cat clone
0
$ cd 0
$ ls
args ctl env ns status stderr stdin stdio stdout wait
$ echo exec hostname > ctl
bash: ctl: Unknown error 526
$ cat stdio
$ cat stderr
$ cat status
cmd/0 0 Closed /usr/share/lxr/source/inferno//ericvh-brasil/ ''
Well, this is bad news as I am not able to execute commands on inferno from Linux. I also tested with devcmd filesystem, but it gave same error.
bash: ctl: Unknown error 526
Somehow, ctl is not willing to accept commands when sent from sent from mount point on Linux. I don't know the reason behind it, but it seems some more work is needed on 9mount.
No comments:
Post a Comment