9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] searching advice
@ 2021-04-11 21:59 ibrahim.a.71 via 9fans
  2021-04-12  7:49 ` Anthony Sorace
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: ibrahim.a.71 via 9fans @ 2021-04-11 21:59 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

Hi 9fans,

I'm currently trying plan9. During my test phase I installed 9legacy on qemu.  Everythings works fine but I couldn't master to exchange files with my host system (linux). I tried a virtfs, virtual fat drives an ext image and failed mounting the filesystem in plan9

I would prefer ext2 as a shared partition :

I tried

ext2srv
mount -c /srv/ext2 /n/hostfs /dev/sdD0

and this results in an error message :
mount: mount /n/hostfs : no file system device specified

I looked in the man pages and on internet but couldn't find an example for mounting a harddisk or a setup to share files between host and guest. 

Perhaps someone can point out how to exchange data using virtual harddisks or u9fs.

Thanks in advance
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T267dbe605a36a2f5-Mb78e6781515fa9e77abce599
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1747 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] searching advice
  2021-04-11 21:59 [9fans] searching advice ibrahim.a.71 via 9fans
@ 2021-04-12  7:49 ` Anthony Sorace
  2021-04-12 14:15 ` Mack Wallace
  2021-04-12 15:33 ` Skip Tavakkolian
  2 siblings, 0 replies; 5+ messages in thread
From: Anthony Sorace @ 2021-04-12  7:49 UTC (permalink / raw)
  To: 9fans

I can’t help too much with ext, but:

> mount -c /srv/ext2 /n/hostfs /dev/sdD0

That part’s almost certainly wrong. /dev/sdD0 will be a directory; ext2srv will expect you to give the file containing the actual file system. This is probably /dev/sdD0/<partition>.



------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T267dbe605a36a2f5-M8a4fd4cf31012cb4cf2143a0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] searching advice
  2021-04-11 21:59 [9fans] searching advice ibrahim.a.71 via 9fans
  2021-04-12  7:49 ` Anthony Sorace
@ 2021-04-12 14:15 ` Mack Wallace
  2021-04-12 15:33 ` Skip Tavakkolian
  2 siblings, 0 replies; 5+ messages in thread
From: Mack Wallace @ 2021-04-12 14:15 UTC (permalink / raw)
  To: 9fans

I recently stumbled through the process of compiling u9fs for a linux machine and then connecting to it from a 9front computer. Perhaps that will work?

u9fs is a program for linux / unix that allows plan 9 boxes to connect with 9fs. The source for it was in /sys/src/cmd/unix in the ‘labs version of Plan 9. I did not see it at that location in 9front and I don’t know if it is included, either on that distribution or on 9legacy. There is also a git site, https://github.com/unofficial-mirror/u9fs, which I recently used and seems to work. There are also some useful notes on how to set up u9fs in the Readme.md file in that git distribution.

For my distribution, modifying inetd.conf and services in /etc of the linux box is what was applicable. This may be different depending on your linux distribution.

in my inetd.conf I added the line:
u9fs    stream  tcp     nowait  root    /bin/9/u9fs     u9fs    -a none -u root

note: by using -a none -u root, anyone can 9fs into the linux box and have root access to your file system. I’ve just started out in a lab environment where I am not worried about that. If you look at the u9fs man page there are ways of better securing the connection.

in my services I added:
u9fs    564/tcp 9fs

After rebooting, (with the compiled u9fs in /bin/9/), I was then able to 9fs from the plan 9 box into the linux box.

Hope that helps. 



> On Apr 11, 2021, at 5:59 PM, ibrahim.a.71 via 9fans <9fans@9fans.net> wrote:
> 
> Hi 9fans,
> 
> I'm currently trying plan9. During my test phase I installed 9legacy on qemu.  Everythings works fine but I couldn't master to exchange files with my host system (linux). I tried a virtfs, virtual fat drives an ext image and failed mounting the filesystem in plan9
> 
> I would prefer ext2 as a shared partition :
> 
> I tried
> 
> ext2srv
> mount -c /srv/ext2 /n/hostfs /dev/sdD0
> 
> and this results in an error message :
> mount: mount /n/hostfs : no file system device specified
> 
> I looked in the man pages and on internet but couldn't find an example for mounting a harddisk or a setup to share files between host and guest. 
> 
> Perhaps someone can point out how to exchange data using virtual harddisks or u9fs.
> 
> Thanks in advance
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T267dbe605a36a2f5-Mb191e6cfc42886efe984282d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] searching advice
  2021-04-11 21:59 [9fans] searching advice ibrahim.a.71 via 9fans
  2021-04-12  7:49 ` Anthony Sorace
  2021-04-12 14:15 ` Mack Wallace
@ 2021-04-12 15:33 ` Skip Tavakkolian
  2021-04-12 19:30   ` ibrahim via 9fans
  2 siblings, 1 reply; 5+ messages in thread
From: Skip Tavakkolian @ 2021-04-12 15:33 UTC (permalink / raw)
  To: 9fans

what happens if you use mntgen first?

mntgen
ext2srv
mount -c ... # etc

On Sun, Apr 11, 2021 at 3:01 PM ibrahim.a.71 via 9fans <9fans@9fans.net> wrote:
>
> Hi 9fans,
>
> I'm currently trying plan9. During my test phase I installed 9legacy on qemu.  Everythings works fine but I couldn't master to exchange files with my host system (linux). I tried a virtfs, virtual fat drives an ext image and failed mounting the filesystem in plan9
>
> I would prefer ext2 as a shared partition :
>
> I tried
>
> ext2srv
> mount -c /srv/ext2 /n/hostfs /dev/sdD0
>
> and this results in an error message :
> mount: mount /n/hostfs : no file system device specified
>
> I looked in the man pages and on internet but couldn't find an example for mounting a harddisk or a setup to share files between host and guest.
>
> Perhaps someone can point out how to exchange data using virtual harddisks or u9fs.
>
> Thanks in advance
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T267dbe605a36a2f5-Mf64f1facbaf62f4b7420bfa3
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] searching advice
  2021-04-12 15:33 ` Skip Tavakkolian
@ 2021-04-12 19:30   ` ibrahim via 9fans
  0 siblings, 0 replies; 5+ messages in thread
From: ibrahim via 9fans @ 2021-04-12 19:30 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 3864 bytes --]

First of thank you for your replies and sorry that I couldn*t reply immediatly.

Anthony :

I forgot the partition part in the command cause plan9 didn't recognize the ext2 partition in a virtual drive created with fdisk from my linux command line. There where only the entries raw and ctl below /dev/sdD0 so I wasn't sure if they would appear after a mount from the device. It seems that virtual hard disks created with fdisk from linux command line are in some way misinterpreted. After creating it with a gparted out of a qemu session my data partition was recognized and I used your modified command. Thanks for your advice.

In the meantime I read also about u9fs and 9pfuse from plan9port and decided to give this feature a try cause this will eliminate the risks caused by write accesses from host and guest at the same time. 


Mack Wallace :

Thank you for your advice. That should really be the way to share data between host and guest over qemu because it will be portable to my real needs after this testing setup. Like you I'm about to port an educational kiosk app realized with Freebsd and X11 to plan9 after the licence conditions changed. So I have to do a lot of coding and even while I loved some ideas of acme it wouldn't be the right choice for my students to work with acme on software projects. So I want to port my full developer environment to plan9 including a rio substitute and a forked scintilla Editor with syntax highlightning. To do that I need to exchange data between host and guest on a live base and u9fs as well as 9pfuse seem to do a better job regarding synchronization. The more I read the more I like the ideas how the kernel and drivers are implemented and  of course 9p as the connecting glue. 

I'll try your u9fs advice parallel to the 9pfuse approach and share those information as an how to for my students and will be happy to mention your advice as well. I think that 9pfuse will make my live easier cause of the authentification demands of freebsd. I'll try this and reply ... thanks.


Skip Tavakkolian :

I didn't know this command thanks for reminding. The device was already recognized and the subfolders raw as well as ctl were present only the partitions on the drive weren't recognized and this was caused by the tool I used to create the virtual harddisk. 

For all who are interested fdisk from plan9 (9legacy) has a small but strong bug. While editing the partition table and trying to reset the changes a system crash ocured. 


Conclusion :

I'm really impressed about the fast and very good replies to my question. Thank you I'll keep you informed about how I did the communication between host and guest cause this is somewhat lacking in available documentation. Many developers will give plan9 after the licence change a try cause it is a real alternative to even BSD licenced open source projects.  To realize my kiosk setup with FreeBSD I have to supply an iso image for the last version with 1 GB while only using the kernel and xinit. The reasons are first of all the llvm infrastructure which has the largest size in the setup (320 MB and more) and X11 where the minimal setup requires 840 MB. By switching to plan 9 I estimate getting a working kiosk app  with a size of less than 128 MB while keeping the compiler suite and the protocols intact. Especially for people who need a general setup of computers in lessons this licence change opened up many possibilities. So a live exchange of data between developer systems during the modification time of userland software and windowing system is unavoidable.

Thanks for your replies.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T267dbe605a36a2f5-Me7e86568d604d2c1428f0174
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 4825 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-12 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 21:59 [9fans] searching advice ibrahim.a.71 via 9fans
2021-04-12  7:49 ` Anthony Sorace
2021-04-12 14:15 ` Mack Wallace
2021-04-12 15:33 ` Skip Tavakkolian
2021-04-12 19:30   ` ibrahim via 9fans

9fans - fans of the OS Plan 9 from Bell Labs

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9fans 9fans/ http://inbox.vuxu.org/9fans \
		9fans@9fans.net
	public-inbox-index 9fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git