Blogfinger

Installing OpenSolaris 2008.11 on a USB stick

Sunday Dec 14, 2008

For installing OpenSolaris 2008.11 on a USB stick (installation on a 250 GB USB drive worked fine for me), please be aware of bug 4755 which leads to a GRUB> prompt after attempting to boot from a newly installed OpenSolaris 2008.11 USB stick.

Here's how it worked for me, on a Intel D201GLY2A system with 1 GB RAM:

  1. Change your BIOS so that it will boot from USB or CD, if present
  2. Boot from the OpenSolaris 2008.11 CD
  3. After the system as booted, plug in a USB stick with at least 4 GB (in my case 8 GB) capacity and wait until a new symbol shows up on the desktop
  4. Double click on the "Install Solaris" icon, select the USB stick, use the "use whole disk" setting, proceed through the rest of the installation customizing and press the appropriate button to start the installation.
  5. Wait until the installation has completed, but do not press the "Reboot" button!
  6. Follow this advice:
    1. Download this file (76.8 kB)
    2. unzip and untar it to /tmp, using command
      cd /tmp
      gzip -d grub_zfs_devid.tar.gz | tar -xf -

      (will create two files: stage1 and stage2)
    3. run
      zpool status
      to find out the device name of the newly created pool on the USB stick. Let's assume the device name shown is /dev/rdsk/c4t0d0s0.
    4. and install the two files from the tar file on that device:
      installgrub /tmp/stage1 /tmp/stage2 /dev/rdsk/c4t0d0s0
  7. Then, press the reboot button. Take out the OpenSolaris CD when the system starts booting, so that it will boot from the USB stick. According to the bug, booting might fail if the boot order is changed in the BIOS, so until the bug is fixed, you should keep the boot order as it was during the installation.

[5] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

OpenSolaris 2008.11: How to create a new zone for an Apache web server

Wednesday Dec 10, 2008

For those of you that want to install a web server in an OpenSolaris 2008.11 zone (e.g. for separating a web server from a file server while using the same hardware), here's a short howto. The procedure is a bit different from previous OpenSolaris releases as the zone files are not immediately available after the zone is installed - might have something to do with the new ipkg zone brand. The zone installation is now much faster than before. Here's how I got it installed:

  1. Create a parent zfs filesystem for the zone's root, if it does not yet exist:
    $ zfs create -o mountpoint=/zones rpool/zones

  2. Create a zone configuration file:
    $ cat > /var/tmp/webserv-z.cfg
    create
    set zonepath=/zones/webserv-z
    set autoboot=true
    add net
    set address=192.168.0.20/24
    set physical=ADAPTER
    set defrouter=192.168.0.1
    end
    verify
    commit
    exit
    
    Please replace ADAPTER by the name of your network adapter (can be seen in the output of ifconfig -a | nawk '!/^[\t]/&&!/lo/{gsub (":", "");print $1}' or just ifconfig -a, for example). In my case, it was sfe0 on one system and bge0 on another.
    Then, configure the new zone:
    $ zonecfg -z webserv-z -f /var/tmp/webserv-z.cfg
  3. Install the new zone:
    $ zoneadm -z webserv-z install
    A ZFS file system has been created for this zone.
      Authority: Using http://pkg.opensolaris.org/release/.
          Image: Preparing at /zones/webserv-z/root ...
          Cache: Using /var/pkg/download.
     Installing: (output follows)
    Refreshing Catalog 1/1 opensolaris.org
    Creating Plan /                        
    DOWNLOAD                                    PKGS       FILES     XFER (MB)
    SUNWPython                                  6/52    213/7862    1.71/72.41 
    Completed                                  52/52   7862/7862   72.41/72.41 
    
    PHASE                                        ACTIONS
    Install Phase                             3637/12939 
    
    
  4. Wait! Before booting the zone, mount it first:
    zoneadm -z webserv-z mount

  5. Create a configuration file with the name sysidcfg (for sample files and a detailed explanation on the syntax, see: this link on http://docs.sun.com) in directory /zones/webserv-z/root/etc so you don't have to go through all the configuration screens after connecting to the new zone the first time:
    $ cat > /zones/webserv-z/root/etc/sysidcfg
    system_locale=C
    timezone=Europe/Berlin
    terminal=xterms
    security_policy=NONE
    timeserver=localhost
    root_password=PASSWD_STRING
    name_service=dns {domain_name=DOMAIN.TLD
       name_server=DNS_IP_ADDR_1,DNS_IP_ADDR_2
       search=DOMAIN.TLD
    }
    network_interface=primary {hostname=webserv-z
       ip_address=192.168.0.20
       netmask=255.255.255.0
       protocol_ipv6=yes
       default_route=192.168.0.1
    }
    nfs4_domain=dynamic
    

    Before proceeding, please replace the placeholders DOMAIN.TLD, DNS_IP_ADDR_1, and DNS_IP_ADDR_2 by the names or addresses of your choice! For PASSWD_STRING (root_password parameter), you may use the old (short) password string from a Solaris 10 /etc/shadow file. If you do not use the root_password parameter in the sysidcfg file, you will be asked for the root password during initial zone boot.

  6. Wait! Before booting the zone, unmount it first:
    zoneadm -z webserv-z unmount

  7. Now you can boot the zone:
    $ zoneadm -z webserv-z boot

  8. Log in to the zone:
    root@soly:/# zlogin -C webserv-z
    [Connected to zone 'webserv-z' console]
    Loading smf(5) service descriptions: 27/68
    ...
    68/68
    Reading ZFS config: done.
    Mounting ZFS filesystems: (5/5)
    Creating new rsa public/private host key pair
    Creating new dsa public/private host key pair
    Configuring network interface addresses: sfe0.
    
    After a while, a series of screens will be displayed which ask you to select missing system configuration information. Use the <F2> key or <esc> 2 to go from one screen to the next. After that, a login prompt will be displayed, and you can login to the newly created zone:
    webserv-z console login: root
    Password: 
    Dec  8 10:12:14 webserv-z login: ROOT LOGIN /dev/console
    Sun Microsystems Inc.   SunOS 5.11      snv_101b        November 2008
    
    The output of the df -k command should display the following file systems (probably with slightly different values in the "used" column and totally different values in the "avail" column (depends on your disk and swap space size):

    root@webserv-z:~# df -k
    Filesystem            kbytes    used   avail capacity  Mounted on
    /                          0  240451 186876163     1%    /
    /dev                       0       0       0     0%    /dev
    proc                       0       0       0     0%    /proc
    ctfs                       0       0       0     0%    /system/contract
    mnttab                     0       0       0     0%    /etc/mnttab
    objfs                      0       0       0     0%    /system/object
    swap                  775608     196  775412     1%    /etc/svc/volatile
    /usr/lib/libc/libc_hwcap1.so.1
                         187116614  240451 186876163     1%    /lib/libc.so.1
    fd                         0       0       0     0%    /dev/fd
    swap                  775412       0  775412     0%    /tmp
    swap                  775420       8  775412     1%    /var/run
    root@webserv-z:~# 
    
  9. Install Apache and prerequisites in the local zone:
    $ pkg install SUNWapch22
    root@webserv-z:~# pkg install SUNWapch22
    Refreshing Catalog 1/1 opensolaris.org
    Creating Plan \                        
    DOWNLOAD                                    PKGS       FILES     XFER (MB)
    SUNWapch22                                   0/4      0/1342     0.00/5.85
    SUNWperl584core                              3/4    913/1342     4.21/5.85 
    
  10. Start the web server:
    root@webserv-z:~# svcadm enable apache22

  11. Point your browser to http://webserv-z or http://192.168.0.20 and see the first web page!
    Now you can change the file /var/apache2/2.2/htdocs/index.html according to your needs and watch the web page changing after reloading it in the browser!

Note: If you need to clean up the configuration, I suggest using the following commands:
$ zoneadm -z webserv-z uninstall -F
$ zonecfg -z webserv-z delete -F
$ zfs destroy -r rpool/zones

Be careful! These commands perform uninstall, delete or destroy actions without confirmation!. The zfs destroy command shown will also destroy all other zfs file systems that were created for other zones with zone root path starting with /zones!

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

OpenSolaris 2008.11 is out - try it!

Wednesday Dec 10, 2008

Why? Because of: Security, Package Manager, ZFS Time Slider, ZFS, Zones, integrated CIFS and NFS file server, and more.

Who? Everyone that needs a robust and secure operating system with some really unique features and a growing community. For example: for safe web surfing without having to install a virus scanner, for creating office documents, for building a flexible multimedia file server or for programming.

Where to download? http://www.opensolaris.org/os/downloads/. On the right, under "Quick Download Links", click on OpenSolaris 2008.11 to download the image. You can then burn a bootable CD from it, install it on your internal or external hard disk or on a USB stick, or use it as a bootable image in VirtualBox.

What else?

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

OpenSolaris 2008.11 launch today - you will be surprised

Wednesday Dec 10, 2008

Please read this and this page, and this and this after 09:00 PDT today...

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Try out the new, improved DSC!

Thursday Dec 04, 2008

Those of you who have not yet loaded http://docs.sun.com into your browser, please do so now and I'm sure you'll notice many of the improvements since the the last version.

Navigation and loading of pages appears to be much faster than before, and I also like the layout better. Thanks to everyone who made that possible!

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Solaris Express Developer Edition 1/08 released!

Thursday Feb 07, 2008

Why to download and install the new SXDE 1/08[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Creating (and deleting) a lot of zones

Tuesday Jan 15, 2008

A sample session of the zone-clone and delete-cloned-zones scripts:[Read More]

[1] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

How to create a lot of zones (and delete them afterwards)

Tuesday Jan 15, 2008

Click here to see the full text:[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Font sizes and the Nvidia driver for Solaris

Sunday Jan 13, 2008

This is a short description for changing default font sizes with Gnome and the Nvidia driver for Solaris.[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Prepend command output lines with date/time stamps

Wednesday Jan 09, 2008

Click here for details:[Read More]

[1] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Netmask calculation with (n)awk

Friday Jan 04, 2008

Click here to see the full text:[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Good news for Sun

Tuesday Aug 28, 2007

Looks like more and more customers see Solaris and our T2000 and other Niagara Chip based systems as a real alternative to servers with high single thread performance running other operating systems for their web applications. This is where our Startup Essentials program can help a lot. Read this report about a company that had been using Linux only and now has successfully started using Solaris on T2000.

Solaris will make the transition from other operating systems even more easy in the future, with more GNU tools integrated, more hardware drivers, better installation and administration experience, and more. If you haven't tried it, just download and install it on one of your PCs at home!

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

My (ksh) profile...

Thursday Apr 26, 2007

Somehow, my original post (my (.)profile...) got lost. So here are my up-to-date .profile and .kshrc files. Please download them directly via right mouse key and do not load it into a browser window and copy and paste it from there, as one of the files contains a binary character.

There's some interesting stuff in it:

  • a two-line prompt that contains the current time
  • a function ("md") that creates a directory and walks (cd) into it
  • a function ("d2u") that converts DOS line endings into UNIX line endings.
  • a function ("fp") that searches for entries in the software installation database /var/sadm/install/contents
  • a vi function (hhxpl) mapped to the unused key "q" which toggles the last two characters, just like Emacs' t

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Solaris 10 How-To Guides!

Wednesday Apr 11, 2007

See this for some very good how-to guides on various Solaris 10 administration topics.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

ZFS is part of FreeBSD

Friday Apr 06, 2007

My colleagues just "told" [1], [2] me that ZFS, the upcoming standard filesystem (my personal opinion, but search for zfs Windows in the web and you'll see what I mean), has made its way into FreeBSD!

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Publish your links in one of three different formats...

Wednesday Apr 04, 2007

How to create a formatted list of links from a simple multi-language input file[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Creating a bootable Solaris DVD with Solaris Nevada 59 on my old Dell GX110

Thursday Mar 15, 2007

How to create a bootable Solaris DVD using Solaris Nevada on a Dell GX110 PC[Read More]

[3] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Multibooting Solaris, Ubuntu, and Windows XP

Thursday Dec 28, 2006

Short HOWTO on multibooting Solaris, Ubuntu Linux, and Windows XP, installed on one hard disk. Installation order was Solaris Express, Windows XP, and Ubuntu Linux.[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

log file monitoring using tail -f, (n)awk, mailx and xmessage

Wednesday Sep 06, 2006

Short Howto about a powerful but simple notification system for new log entries[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Basic customization of gdm with OpenSolaris

Tuesday Aug 29, 2006

Short Howto about the basic customization of gdm so any user can perform a shutdown[Read More]

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg