Sonntag, November 30th, 2008 | Author: jean

OpenSolaris – the experiment

small side note: This comes without any warranty. I just wrote down, what i made in a more friendly-way for other readers :p

Most guys know me as an very happy linux user. Anyway. As i got already experience with FreeBSD and many Linux Distributions i wanted to try something else. I’m interested into OpenSolaris but i don’t wanna miss my Linux Distribution (I’m using Lunar Linux). Anyway i read that it’s possible to run “Zones” within OpenSolaris, thus i could run the Linux Distribution within OpenSolaris (though a bit limited). One of the things, why i’m very interested into OpenSolaris is the filesystem. As you can see i played around with zfs-fuse within my Linux Install but this wasn’t very useful. Here’s the blog-entry: something about ZFS

People who are reading this will probably find some helpful information, though as i’m a beginner with OpenSolaris, more experienced people will do some things probably differently. Kept this in mind and still interested into reading? Fine.

First Steps

My first step was looking whether my Hardware is supported or not. For this you’ll find a little Java Application here: Link most of my Hardware were supported, except the wireless lan nic and the normal nic. There was written that the audiohd driver is not gurantated to work and that a driver for the ACPI AC thingy is missing. Anyway. After googleing a bit i found out that i need to install drivers for my wireless lan and the normal lan manually. I found them here: nfo network driver and here: ath network driver. After burning those Stuff onto a CD, burning the OpenSolaris install/live cd (2008.05) and making a backup of my current System i was installing OpenSolaris on the whole disc.

Hardware

  • Acer Aspire 5520G
    • AMD Turion 64 X2 2GHz
    • 2048 MB Ram
    • nVidia Corporation MCP67 OHCI USB 1.1 Controller
    • nVidia Corporation MCP67 EHCI USB 2.0 Controller
    • nVidia Corporation MCP67 High Definition Audio
    • nVidia Corporation MCP67 IDE Controller
    • nVidia Corporation MCP67 AHCI Controller
    • nVidia Corporation MCP67 Ethernet
    • Ricoh Co Ltd R5C832 IEEE 1394 Controller
    • Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
    • Ricoh Co Ltd R5C843 MMC Host Controller
    • Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter
    • Ricoh Co Ltd xD-Picture Card Controller
    • nVidia Corporation GeForce 8600M GS
    • Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter
    • Harddisc: WDC WD2500BEVS (250 GB SATA)
    • DVD: HL-DT-ST DVDRAM GSA-T20N
  • Other things (probably optional)
    • Acer Crystal eye webcam
    • Creative ZEN Stone mp3 player (usb)
    • Broadcom Corp Acer Module (bluetooth thingy)

What i want

  • OpenSolaris as global System with ZFS
  • Lunar Linux as Brandz zone within OpenSolaris

Installation

I tried first to use OpenSolaris within Qemu to get an idea about how it would running and to hopefully save some times. Anyway. OpenSolaris live/install cd 2008.05 did not worked within Qemu. So i tried VirtualBox and it finally worked. After my tests were successful i installed it on my disc (ofc i rebooted and booted from cd) the installation is very very easy, so i won’t step in further at the installation part. Even my dog should get OpenSolaris installed =P

Update/Upgrade/First Steps within OpenSolaris

This was a bit.. more difficult. I configured my network (well there wasn’t much to configure – i installed the driver, rebooted, and it took the ip and data automatically via dhcp from my router without even saying that it should use dhcp. That was the fastest network-configuration ever.) and did a update all within the graphical package-manager. After that it told me that there’s a new BE (image?kernel? I don’t know yet) and so i rebooted. After trying to boot with the new BE (“opensolaris-1″) it just rebooted. Without anything. Seems something went wrong. By luck i was in #opensolaris on irc.freenode.net and got a little talk about how to upgrade solaris the first time. There are indeed some issues thats why you should read the release notes (indeed, i haven’t read them): Link to some Release Notes. After doing that, i updated again using a terminal and: pkg image-update and see? updating and installing software was working again, and the new BE was working also (“opensolaris-2″ is it now).

Brandz / Linux Zone

Now we’re coming to the (at least for me) difficult part. The Linux Zone. As you may have read i wanna use the Linux Distribution Lunar Linux within OpenSolaris. I started reading here: Link I read a few other Documents, too (there are a lot of documents to this thing…) anyway: Link and probably you’ll find some helpful posts in codestr0ms blog: codestr0ms blog in his Opensolaris section.

Creating an Image

I started by creating a little image of a working System with Lunar Linux installed. I copied this image using scp to /image.tar.bz2 onto my OpenSolaris Box.

Creating/Configuring the Zone

# switching to the zones directory
cd /etc/zones
# downloading the 2.6 zone thingy
wget http://www.opensolaris.org/os/community/brandz/files/SUNWlx26.xml
# creating the zone
chani@yulivee:~# zonecfg -z ll
ll: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:ll> create -B lx -t SUNWlx26
zonecfg:ll> set zonepath=/export/ll
zonecfg:ll> add net
zonecfg:ll:net> set address=192.168.2.20/24
zonecfg:ll:net> set physical=nfo0
zonecfg:ll:net> end
zonecfg:ll> add attr
zonecfg:ll:attr> set name="audio"
zonecfg:ll:attr> set type=boolean
zonecfg:ll:attr> set value=true
zonecfg:ll:attr> end
zonecfg:ll> set autoboot=true
zonecfg:ll> add dedicated-cpu
zonecfg:ll:dedicated-cpu> set ncpus=1-2
zonecfg:ll:dedicated-cpu> end
zonecfg:ll> add capped-memory
zonecfg:ll:capped-memory> set physical=768m
zonecfg:ll:capped-memory> set swap=1024m
zonecfg:ll:capped-memory> set locked=512m
zonecfg:ll:capped-memory> end
zonecfg:ll> add attr
zonecfg:ll:attr> set name=comment
zonecfg:ll:attr> set type=string
zonecfg:ll:attr> set value="This is my Lunar Linux install"
zonecfg:ll:attr> end
zonecfg:ll> set scheduling-class=FSS
zonecfg:ll> set limitpriv="default,sys_time"
zonecfg:ll> verify
zonecfg:ll> commit
zonecfg:ll> exit
chani@yulivee:~#
# installing the image
zoneadm -z ll install -d /export/home/chani/image2.tar.bz2

# this error could occur
chani@yulivee:/export# zoneadm -z ll install -d /export/home/chani/image2.tar.bz2
A ZFS file system has been created for this zone.
Required command '/usr/lib/brand/lx/lx_init_zone' not executable!
Installation of zone 'll' aborted.
The ZFS file system for this zone has been destroyed.
chani@yulivee:/export#

# let's chmod it and try again ... :)
chani@yulivee:/export# chmod a+x /usr/lib/brand/lx/lx_init_zone
chani@yulivee:/export# zoneadm -z ll install -d /export/home/chani/image2.tar.bz2
A ZFS file system has been created for this zone.
Installing zone 'll' at root directory '/export/ll'
from archive '/export/home/chani/image2.tar.bz2'

This process may take several minutes.

Setting up the initial lx brand environment.
System configuration modifications complete.
Setting up the initial lx brand environment.
System configuration modifications complete.

Installation of zone 'll' completed successfully.

Details saved to log file:
    "/export/ll/root/var/log/ll.install.5199.log"
# booting the zone
zoneadm -z ll boot

chani@yulivee:~# zoneadm -z ll boot
zoneadm: zone 'll': must be installed before boot.
chani@yulivee:~#

# SUNWrcap (Rcap) wasn't installed - after installing it, try again:

chani@yulivee:~# zoneadm -z ll boot
chani@yulivee:~# 

Everything working this far.

# logging into the zone

zlogin -C ll

INIT: Id "c3" respawning too fast: disabled for 5 minutes
INIT: Id "c4" respawning too fast: disabled for 5 minutes
INIT: Id "c5" respawning too fast: disabled for 5 minutes
INIT: Id "c2" respawning too fast: disabled for 5 minutes
INIT: Id "c6" respawning too fast: disabled for 5 minutes
INIT: Id "c1" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: cannot execute "/sbin/mingetty"
INIT: Id "1" respawning too fast: disabled for 5 minutes

Just comment the lines with c1 – c6 within etc/inittab (/export/ll/root/etc/inittab) and in the last line replace 1:2345:respawn:/sbin/mingetty console with 1:2345:respawn:/sbin/agetty 38400 console

Within the Zone

chani@yulivee:~# zlogin -C ll
[Connected to zone 'll' console]

Lunar Linux 1.6.1-i686 (Moose Drool - 20070210)
Kernel 2.6.18 on an i686

distcc-monster login: root
Password:
root@distcc-monster ~ # uname -a
Linux distcc-monster 2.6.18 BrandZ fake linux i686 athlon64 i386 GNU/Linux
root@distcc-monster ~ #

Done

Well, as you have seen or read, it’s possible to use your favorite distribution as a zone within opensolaris, and in general it’s easy, though you need to read a lot and probably i made some things different from what other users would have done. Anyway. Experiment – Success.

Soon i’ll write a review about how performant/good/nice/whatever it is. For now.. i’m happy. Wanna try the same? Good luck.

Category: OpenSolaris
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply » Log in

Please copy the string L6ti3L to the field below: