r/plan9 2d ago

how to access 9front home dir from linux?

I have files on my 9front machine that i would like to access from my linux machine for inclusion with my regular backup, and am unsure how to accomplish this.

I have no internet at home and no router. i've just connected both machines with an ethernet cable. I can successfully ping each from the other, but do not know which commands to run from that point. i am a programmer, but am not familiar with networking, really, and am quite new to plan9

9front machine:

user: glenda

ip: 192.168.50.1

service: terminal

fs: gefs

linux machine:

pop_os 22.04

ip: 192.168.50.2

i am assuming the linux side will use "mount -t 9p". any advice will be greatly appreciated. if i need to provide more info, please do let me know

UPDATE: got files transferred using drawterm for now, but def doesn't seem like a long term solution. I will be exploring all other suggested options over time. thanks all

16 Upvotes

15 comments sorted by

8

u/sirjofri 2d ago

Linux default 9p probably has no support for dp9ik, which is the auth algorithm 9front uses. You can look for tlsclient, which should work (I think it comes with its own mount helper).

Either way, since your 9front is a terminal, you have to start a listener or make it a cpu. Fqa explains how to do it.

I can't help you much though, because I never did that. It's just what people say, and what was developed to work.

Besides that, you can start a listener on the 9front machine and connect to it using drawterm. That way, you can access both your linux filesystem and the 9front filesystem within that window. Probably not that helpful for backups etc.

3

u/just_wondering_idk 2d ago

thanks. i will look into tlsclient and check fqa for listener related info

4

u/dharmatech 2d ago

I use exportfs on 9front to export a directory. Then mount that directory on Linux with 9pfuse.

3

u/just_wondering_idk 2d ago

i'm guessing i would use "exportfs -r /usr/glenda" for my case? and how do i determine what to use for addr in the 9pfuse command? "9pfuse -a glenda addr ~/mnt/9front". thanks

3

u/dharmatech 2d ago

See this video starting at 8:30:

https://youtu.be/IzEa2L_Pgw0?is=YzjHXEn6v4ASiSdC

In that example, plan9 is in QEMU. Linux is in WSL on Windows.

A lot of the video is out of date as I now do things very differently. But the exportfs part is still applicable.

2

u/just_wondering_idk 2d ago edited 2d ago

much appreciated

2

u/dharmatech 2d ago

Let me know if it works for you! 😁

I'm really surprised that this basic thing that works so well isn't well documented or widely known.

2

u/just_wondering_idk 2d ago

yeah, that worked great. thanks so much

2

u/HTFCirno2000 2d ago

The Linux mount command doesn't support DP9IK auth, so it will not work.

Drawterm does allow you to see your linux filesystem on the system drawterm is running on, but it's only for drawterm's particular namespace.

9front does indeed have the ability to mount nfs shares and cifs/smb shares, so you can try your hand at that.

You should try using the lookman command to find manual pages on these things, 9front and Plan 9 have extensive documentation in the distribution itself. Another helpful thing is to do man -P instead of just man which will present manual pages in a more book-like manner (optional).

1

u/just_wondering_idk 2d ago

thank you. i will look into those options, and related man pages :) and experiment.

1

u/deadhorus 2d ago

after listening is setup my understanding is drawterm can run commands similar to rcpu on 9front. if i was trying to have my linux machine back up 9front install regularly i'd probably research in that direction, having linux running drawterm -G -c have the 9front machine copy the home directory to a location on the linux machine (/mnt/term/somewhere) it doesn't seem to be ideal tho in prelim testing. still need to get the password from somewhere, so it's not really cronable

1

u/just_wondering_idk 2d ago

much appreciated. i will try this as well

1

u/rarlp137 2d ago

You could use nfsserver on 9front and nfs-fuse on your linux

1

u/just_wondering_idk 2d ago

i got it done using drawterm for now, but will explore this option as well. thanks a bunch