# minix and plan9 in freebsd



## roelof (Aug 3, 2011)

Hello,

Is there a way I can have a minix kernel and plan 9 software on my FreeBSD 8 box ?

Regards,

roelof


----------



## fonz (Aug 3, 2011)

roelof said:
			
		

> Is there a way I can have a minix kernel and plan 9 software on my FreeBSD 8 box ?


If you did that, it wouldn't be much of a FreeBSD system anymore, would it?

Anyway, on a virtual machine (see emulators/virtualbox-ose for example) I suppose it's possible. But native? I doubt it. Most of the Plan 9 software was written specifically for Plan 9. You _might_ be able to port part of it to FreeBSD, but don't expect this to be a walk in the park. As for running a Minix kernel on a FreeBSD system, I seriously doubt that's gonna fly.

It might be a good educational exercise, though.

Fonz


----------



## roelof (Aug 4, 2011)

Hello, 

Thanks for the answer.
If I look into ports I see that plan 9 is ported to FreeBSD but I can't find any install instructions.

Roelof


----------



## SirDice (Aug 4, 2011)

Plan9 hasn't been ported to FreeBSD, it's development tools are available, nothing more, nothing less.

devel/plan9port

Minix and Plan9 are operating systems, not applications.


----------



## fonz (Aug 4, 2011)

roelof said:
			
		

> If I look into ports I see that plan 9 is ported to FreeBSD


As SirDice says: not the Plan 9 operating system, just the build environment.
`% cat /usr/ports/devel/plan9port/pkg-descr`

```
This is a port of the bulk of the Plan 9 software build environment to
Unix.  It tries to reproduce the Plan 9 build environment as faithfully
as possible, providing u.h and libc.h, and blithely redefining tokens
such as open, dup, and accept in order to provide implementations that
better mimic the Plan 9 semantics. The result is a more complicated and
less Unix-friendly environment, but Plan 9 programs can typically be
compiled with little or no changes.

The port includes the following:

  - Sources for Linux, FreeBSD, and SunOS

  - lib9 (nee libc), libString, libbin, libbio, libcomplete, libdraw,
    liblibflate, frame, libfs, libhtml, libhttpd, libip, libmux, libplumb,
    liblibregexp, libsec, thread, and libventi

  - 9term, acme, hoc, plumber, rio (nee 9wm), sam, and samterm, along with
    many small utilities and manual pages

  - Plan 9 bitmap fonts

WWW: http://swtch.com/plan9port/
```



			
				roelof said:
			
		

> but I can't find any install instructions.


As with any port:
`# cd /usr/ports/devel/plan9port`
`# make install clean`

Fonz


----------



## blstuart (Aug 4, 2011)

It kind of depends on what one means by development tools.  Plan9port (often called p9p) is a port of most of the Plan9 user-land with the primary exception being the compiler suite.  It still uses gcc for compiling, though it wraps it in a script that makes it look a lot like 8c and friends.  It includes an X11 window manager that works like rio (the Plan9 windowing system) and the bits needed to import and export Plan9 file systems.  On my FreeBSD laptop that's my primary user machine, I use those parts of p9p on a daily basis.

For running the Plan9 kernel at the same time as FreeBSD, I've had success with virtualbox (which has been mentioned) and qemu.  But the approach I use all the time is 9vx which is a port of the Plan9 kernel to a clever x86 semi-virtualization where the Plan9 kernel basically runs as a process on FreeBSD.  It's close enough to a real Plan9 kernel that at home I boot it up as a Plan9 terminal taking its root from my real Plan9 file server, and it runs the same user-land binaries as the file/CPU server.  At work, I boot it taking root from my local Mac file system.


----------



## fonz (Aug 4, 2011)

blstuart said:
			
		

> For running the Plan9 kernel at the same time as FreeBSD


If I understand correctly, the TS wishes to run Plan9 userland with a Minix kernel.

In any case, I suppose thanks are in order for your informative post.

Fonz


----------



## roelof (Aug 5, 2011)

hello, 

Everyone thanks for the help.
so part of my plan can work.

roelof


----------



## roelof (Aug 8, 2011)

Hello, 

I installed the plan 9 port but when I log out I don't see a choice between Gnome2 and Plan9 on gdm.
How can I do that so I have a choice ?

Roelof


----------

