Jan Krupa

Installing OpenSolaris 2008.05 domU on Debian Linux Xen dom0

May 9th, 2008

This blogpost describes installation of OpenSolaris 2008.05 on dom0 running x86_64 Debian/Etch Linux.

debian-dom0:~# uname -a
Linux debian-dom0 2.6.18-6-xen-amd64 #1 SMP Sun Feb 10 18:02:52 UTC 2008 x86_64 GNU/Linux

Obtaining installation image / media

Live CD default passwords

Login: jack
Password: jack

Login: root
Password: opensolaris

Installation

  • Create disk image (at least 4GB)
debian-dom0:~# dd if=/dev/zero of=/xen/os1/opensolaris_disk.img bs=1M count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.3 GB) copied, 146.047 seconds, 29.4 MB/s
  • Copy OpenSolaris 2008.05 ISO file in /xen/os1/os20­0805.iso
  • Mount the ISO file or CD and copy these 2 files in /xen/os1/ on dom0
    • platform/i86×pv/ker­nel/amd64/unix
    • boot/x86.microroot
  • Create config file /etc/xen/os1.cfg with this content:
name = 'os1'
memory = '1024'
vif = [ '' ]

# Install
disk = [ 'file:/xen/os1/os200805.iso,6:cdrom,r', 'file:/xen/os1/opensolaris_disk.img,0,w' ]
kernel = '/xen/os1/unix'
ramdisk = '/xen/os1/x86.microroot'
extra = '/platform/i86xpv/kernel/amd64/unix -B console=ttya,livemode=text'
on_shutdown = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
  • Boot the system and login as jack/jack:
debian-dom0:~# xm create -c os1.cfg
Using config file "/etc/xen/os1.cfg".
Started domain os1
v3.0.3-1 chgset 'Tue Oct 17 22:09:52 2006 +0100 '
WARNING: Found hypervisor version: v3.0.3-1 but need at least version v3.0.4
SunOS Release 5.11 Version snv_86 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: opensolaris
Remounting root read/write
Probing for device nodes ...
NOTICE: xdf@6: failed to read feature-barrier
NOTICE: xdf@0: failed to read feature-barrier
Preparing live image for use
Done mounting Live image
USB keyboard
 1. Albanian                      22. Latvian
 2. Belarusian                    23. Macedonian
 3. Belgian                       24. Malta_UK
 4. Bulgarian                     25. Malta_US
 5. Croatian                      26. Norwegian
 6. Czech                         27. Polish
 7. Danish                        28. Portuguese
 8. Dutch                         29. Russian
 9. Finnish                       30. Serbia-And-Montenegro
10. French                        31. Slovenian
11. French-Canadian               32. Slovakian
12. Hungarian                     33. Spanish
13. German                        34. Swedish
14. Greek                         35. Swiss-French
15. Icelandic                     36. Swiss-German
16. Italian                       37. Traditional-Chinese
17. Japanese-type6                38. TurkishQ
18. Japanese                      39. TurkishF
19. Korean                        40. UK-English
20. Latin-American                41. US-English
21. Lithuanian
To select the keyboard layout, enter a number [default 41]:

1. Chinese - Simplified
2. Chinese - Traditional
3. English
4. French
5. German
6. Italian
7. Japanese
8. Korean
9. Portuguese - Brazil
10. Russian
11. Spanish
12. Swedish
To select the desktop language, enter a number [default 3]:
Configuring devices.
Mounting local partitions/cdroms
Reading ZFS config: done.

opensolaris console login: jack
Password:
Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
jack@opensolaris:~$
  • Wait 1–2 minutes for all daemons and networking to start
  • In case you want to use static IP, you need to configure it manually:
jack@opensolaris:~$ su -
Password:
May  9 03:04:15 opensolaris su: 'su root' succeeded for jack on /dev/console
Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
-bash-3.2# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
xnf0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 0.0.0.0 netmask ff000000
        ether 0:16:3e:38:7:c
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128
-bash-3.2# ifconfig xnf0 192.168.1.100 netmask 255.255.255.0
-bash-3.2# route add default 192.168.1.1
add net default: gateway 192.168.1.1
-bash-3.2# cp /etc/nsswitch.dns /etc/nsswitch.conf
-bash-3.2# echo "nameserver 192.168.10.1" > /etc/resolv.conf
-bash-3.2# logout
jack@opensolaris:~$
  • Start vncserver:
jack@opensolaris:~$ mkdir .vnc;cp .Xclients .vnc/xstartup
jack@opensolaris:~$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth:  creating new authority file /jack/.Xauthority

New 'opensolaris:1 ()' desktop is opensolaris:1

Starting applications specified in /jack/.vnc/xstartup
Log file is /jack/.vnc/opensolaris:1.log

jack@opensolaris:~$
  • Connect to VNC server and install OpenSolaris same way as if you boot from CD:

  • Before you click on the „Reboot“ button, you need to put these files in /xen/os1/ on your Debian dom0:
    • /a/platform/i86×pv/ker­nel/amd64/unix
    • /a/platform/i86pc/am­d64/boot_archi­ve
  • On the final installation screen click on the „Reboot“ button and wait for OpenSolaris domU shutdown.

debian-dom0:~# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      837     2 r-----  35598.4
os1                                       60     1024     1 -b----   1110.8

debian-dom0:~# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      837     2 r-----  35599.8

Post-install configuration

  • Modify config file /etc/xen/os1.cfg:
name = 'os1'
memory = '1024'
vif = [ '' ]

# Normal boot
disk = [ 'file:/xen/os1/opensolaris_disk.img,0,w' ]
kernel = '/xen/os1/unix'
ramdisk = '/xen/os1/boot_archive'
extra = '/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/27'
on_shutdown = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
  • Boot the system and login with your username. In case you are using static IP address, follow the steps above.
debian-dom0:~# xm create -c os1.cfg
Using config file "/etc/xen/os1.cfg".
Started domain os1
v3.0.3-1 chgset 'Tue Oct 17 22:09:52 2006 +0100 '
WARNING: Found hypervisor version: v3.0.3-1 but need at least version v3.0.4
SunOS Release 5.11 Version snv_86 64-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
NOTICE: xdf@0: failed to read feature-barrier
Hostname: os1
Reading ZFS config: done.
Mounting ZFS filesystems: (6/6)
WARNING: No randomness provider enabled for /dev/random. Use cryptoadm(1M) to enable a provider.

os1 console login: plnt
Password:
Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
-bash-3.2$ bash
plnt@os1:~$ mkdir .vnc
plnt@os1:~$ echo \#\!\/bin\/bash > .vnc/xstartup;echo >> .vnc/xstartup
plnt@os1:~$ echo "exec /usr/bin/dtstart jds" >> .vnc/xstartup
plnt@os1:~$ chmod +x .vnc/xstartup
plnt@os1:~$ vncserver

You will require a password to access your desktops.

Password:
Verify:

New 'os1:1 ()' desktop is os1:1

Starting applications specified in /export/home/plnt/.vnc/xstartup
Log file is /export/home/plnt/.vnc/os1:1.log

plnt@os1:~$
  • Connect to VNC server

  • OpenSolaris 2008.05 is up and running ;-)

Nice howto for network configuration is here.

Thanks to Mark Johnson for OpenSolaris Xen howto. I had to make few changes to make it work on Debian but it was a great starting point.

References

6 Comments »

  1. Excellent how-to, I followed your steps and booted up OS-08-05 in FC8.

    There is a problem: if I do package upgrade using IPS ( Systems > Administration > Package Manager ), and shutdown domU. Then I can never start it again

    [root@core xen]# more error.log
    Using config file “./pv.py”.
    Started domain opensolaris
    v3.1.3 chgset ‘unavailable’
    SunOS Release 5.11 Version snv_86 32-bit
    Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    WARNING: file system ‘ctfs’ version mismatch
    WARNING: Cannot mount /system/contract
    /kernel/fs/procfs: undefined symbol ‘schedctl_set_cidpri’
    WARNING: mod_load: cannot load module ‘procfs’
    WARNING: Cannot mount /proc
    WARNING: file system ‘mntfs’ version mismatch
    WARNING: Cannot mount /etc/mnttab
    WARNING: file system ‘tmpfs’ version mismatch
    WARNING: Cannot mount /etc/svc/volatile
    WARNING: file system ‘objfs’ version mismatch
    WARNING: Cannot mount /system/object
    WARNING: file system ‘sharefs’ version mismatch
    WARNING: Cannot mount /etc/dfs/sharetab
    /kernel/fs/procfs: undefined symbol ‘schedctl_set_cidpri’
    WARNING: mod_load: cannot load module ‘procfs’

    —————————–

    Do u have same problem or not ? How you handle boot_archive or kernel updates

    Comment by Jason — June 18, 2008 @ 4:56 am

  2. Hi,
    thank you for your howto, it worked very well up to the point where I reboot. It tells me the following:

    root@harmless xen]# xm create -c sol
    Using config file „./sol“.
    Started domain solaris
    v3.1.2–92.1.13.el5 chgset ‚unavailable‘
    SunOS Release 5.11 Version snv86 64-bit
    Copyright 1983–2008 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    NOTICE: xdf@0: failed to read feature-barrier
    Hostname: xen-opensolaris
    Configuring devices.
    devfsadm: open failed for /etc/dev/.dev­fsadm_dev.loc­k: Read-only file system
    Loading smf(5) service descriptions: 139/139
    svccfg import warnings. See /var/svc/log/system-manifest-import:default.log .
    WARNING: svccfg apply /var/svc/profi­le/generic.xml failed
    WARNING: svccfg apply /var/svc/profi­le/platform.xml failed
    Requesting System Maintenance Mode
    (See /lib/svc/share/RE­ADME for more information.)
    Console login service(s) cannot run

    Root password for system maintenance (control-d to bypass): Reading ZFS config: done.
    Mounting ZFS filesystems: (6/6)

    single-user privilege assigned to /dev/console.

    I can log on wit hmy root pwd, but I don't know enough to get rid of th eproblem,

    Any ideas.

    Many thanks,

    .peter

    Comment by Peter Huetmannsberger — October 12, 2008 @ 1:02 pm

  3. Good stuff, worked! Liked the details about setting fixed IP.

    Comment by akindo — October 16, 2008 @ 12:26 am

  4. I have done exactly the same as you have said, but there is a little problem..when I am midway (in installing the networks) there comes an error saying „no more ICXXXXR available to load“..and then the setup hangs for a minute and after that it shuts down the pc on its own..can you please tell me what to do..??

    Comment by Serbian — January 18, 2009 @ 5:07 pm

  5. How do you determine the zfs-boot? I've used „rpool/ROOT“ which is what shows up if I'm to boot the livecd again then import the zpool.

    The traceback I get is :
    panic[cpu0]/th­read=fffffffff­bc5dba0: assertion failed: nvlist_lookup_u­int64(config, ZPOOL_CONFIG_PO­OL_TXG, &txg) == 0, file: ../../common/fs/zfs/s­pa.c, line: 2290

    fffffffffbc906c0 genunix:assfail+7e ()
    fffffffffbc90710 zfs:spa_check_ro­otconf+8f ()
    fffffffffbc907b0 zfs:spa_get_r­ootconf+6c ()
    fffffffffbc907f0 zfs:spa_impor­t_rootpool+25 ()
    fffffffffbc90850 zfs:zfs_mountro­ot+eb ()
    fffffffffbc90870 genunix:fsop_mou­ntroot+1a ()
    fffffffffbc908a0 genunix:rootconf+d4 ()
    fffffffffbc908e0 genunix:vfs_mou­ntroot+63 ()
    fffffffffbc90910 genunix:main+e9 ()

    Comment by Scott Dodson — February 18, 2009 @ 12:39 am

  6. you shouldn't use tap:aio for cdrom, or it will not work, use file: instead

    Comment by Sherpya — May 1, 2009 @ 2:52 am

RSS feed for comments on this post.

Leave a comment

Enter this code: