Tuesday Nov 25, 2008

Solaris Thinkpad T61 / T61p Suspend to RAM support

Currently I am running Solaris Nevada 102 build and suspend to RAM and resume works with Thinkpad T61p and T61 laptops. Only problem I faced is with OSS driver, sound stops working after resuming. With the recent "audiohd" driver integration this can be tackled.  If you have freshly installed Solaris Nevada 102 and above then you can skip the OSS removal step and go direct to enabling suspend to RAM support.

1) remove oss driver with "pkgrm oss"

2) touch /reconfigure and then reboot the machine. 

Now Solaris uses "audiohd" driver for sound instead of oss driver.

Enabling Suspend to RAM support:

           Add the below entry to /etc/power.conf


S3-support              enable


Run " /usr/sbin/pmconfig"  to activate it.

To test the Suspend to RAM support run the command " /usr/openwin/bin/sys-suspend" and then select "suspend" option. To resume press power button.

Monday Aug 25, 2008

VirtualBox Solaris / OpenSolaris Build 95 / 96

Installed Solaris Nevada build 96 . Then installed VirtualBox on top of it.  While starting VirtualBox from command line it hangs giving out "ERROR: 0 bytes read from child process"  . Found the work around . Follow the below procedure to fix it.

Move the VBoxSVC to VBoxSVC.real

#mv /opt/VirtualBox/VBoxSVC /opt/VirtualBox/VBoxSVC.real

Create a shell script for VBoxSVC and export the LD_NODIRECT and then exec the real VBoxSVC

#cat > /opt/VirtualBox/VBoxSVC

exec /opt/VirtualBox/VBoxSVC.real "$@"

End the script and make sure you chmod +x the script 

#chmod +x  /opt/VirtualBox/VBoxSVC

Looks like one could hit this issue with Solaris Nevada Build 95 too.

Thursday Aug 21, 2008

Prozilla download accelerator for Solaris / OpenSolaris

Solaris 10 or OpenSolaris by default ships /usr/sfw/bin/wget tool for downloading.  If you are trying to download largefile then its good to use download accelerator so that it can parallely fetch the file and it would reduce the waiting time considerably . I have ported Prozilla download accelerator for Solaris / OpenSolaris  .

Download x86 version

To install run the following command

#pkgadd -d SFEprozilla-2.0.4.i386.pkg

SPEC file is locate at http://pkgbuild.svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/

Monday Aug 18, 2008

Opensolaris 2008.05 root user

Its generally good practice to use non-root user and when you require certain commands to be run as root you can use pfexec command. Pfexec is somewhat similar to sudo but much powerful than sudo.

$pfexec bash

When you install OpenSolaris 2008.05 if you specify username during installation, then it permits login only for non-root user. Run the following command so that root can login as a user.

#rolemod -K type=normal root

For more info on this check out this.

Thursday Jul 17, 2008

Solaris Nevada / OpenSolaris Mac book right-click

When you run Solaris on Macbook. Trouble is that the right-click doesn't work . One way to solve is to have USB mouse or you can have a key mapped to right-click so that when ever you press the key it automatically maps the key to right click. To enable this goto Start -> Preferences -> Keyboard Accessibility Preferences . 

click on "Enable Keyboard accessibility features" and then click "Enable Mouse Keys"

We need the scancode of the key to map it to right-click. For identifying scancode you can run Xev utility . Start the terminal and run xev "/usr/openwin/demo/xev" program.  Click on Xev window and press the key which you wanted to map it to right-click, xev will show the scancode for the key . Once you get the scancode you can kill xev.

Sample xev screen:

Now to open your favorite editor and create a file under your home directory ~/ .xmodmap . Put the following entry into it.
keycode 117 = Pointer_Button3

Save the file and run the command " xmodmap ~/.xmodmap" to activate it.  Now while pressing the key you should be able to see right-click menu. Put the an entry in

Start -> Preferences -> Session

so that "xmodmap" command is executed each time you log into Gnome.  Add entry "/usr/openwin/bin/xmodmap <path>" . Substitute <path> with location of  ".xmodmap" file eg. /export/home/guest/.xmodmap

Sunday Jul 15, 2007

Mount NTFS / Ext2 / Ext3 / FAT 16 / FAT 32 in Solaris

I often get queries about mounting NTFS / Ext2 / Ext3 /  FAT 16 /  FAT 32 partions in Solaris .  Follow the below steps . Note that its only read-only support for NTFS / Ext2 / Ext3 .

 \* Download packages

   Note these are packages for x86 Solaris .

 \* unzip the packages and install it

root~#gzcat FSWpart.tar.gz | tar xvf -

root~#gzcat FSWfsmisc.tar.gz | tar xvf -

root~#pkgadd -d . FSWpart

root~#pkgadd -d . FSWfsmisc

 \* Now run the prtpart tool


It would result in following output

Fdisk information for device /dev/rdsk/c1d0p0

Block Size : 512 bytes
Controller : ide
Disk       : cmdk
Capacity   : 74 GB

#  start block  # nblocks    startCylSecHd endCylSecHd   OSType
 1: 0000000063   0006152832     0/ 1/ 1    7e/7f/fe      Diagnostic
 2: 0006152895   0025173855    7f/41/ 0    ff/ff/fe      WIN95 FAT32(LBA)
 3: 0031328640   0052432128    ff/ff/fe    ff/ff/fe      Solaris x86
 4: 0083760830   0072535555    ff/ff/fe    ff/ff/fe      DOS Extended

  #  start block  # nblocks    startCylSecHd endCylSecHd   OSType
   5: 0000000001   0031407012    ff/ff/fe    ff/ff/fe      Linux native
   0: 0031407013   0001994202    ff/ff/fe    ff/ff/fe      DOS Extended

    #  start block  # nblocks    startCylSecHd endCylSecHd   OSType
     6: 0000000063   0001994139    ff/ff/fe    ff/ff/fe      Linux swap
     0: 0033401215   0039134340    ff/ff/fe    ff/ff/fe      DOS Extended

      #  start block  # nblocks    startCylSecHd endCylSecHd   OSType
       7: 0000000063   0039134277    ff/ff/fe    ff/ff/fe      WIN95 FAT32(Upto 2047GB)

Now note the disk id. In the above example its "/dev/rdsk/c1d0p0"

 Now run

root~#/usr/sbin/prtpart /dev/rdsk/c1d0p0 -ldevs

Fdisk information for device /dev/rdsk/c1d0p0

\*\* NOTE \*\*
/dev/dsk/c1d0p0      - Physical device referring to entire physical disk
/dev/dsk/c1d0p1 - p4 - Physical devices referring to the 4 primary partitions
/dev/dsk/c1d0p5 ...  - Virtual devices referring to logical partitions

Virtual device names can be used to access EXT2 and NTFS on logical partitions

/dev/dsk/c1d0p1 Diagnostic
/dev/dsk/c1d0p2 WIN95 FAT32(LBA)
/dev/dsk/c1d0p3 Solaris x86
/dev/dsk/c1d0p4 DOS Extended
/dev/dsk/c1d0p5 Linux native
/dev/dsk/c1d0p6 Linux swap
/dev/dsk/c1d0p7 WIN95 FAT32(Upto 2047GB)

The above command scan you hard-disk and displays all available filesystems. Note the required filesystems to be mounted.

To mount NTFS partition use

root~#mount -F ntfs  /dev/dsk/c1d0p<number> /mnt/windows

To mount FAT 16 /  FAT 32 partition use

root~#mount -F pcfs  /dev/dsk/c1d0p<number> /mnt/windows

if the above command fails you can try the below option

root~#prtpart /dev/dsk/c1d0p0 -fat

the above command should list the available PCFS / FAT partitions in colon notation, then use the same for mounting (eg)

root~#mount -F pcfs  /dev/dsk/c1d0p0:d /mnt/windows

To mount Ext2 / Ext3 partitions use

root~#mount -F ext2fs /dev/dsk/c1d0p<number> /mnt/linux

To unmount a partition use "umount <directory>"

root~#umount /mnt/linux

Wednesday Feb 28, 2007

Hidden Treasure in Solaris Express Developer Edition Release

I upgraded my laptop to Solaris Express Developer Edition (Build 55b). Found some cool flash presentation which is installed as part of Solaris Express Developer Edition (SXDE)

\* Solaris 10 Features
\* Sun Studio Features
\* Netbeans

Demos are located at   file:///usr/share/doc/soldevex/html/developer_guide.html

Below is the screenshot you can directly click on highlighted links.

Developer Edition


Monday Feb 26, 2007

SunTech days Mumbai

Recently Sun conducted TechDays across various parts in India. Main SunTech days event was held at Hyderabad. In addition to that Sun also conducted TechDays in various cities Mumbai, Pune and Delhi. We had 400+ (approx) attendees for the conference in Mumbai. Till 12pm we had "Live Satellite Link" to SunTech days Hyderabad. Sridhar Reddy from Sun Developer Outreach gave talks on (Java SE6, Simplifying Persistence and AJAX, jMaki and Phobos for Web 2.0 Development using Java) and I gave talk on "Solaris: The Developer Friendly Operating System". In addition to our talks we had speakers from Accenture (Implementing Secure J2EE Web Services & Sun Identity Management Solutions) and SAS (Data Visualization for Large Scale Analytical Data). People who attended talks were mostly working professionals and few students.

Since we delayed the start we had to rush through and some of the talks. My talk started at arround 6'pm evening. I had very little time to cover whole of Solaris 10 features. I ended my preso at arround 6.45pm and the people started of with various queries on (DTrace, ZFS and Zones). Solaris Q&A session went more than 20mins. Finally talk ended arround 7.15pm. Couple of folks stayed back and asked various queries about Solaris 10 technologies. It was a nice experience getting to know the developer community in Mumbai.




« June 2016