Wednesday May 20, 2009

This is great news for Opensolaris Users. Gparted has finally made it into OpenSolaris. Thanks to the BOSUG (Bangalore OpenSolaris User Group) Community members - Nikhil Vyakaranam, Sujay Patil, Srivatsa V and Nitin Shekhar. Check the details here. The PSARC case acknowledges the contribution. Read more.

Tuesday Jan 13, 2009

The Runtime Memory Checking Screencast
The Runtime Checking Tool (RTC) helps you understand how memory is being used in your application and identifies memory leaks and access errors. View the RTC screencast to learn more.

dbx Debugger Screencast
A new stand-alone lightweight GUI debugging solution, dbxtool, is part of the Sun Studio Express 11/08 release. The dbx Debugger is also available as a command line utility and is fully integrated into the Sun Studio NetBeans-based IDE. View the screencast to learn about dbxtool and the features of the dbx Debugger.

Thursday Jul 24, 2008


These are the most common OpenSolaris Questions faced by a newbie User / Developer . Any modifications / suggestions / comments are welcome.


Sound is not working in
OpenSolaris 2008.05

Go
to http://www.4front-tech.com/download.cgi
or
http://www.opensound.com/
Select
Solaris and download the driver. Then $ pkgadd –d <filename> and follow the instructions.
Related
Blogs -
http://blogs.sun.com/nehagoel/entry/sound_on_solaris
http://blogs.sun.com/ajaykumar/entry/soundmax_hd_audio_in_solaris

How do I know whether OpenSolaris
supports the drivers present in my laptop / Desktop ?

If you have other system ( Windows / Linux ) in your
computer, you can run the hardware compatibility test at http://www.sun.com/bigadmin/hcl/hcts/install_check.jsp
and it will show you if OpenSolaris supports your Devices. So
before installing OpenSolaris you could come to know about the drivers you need
. Also the Device Driver Detection Tool present in the desktop after you boot
the OpenSolaris 2008.05 Live CD will tell you the Device Name and Whether
OpenSolaris supports the Device.
This
will also help:
http://www.sun.com/bigadmin/hcl/hcts/device_detect.jsp
Start with the Hardware Compatibility List (HCL) on
bigadmin: http://www.sun.com/bigadmin/hcl/

HCL for Solaris OS: http://www.sun.com/bigadmin/hcl/data/sol/

You can also search the HCL at http://www.sun.com/bigadmin/hcl/search.jsp.


Another option is to run the Sun Device Detection Tool (http://www.sun.com/bigadmin/hcl/hcts/device_detect.jsp),
which can tell you if drivers are available.


I am not finding Link to Other
Drivers ( Network, Wifi ) for Solaris.
What should I do ?

Try
the following links ( You need to search these sites a bit to match your
network card ) :

For LAN ( Network ) drivers check in order of priority -
http://blogs.sun.com/moinakg/entry/scorched_3d_and_masayuki_san
http://homepage2.nifty.com/mrym3/taiyodo/eng/
http://solaris-x86.org/software/drivers/
http://www.
opensolaris.org/os/community/device_drivers/files/ - Broadcom and Rhine
http://sol-enet.sourceforge.net/
http://
opensolaris.org/jive/thread.jspa?messageID=255898
For Wireless –
http://opensolaris.org/os/community/laptop/wireless/
http://www.
opensolaris.org/os/community/laptop/wireless/Solaris-wireless-faq/
http://www.opensolaris.org/os/community/laptop/wireless/wireless_driver_compatible_list/
NDISWRAPPER - http://opensolaris.org/os/community/laptop/wireless/ndis/
( Works for many broadcom drivers )
Converts Wifi Drivers written for Windows to OpenSolaris.
Other Driver Collection –
http://solaris-x86.org/software/drivers/
Other Links related to drivers:
Wi fi - http://blogs.sun.com/ajaykumar/entry/configuring_bcm4310_wlan_in_solaris
NIC - http://blogs.sun.com/ajaykumar/entry/configuring_bcm4401_nic_card_in
Device
Drivers Community - http://opensolaris.org/os/community/device_drivers/

In general, when you are not sure what driver you need:

1. Run the Sun Device Detection Tool:
http://www.sun.com/bigadmin/hcl/hcts/device_detect.jsp

This lists drivers that are integrated into the Solaris OS and also drivers
that are downloadable from third parties.

This tool comes integrated into OpenSolaris 2008.05 as Device Driver Utility:
http://dlc.sun.com/osol/docs/content/IPS/devdriver.html

2. Check the Solaris for x86 Device Support list on BigAdmin:
http://www.sun.com/bigadmin/hcl/devicelist/

3. Check the Device and Third-party Solaris Device Driver Reference Lists on
BigAdmin:
http://www.sun.com/bigadmin/drivers/

How do I configure My Network
Once the driver is installed You have to do "ifconfig -a plumb" to plumb all interfaces
first, as "ifconfig -a" will only show plumbed interfaces. Also, double check in the BIOS that the ethernet hasn't got disabled.
Try
pinging , if it does not ping then you need to set IP Address either through
NWAM or
Network-admin.
1. NetworkAdmin ( Set up Static IP ) :
$
network-admin
If
it shows up an error message try

$ svcadm disable network/physical:nwam
$ svcadm enable network/physical:default
And
enter Static IP, DNS Server Address, Subnet Mask etc.
2.
NWAM
Nwam
or Network auto magic will automatically assign an IP Address from a DHCP
Server if any.
Just
try
$
svcadm enable nwam
Or

$ svcadm enable network/physical:nwam
And
OpenSolaris would get IP Address through DHCP.
4.This
is another way to configure the Network using a tool called inetmenu.
Inetmenu
offers a GUI to configure your Network.
First
Make sure the Ethernet ( network ) driver is installed
You
could use Graphical Network Configuration Tool - Inetmenu
http://opensolaris.org/os/community/laptop/inetmenu/


DNS is not working
If you are using NWAM there is no problem. Next option try
INETMENU.
Cumbersome method –
Lets assume the driver is installed and your Interface name
is nge0. ( It can be bge0 , nfo0 etc ) and you have set IP Statically through
network-admin
Use "nslookup" to check if OpenSolaris was trying
to use the DNS or not

If it does not work , Then do the following
Configuring DHCP via ifconfig does not configure all the
required

services automatically. For eg. you will need to do the following

that includes these steps.

# ifconfig -a plumb

# ifconfig nge0 dhcp

# cp /etc/nsswitch.dns /etc/nsswitch.conf

Verify that "/etc/nsswitch.conf" has the line "hosts: file
dns" and not just "hosts: file" Create "/etc/resolv.conf" with one line:
"nameserver A.B.C.D" ) Where A.B.C.D is the IP Address of the DNS
Server
# svcadm enable name-service-cache

# svcadm enable dns/client
# svcadm restart name-service-cache


Installing packages etc :



  1. IPS ( All major packages like Netbeans , GCC , perl ,
    python , Web Stack, Glassfish etc
    etc are available )
    IPS GUI - Go to System -> Adminsitration -> Package Manager and search for the package you want. Select the package and say install. IPS GUI Manager will install the package. It will automatically resolve the dependencies and install the dependencies.

  2. From command line also you could install packages. $ pkg install netbeans Will install netbeans.


More Resources:
http://opensolaris.org/os/community/documentation/May2008/

http://www.opensolaris.org/os/project/pkg/
http://
opensolaris.org/sc/src/pkg/gate/src/man/pkg.1.txt
http://opensolaris.org/sc/src/pkg/gate/src/man/pkgsend.1.txt
http://pkg.opensolaris.org



  1. Blastwave (
    Mplayer , xmms , xine , amarok, wine etc available )

  2. www.blastwave.org.
    http://www.blastwave.org/howto.html


  3. Try http://www.sunfreeware.com/ 
    if 1 and 2 do not work.


One Tip Before Installing
OpenSolaris 2008.05

Have
a 10 GB Primary partition free unformatted. ( Empty Partition ).
More
instructions about creating Free primary partition in http://ashwinbhatks.wordpress.com/2008/05/26/open-solaris-200805-review/


Accessing other “Primary”
Partitions (Windows / Linux / ext2/ ext3 / fat 32 / NTFS ) From Solaris
http://blogs.sun.com/pradhap/entry/mounting_ntfs_partition_in_solaris
http://
blogs.sun.com/souvik/entry/solaris_windows_how_to_make

http://multiboot.solaris-x86.org/iv/3.html


How do I know Debugging Information
/ Log Files

Logs
are located in /var
-
Kernel logs are located in
/var/adm/messages
#
dmesg | tail – will show last 10 lines of kernel messages


My OpenSolaris Crashed.
After rebooting OpenSolaris will go to maintenance mode and
will ask for root password.
Then type
# svcadm clear boot-archive

# exit 0

After booting
bootadm update-archive


Can I install OpenSolaris in
Logical partition ?

Currently
not. That feature is under development . OpenSolaris can be installed only in
one of the 4 primary FDISK partitions. (
meaning it can be installed only on a primary partition )


I am trying to get Solaris installed onto an external USB hard-drive /
External Disk I have partitioned.  Does anyone know if I'll be able to
boot from this external drive without much difficulty or not? 


You shouldn't have much trouble booting from the external hard disk (your bios
should recognize and support it). Just select the appropriate hard disk during
the installation process. Just start the Solaris installation. Make sure the
hard drive is on and attached. The installer should see it as a potential
target for the OS, and you should be able to set up the installation options
(partition space, etc.) just like a normal installation.


What is the single most important
I must know before installing Virtual Box in Open Solaris ? ( I am not kidding
– This was the question of the year )

Once
you download Virtual Box it will be criminal if you do not read
readme.txt.

Assume you have downloaded 64 bit Virtual Box for
OpenSolaris.

Now in the latest release of Vbox there are 2 pkg files once you untar the
download. One is VirtualBox-1.6.2-SunOS-amd64-r31466.pkg  ( User Space
Package ) and the other is VirtualBoxKern-1.6.2-SunOS-r31466.pkg ( Kernel
Driver Package ). We need to install the Kernel Package first. Readme.txt has
the instructions.


How do I burn CD / DVD in
Open Solaris from Command Line ?

First create a dir that holds all that you want to burn onto
the disk then ,

mkisofs -r <path to dir that you want to burn>  2>dev/null | cdrw
-i -p 1
Note do not remove the "pipe" else you will see some modern art run
through your window like crazy. ( pipe means | )
Multisession
Writing -
http://docs.sun.com/app/docs/doc/817-5093/medcdrw-24?a=view


How do I plan for Triple
boot in my computer ? ( Windows + Linux + OpenSolaris )

http://blogs.sun.com/observatory/entry/triple_boot_part_1_planning
http://
blogs.sun.com/observatory/entry/triple_boot_part_2_install
http://blogs.sun.com/observatory/entry/triple_boot_part_3_install
http://blogs.sun.com/observatory/entry/triple_boot_part_4_access
or
http://weblogs.java.net/blog/lucastorri/archive/2008/03/triboot_system.html


I have a Thinkpad T61
laptop and tried to install OpenSolaris on it, I experienced the horrible
sqeaking noise on boot after Open Sound System (OSS) Driver is activated .
Now this issue can be solved by a customized OSS driver. The package could be download
from
http://www.adrive.com/public/467c92d490386f8bc49649607fccd9ad86f58ee2519caff77c23d641a8d9758c.html

If you have installed the original OSS driver,
you might want to remove the original OSS
driver by "# pkgrm oss" and reboot the system firstly.  I
experienced the "device busy" error when I tried to install the new
driver without reboot.

If you are interested in the fix in detail, please refer to a thread at Open
Sound System forum.
http://www.4front-tech.com/forum/viewtopic.php?t=2612&postdays=0&postorder=asc&highlight=t61&start
Another Link regarding this - http://blogs.sun.com/Chinese_Functional_CA/entry/solaris_x86_b80_on_hp520


Monitoring Network Activity ( How do I Trace my network packets )
Use
tcpdump or ethereal or wireshark or snoop. Wireshark available at Blastwave.org

Wireshark is the tool I would recommend. It has a nice GUI
Interface.
Also have a look at http://www.brendangregg.com/dtrace.html


I Am not getting GUI is
OpenSolaris / X Server Not starting

Solution
1: Try this command : $ gdm

Solution 2: Try

# svcadm disable gdm

# svcadm enable gdm


I want to see movies, play
music ,multimedia etc in OpenSolaris

Download
mplayer , gmplayer from www.Blastwave.org
For
Songbird Music Player -

Project Nightingale (PORT of Songbird
)

Download Link:  http://opensolaris.org/os/project/nightingale/files/

Project Page:       http://opensolaris.org/os/project/nightingale/


I am not able to use
ZFS, Dtrace or Zones.

You
need to be super user or root . Use su command and become root. Or execute
commands using pfexec ( something like sudo )
Example
:
$ su
$
enter password
#
zfs list
Or
$
pfexec zfs list


I want to contribute to OpenSolaris.
Please give me links for instructions to build kernel / compiling source code and
fix bugs

http://blogs.sun.com/gangasblog/entry/contributing_to_opensolaris_code_mini
http://blogs.sun.com/rscott/resource/building-os-070718.pdf
http://blogs.sun.com/fintanr/resource/building-os-032707.pdf
Jayakara Kinis Weblog - http://blogs.sun.com/jkini
Detailed Guide - http://www.opensolaris.org/os/community/on/devref_toc/devref_1/


Where is menu.lst is
OpenSolaris ?

Go to /rpool/boot/grub/menu.lst Become a superuser ( root )and then you could edit that file to
make changes to grub configuration or edit boot options like changing the default operating System , changing timeout ,
booting 32 / 64 bit of Opensolaris etc.


How do I boot into 32 bit Opensolaris
Kernel ?

Try booting the 32 Bit Kernel. Once you get the GRUB type c
and then type the following command.It may work. Sometimes this helps to debug kernel Panics
and also to run some 32 bit Applications.


grub> bootfs rpool/ROOT/opensolaris

grub> kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS

grub> module$ /platform/i86pc/boot_archive

grub> boot


Or add the following lines to /rpool/boot/grub/menu.lst


title opensolaris 2008.05 32 bit
bootfs rpool/ROOT/opensolaris

kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS

module$ /platform/i86pc/boot_archive

Suppose the OpenSolaris Grub
gets erased what do I do ?

Put the Live CD inside , Once you get the GRUB type c and
then type the following commands. ( These are basically grub commands to load
64 bit OpenSolaris Kernel )
grub> bootfs rpool/ROOT/opensolaris

grub> kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
grub> module$ /platform/i86pc/$ISADIR/boot_archive


grub> boot


And
then you could use installgrub command to restore the GRUB
http://www.sun.com/bigadmin/features/articles/grub_boot_faq.jsp#q18


How to resize / shrink /
manage / repartition partitions ?

Use
Gparted Live CD.
http://opensolaris.org/os/project/caiman/Slim_Install/project_documents/slim_install_getstarted/slim_install_GetStarted_GParted/
Avoid
using partition Magic because a simple mistake can erase all data. If you are
using windows try Control Panel -> Administrative tools -> Computer
Management -> Disk Management ( Left Panel ) and can change

Another
Option is Graphical Boot Manager- http://gag.sourceforge.net/index.html


Solaris OpenSolaris 2008.05 Nevada Indiana
SXDE SXCE .. I am confused;

http://blogs.sun.com/observatory/entry/distributions_of_opensolaris
http://blogs.sun.com/weber/entry/solaris_opensolaris_nevada_indiana_sxde


How to remaster Open
Solaris Distro

Use
Distro – Constructor –
http://opensolaris.org/os/project/caiman/Constructor/


When I try to Set up Static Network
IP manually I get this error message. “NWAM has to be disabled”

# svcadm disable network/physical:nwam
# svcadm enable network/physical:default
# svcadm restart network
# network-admin


How do I install .pkg
packages ?

# pkgadd –d packagename
Most
packages need you to be root. So you need to do a su or use pfexec ( something
like sudo )


How to install .deb packages
which are opensolaris compatible?

# dpkg -i packageName.deb ( you need to be root )

Does anyone know of a
USB wireless adapter that works with OpenSolaris

Netgear wg311v3. It works fine
with OpenSolaris


Is there any software
to encrypt/decrypt whole disks on the fly for Open Solaris (x86) or any other method to do so.

http://www.opensolaris.org/os/project/zfs-crypto/


I've burned
OpenSolaris 2008.05 live cd . I'm having one problem that when it boots is
prompt one cmd sort of  thing [DR-DOS] A:\> What do I do to fix this ?

You have not properly burnt the iso image into a CD. Most probable you have
selected “create boot disc” while burning using Nero. Do not do this. Select
“Burn image to disc” Option using Nero. Usually this option in present in
Miscellaneous Tasks in Nero.


I Want to run Windows binaries / DLL Files in Solaris
http://www.blastwave.org/wine/

http://samiruce273.blogspot.com/2008/06/wine-10-released.html


I Inserted the Live CD. But it did not boot OpenSolaris 2008.05. It booted Windows / Linux from disc.
You will have to boot from the LiveCD.to do this - put the cd in the  tray, reboot and open BIOS and set the PC to boot from the CD (set CDROM's boot priority above hard disk) and then boot. OpenSolaris will load.
 

I get error “could not process datastream from
oss-solaris-v4.0-123-i386.pkg" when I was installing Open Sound drivers
downloaded from
http://www.4front-tech.com/download.cgi
It seems that the package file, "oss-solaris-v4.0-123-i386.pkg",
have errors. Re-download the file and try again


Could anyone tell me what languages are supported with DTrace? 
DTrace now have a number of languages supported, such as JavaScript , Java , PHP , Python , Ruby As well as for some databases - PostgreSQL and MySQL

How is IPS (Image Packaging System)  Compared to apt-get ?
http://opensolaris.org/os/community/documentation/apt_ips/

How do I know the
list of devices ( and their information ) I have in my system ?

# /usr/X11/bin/scanpci -v
Or
In OpenSolaris
2008.05
Go to System -> Administration -> Device Driver Utility and
you would find your Details about your Devices and their manufacturers.

or

prtconf -v


Sun Studio is not
working. Says command cc not found.

Run Sun studio compiler as /opt/SUNWspro/bin/cc


How to run compiz in
OpenSolaris ?

Its good to buy a laptop / Desktop with Nvidia Graphics
Card.
COMPIZ BLOG - http://blogs.sun.com/erwann/


How do I know my MAC
Address ?

To know MAC Address first you need to become root and then

# ifconfig -a
or If you do not have super user privileges then use pfexec
( sudo )
$ pfexec ifconfig -a
Example :
As the root user (or user with appropriate permissions)
Type "/sbin/ifconfig -a"
From the displayed information, find the Ethernet adapter
(it will probably be called le0 or ie0 or 2-3 alphabets and a 0 )
Locate the number next to ether. This is your MAC address or # ifconfig -a | grep ether
The MAC Address will be displayed in the form of 0:2:ba:16:1:3e -- leading zeros are
removed. For this example, the actual MAC Address would be 00:02:ba:16:01:3e. All this will
happen only if your NIC Driver is installed . Make sure your Network Driver is
installed first.
OpenSolaris is too smart - A hexidecimal 0x04 is the same as
4. so if your mac is

0a:2f:2a:3d:9e:0f. that would be the same as a:2f:2a:3d:9e:f ( As displayed by
ifconfig –a in OpenSolaris )


Can I run Windows, 
Linux Inside Solaris using Virtualisation Technologies ?

Yes the best way is to use Virtual box - http://www.virtualbox.org/
Download Virtual box for OpenSolaris.
Next Option would be Qemu - http://opensolaris.org/os/project/qemu/
Third and the Complicated Option is Xen ( xVM ) -
http://opensolaris.org/os/project/msosug/materials/xen-msosug-Dec-2007.pdf
http://
opensolaris.org/os/community/xen/


How do I know the
information about SVR4 Packages that I
have already installed using Blastwave ? ( These are not Packages installed
through IPS )

#pkginfo

When I was installing
OpenSolaris I got the following error –
WARNING : /pci@0,0
/pci14c0, 12@1d,7 (ehci0) : No SOF

Interrupts have been received, this USB EHCI host

controller is unusable.

Configuring /dev
and then my computer
hanged.
This is a bug in the USB EHCI ( Enhanced Host Controller
Interface ) Device Driver. It is causing Kernel panic during boot.

Please go through the following links. The fix is given.
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6509490
http://blogs.sun.com/danasblog/entry/configuring_solaris_acpi_at_boot
Do try the following when you boot from the CD. That is When GRUB Appears type e and do the following

In the grub menu, add boot option "-B acpi-user-options=0x8" or
"-B

acpi-user-options=0x2",

OpenSolaris is not booting – I get some kind of USB error
OpenSolaris sometimes does not support the bios. Therefore
you need to disable USB 2.0 in your BIOS Settings and then boot OpenSolaris.
Otherwise you may get an error being logged on my usb controller (EHCI which is
usb 2.0)


For OpenSolaris to play Videos what do I need to do ?
I use the totem from www.blastwave.org
which is built with a number of codecs. It also has the WINE library support
built in so if you have a Windows system, you can use the Windows media player
dll's with totem play windows media files. It isn't built with decss though,
and won't seem to use the decss library even if you provide it, so it can't
play encrypted DVDs.


When I am trying to
run Branded Linux Zone I am getting errors.

Make sure the Kernel Version of Centos / Linux is Supported
by the current BrandZ


Is there any difference b/w checksum in ZFS as compared to few other filesystems which also provide
64 bit checksum ?

Data is protected by 256 bit
checksum in ZFS – Only FileSystem to have 256 Bit Checksum.
ZFS checksums both metadata and
data blocks.
Additionally they are
cryptographic hashes, SHA-256 .Which allows for neat tricks where one top level
checksum can be used to essentially give a hash of the entire block tree. This
can be combined with PGP sigs.
And add to that that the checksum
in ZFS is always store with the indirect block not with the data, the only time
ZFS stores data and checksum in the same block is in the uberblock as there are
no indirect blocks pointing to it. This I
believe is major difference between ZFS and other filesystems that does
checksums.

Saturday Jul 12, 2008


Have a look at newly announced Integrated Load Balancer Project (ILB) . LB project will deliver the basic features that will allow a user to use Solaris on
a x86/SPARC platform as a L3/L4 load balancer.
Join the mailing list here

This blog copyright 2009 by Ashwin Bhat