You are not logged in.

#1 2010-03-13 23:20:49

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Arch inside an OpenSolaris branded zone

Hi,

Those of you who have OpenSolaris installed might be interested to learn that it turns out that Arch runs quite nicely inside it. (Open)Solaris has a facility called BrandZ which allows you to run Linux programs under Solaris, more or less analogously to the way you can run Windows programs under Linux using WINE. But judging from the OpenSolaris Web site, the people developing BrandZ are under the impression that support for distributions using the 2.6 kernel is not very good at this point. That's because the distributions they've tried are CentOS and Ubuntu (!), instead of a distribution that keeps it simple like Arch.

I've tried Arch under OpenSolaris, and it runs surprisingly well. (If you can call it Arch: Linux programs are run using the OpenSolaris kernel.) I've posted instructions on how to set things up on the OpenSolaris forums. You don't have to do a new install, since I've created a tarball with an already installed and configured Arch system.

Maybe someone here will want to try this out. If there's interest, I'll add a page about it to the Wiki.

One last note: most people here who have tried OpenSolaris have probably run it inside a virtual machine. That might work for this, but thinking about it makes my head spin a bit.

Last edited by herzen (2010-03-14 04:13:57)

Offline

#2 2010-03-16 05:53:27

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

I've posted a guide to how to install Arch in an OpenSolaris branded zone on the OpenSolaris Wiki.

Yes, OpenSolaris actually has a Wiki! But it never went anywhere. They could sure use the Arch Wiki as a model.

Offline

#3 2010-03-16 10:56:59

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

I don't quite understand it but it sounds pretty interesting.


neutral

Offline

#4 2010-03-16 21:45:00

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

sand_man wrote:

I don't quite understand it but it sounds pretty interesting.

There's not that much to understand. Since Linux and Solaris use different mechanism to enter the kernel, Linux binaries will not run on Solaris. A software layer is required that maps Linux system calls into Solaris system calls, and that's what BrandZ provides.

By the way, in my first post, I wasn't sure if running Arch in a Solaris branded container would work inside a virtual machine. Now I really don't see why it wouldn't. In fact, depending on your networking setup, it might be easier to get Arch to connect to the Internet in that case, since VirtualBox for example can provide NAT to its virtual machines.

One thing bothers me about Sun's BrandZ project: for Linux 2.6, it has concentrated on two Linux distros, Red Hat Enterprise Linux/CentOS and Ubuntu. I can understand concentrating on the former, since lots of enterprises use RHEL, and it is kind of the flagship of corporate Linux distros, and Solaris (but not OpenSolaris) is targeted at corporations. But concentrating on Ubuntu doesn't make any sense. Sure it's popular, but that's just the problem. People with better than average knowledge of Linux tend to despise it (even if people like Donald Knuth (!) use it) and hence avoid it, but who other than an "advanced" Linux user is going to play around with an exotic distro like OpenSolaris?

On top of that, the OpenSolaris Web site states that both X11 and the Ubuntu's package manager (which it gets from Debian) are broken under BrandZ. Under Arch however, just about everything works. (The major exception is audio, but that's a general Linux 2.6 as opposed to 2.4 problem.)

By not exploring Arch under BrandZ, Sun has given off the impression that BrandZ is much less useful than it actuall is. I for example was under the impression that recent Linux software doesn't work under it, until I tried installing Arch in a branded zone. (After I did that, I learned that people have gotten recent releases of Debian to work under BrandZ, but the official OpenSolaris site doesn't mention that, either.)

Offline

#5 2010-03-16 23:31:43

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Arch inside an OpenSolaris branded zone

Though it is pretty late here, I don't quite understand how this branded zone is supposed to work either.
Is it some mix between a virtual machine and binary compatability layer?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#6 2010-03-16 23:50:49

dcc24
Member
Registered: 2009-10-31
Posts: 732

Re: Arch inside an OpenSolaris branded zone

Seems interesting and exciting, but I don't quite understand the process either. Does this BrandZ act more like Qemu or wine? Or is it a mix of such software?


It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)

My AUR packages

Offline

#7 2010-03-17 00:19:45

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Arch inside an OpenSolaris branded zone

moljac024, dcc24: I believe the answer is here, http://en.wikipedia.org/wiki/Solaris_Containers .


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#8 2010-03-18 03:09:06

Vamp898
Member
From: 東京
Registered: 2009-01-03
Posts: 891
Website

Re: Arch inside an OpenSolaris branded zone

On FreeBSD there is something called linux-compat.

Is it something like that?

Offline

#9 2010-03-18 05:45:02

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

Vamp898 wrote:

On FreeBSD there is something called linux-compat.

Is it something like that?

It sounds more like a FreeBSD jail but with kernel emulation.


neutral

Offline

#10 2010-03-18 06:20:19

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Yes, Solaris Zones are analogous to a FreeBSD jail, and a non-native "brand" allows you to run programs intended for other kernels than the one in the global zone. I should have explained what zones are a bit.

FreeBSD lets you run Linux binaries by the way, although, having just looked over that link, it seems to me that that facility isn't integrated with jails, and that it focuses on individual Linux applications, as opposed to a whole Linux system without the Linux kernel. So Solaris's ability to run a Linux system inside itself by using Solaris's own kernel is more unique as far as the Unix world goes than I had thought.

Offline

#11 2010-03-18 10:43:06

mythus
Member
From: MS Gulf Coast
Registered: 2008-05-15
Posts: 509
Website

Re: Arch inside an OpenSolaris branded zone

It almost sounds like using this you could in effect have an Arch Solaris with Open Solaris. More integrated or whatever than a virtual machine and able to run entire functions of arch linux (such as pacman) than what something like wine would provide. Am I correct here?


Legends of Nor'Ova - role playing community devoted to quality forum-based and table-top role play, home of the Legends of Nor'Ova Core Rule Book and Legends of Nor'Ova: Saga of Ablution steam punk like forum based RPG

Offline

#12 2010-03-18 21:36:40

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Yes, I think you're right, if I understad you correctly. The FreeBSD facility for running Linux applications seems to be more like Wine in that both just run individual applications without creating a whole OS environment (excluding the kernel).

I don't understand the working of the Solaris Linux brand in any detail, but I do know that the Linux zone goes through its own boot and shutdown process (which is very quick). In Wine, you run Windows applications from a Linux shell. With BrandZ in contrast, from the Solaris global zone, you have to log into a shell in the Linux non-global zone, and run Linux applications in that shell. To run an X application, you use ssh with X11 forwarding. (I just tried running the Chromium browser but it doesn't work, because the Linux clone function hasn't been implemented in the lx26 brand.)

By the way, OpenSolaris is both a distribution and an OS, so it's a bit confusing. There's another distro of the OpenSolaris OS called Nexenta, which builds a Debian-based system on top of the OpenSolaris kernel. I haven't tried it, because I'm not fond of Debian and because I find OpenSolaris quite satisfactory, but Nexenta does seem to be under active development.

Someone could do with Arch what the Nexenta project is doing with Debian: now that would be what you call an Arch Solaris. But I don't really see what would be the point. I think you get just about all the functionality of Arch you need, that OpenSolaris doesn't give you yet, in the way I've described here, with BrandZ.

Still, I wish the lx26 brand were more actively developed and promoted. For example, sound works on the more fully implemented brand for Linux 2.4, but not on lx26. Also, apparently NFS doesn't work under lx26 (which Sun calls "experimental"), but it does under lx 2.4. I get the feeling that Sun is hoping that Linux hackers will pick up the slack when it comes to lx26 development.

Edit: I just tried the latest beta release of Nexenta, and it is totally broken, when it comes to a GUI, anyway. I don't see why Sun still even bothers linking to Nexenta's Web site on the OpenSolaris.org pages: it must be a personal or political thing. I also don't understand where Nexenta is getting the money that is keeping it afloat, since the project is obviously misconceived and doomed.

Last edited by herzen (2010-03-19 03:36:40)

Offline

#13 2010-05-02 02:45:27

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

I decided to give this a shot but I'm having a problem creating the zone.

ty@opensolaris:~# zonecfg -z arch
arch: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:arch> create -t SUNWlx26
zonecfg:arch> set zonepath=/zones/arch
zonecfg:arch> add net
zonecfg:arch:net> set address=192.168.1.111/24
zonecfg:arch:net> set physical=e1000g0
zonecfg:arch:net> set defrouter=192.168.1.254
zonecfg:arch:net> end
zonecfg:arch> commit
arch: unknown brand.

arch: Invalid document
zonecfg:arch>

neutral

Offline

#14 2010-05-02 03:28:26

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Ah,  I guess that when I wrote my instructions, I was assuming that the reader had already played around with the mature Linux brand, for 2.4 kernels. I'll have to fix my guide.

My guess is that you don't have the lx brand installed.

This is what happens when I check whether it's installed:

user@osol:~$ pkg list lx
NAME (PUBLISHER)                              VERSION         STATE      UFOXI
system/zones/brand/lx                         0.5.11-0.134    installed  -----

If instead, pkg reports that no such package is installed, then that's your problem.

pfexec pkg install lx

should install it in that case; if it doesn't, type the complete name of the package, as given by the output above, instead of just "lx".

I'm running snv_134, the last development release that Sun has released publicly. I believe package names changed with this release, and that the lx brand package used to be called something else, probably "SUNWlx". You can see what release you're running with "cat /etc/release". If you're running an earlier release (but it must be fairly recent), use

pkg list -a *lx*

to find what the name of the lx brand package is for that release.

Offline

#15 2010-05-03 01:29:05

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

Thanks it seems to work ok.
Just having a bit of trouble with the networking side of things.

How can I go back and edit those settings?

Never mind. I know how to change them, just need to work out how to do this since I can't just assign the brand an IP on a dhcp network. Am I forgetting something here?

Last edited by sand_man (2010-05-03 01:42:35)


neutral

Offline

#16 2010-05-03 03:31:20

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Setting up networking for an lx zone isn't that hard if the computer you're doing that in is on a local network, on which you can assign IP addresses. In that case, you just give the lx zone its own address on the same local network that the global zone is on. This case should be very straightforward, and it's the one that I discuss in the instructions I link to in the second post on this thread.

If your computer running (Open)Solaris is directly connected to the Internet (i.e., has a public IP address), however, then things are more complicated, since you can't just choose any old public IP address you want, but are assigned them. That's the case with my OpenSolaris box, since I use it for everything. I tried messing around with this for some time (and there are instructions giving a hack on several blogs which I tried but which didn't work for me), so finally I just gave up, because I couldn't set up routing in this case. (The problem is that the lx zone shares the IP stack with the global zone, so you run into routing conflicts.)

I have a name server and an http proxy running in my global zone, so I set DNS to use that name server in resolv.conf in the lx zone running Arch, and I set pacman to use the http proxy in the global zone, by setting it to use wget in pacman.conf, and then configuring wget to use the proxy.

Please let me know if you manage to set up networking. The only thing I use networking for in my Arch zone is to access repositories with pacman. I'd like to be able to use the Chromium browser in Arch, but unfortunately it doesn't run under the lx brand, since the appropriate multitasking system call has not been implemented.

One thing I have done since I wrote up the HOWTO is set up my Arch zone to access file systems in the global zone, using the Zone file system of type lofs. That's quite easy to do; I'll add instructions for that to the HOWTO later.

Offline

#17 2010-05-03 05:18:21

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

ty@ty-opensolaris:~$ netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface 
-------------------- -------------------- ----- ----- ---------- --------- 
default              10.60.79.1           UG       15     131125 e1000g0   
10.60.79.0           10.60.79.125         U         4     263812 e1000g0   
127.0.0.1            127.0.0.1            UH       21       3799 lo0

I set the router as 10.60.79.1 and tried giving the zone an address in that range such as 10.60.79.126 but it does not work. I am on a very large LAN and I don't know what addresses are reserved and what is already in use etc which is why I was hoping to obtain another lease from dhcp much like VirtualBox can do with the bridged networking feature.


neutral

Offline

#18 2010-05-03 14:17:31

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Good.  It's good that you're on a LAN: that's the simple case.

You can't use dhcp in a non-global zone, such as your zone running Arch. The reason why, I imagine, is that the non-global zone shares the global zone's network interface. But dhcp assigns a unique IP address to each hardware address it receives requests from. If it used dhcp, the non-global zone would be supplying the same hardware address to the dhcp server as the global zone.

Can't you get whoever administers your local network to assign your box a second IP address?

You say you "tried giving the zone an address in that range such as 10.60.79.126 but it does not work." What does not work? Did you try specifying that specific address in the "add net" command in zonecfg as per my instructions? What happened when you booted into the zone then? Can you ping 10.60.79.1 from inside the zone running Arch? You should be able to. If not, can you ping 10.60.79.125?

I have a second desktop which boots several OS's, including OpenSolaris, and I have Arch installed there in a branded zone. Since that machine gets onto the Internet from my local network, I can use it to compare with what's going on with yours.

What version of OpenSolaris are you using? To ease troubleshooting, you should upgrade to the current version, snv_134, with "pfexec pkg image-update". (Because of ZFS's snapshot feature, you can always boot back into the version you're running now, if it's not snv_134.)

As a temporary measure, you should be able to determine what IP addresses are available by pinging random IP addresses on your LAN until you get one that does not respond. But if you do a more permanent setup, you really should get a second IP address officially assigned to you, so as not to antagonize your network administrators.

As I said before, this really should be quite easy if your machine is on a LAN, so you can get a second IP address for your machine on the same LAN. You just need to provide me with more details about what you are doing (by for example giving the output of "zonecfg -z arch info", assuming you named your zone "arch") and about what is going wrong.

Offline

#19 2010-09-22 02:56:34

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Well, Oracle has canceled the lx Brand. That means that there is no point in pursuing this any further.

It became known in August that Oracle is canceling OpenSolaris itself (the distribution, that is). Fortunately, a bunch of people were resourceful enough to put together a project that will continue to produce a free binary distributions of OpenSolaris: OpenIndiana.

Offline

#20 2010-09-22 03:15:53

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Arch inside an OpenSolaris branded zone

Oracle were right to cancel the lx brand. As nice as it was the test it was really just wasted effort when there are other already mature technologies out there that already work for virtualising Linux OS's. This was discussed on the Illumos-discuss mailing list and it was pretty much agreed on. Nobody has stepped forth to continue work on the project so it will just be left to "bit rot".


neutral

Offline

#21 2010-09-22 03:38:56

herzen
Member
From: Pennsylvania, US
Registered: 2009-10-28
Posts: 38

Re: Arch inside an OpenSolaris branded zone

Yes, I saw that discussed on the Illumos-discuss mailing list: it was a relief to hear that most developers there agreed with Oracle on this, so that there is little cause for regret.

Hopefully, now that a real community seems to be forming around OpenIndiana, one not kept under the thumb of a corporation, more people will be willing to port GNU/LInux software to (Open)Solaris and package it, which will make the need for a lx brand go away.

Offline

Board footer

Powered by FluxBB