Archive for the ‘OpenSolaris’ Category

Firefox and RealPlayer

Monday, March 27th, 2006

To get RealPlayer working with Firefox just load the plugin. The directory SUNWrealplayer is in is /usr/lib/RealPlay

# cd /opt/local/firefox/plugins
# ln -s /usr/lib/RealPlay/mozilla/nphelix.so

while you’re at it, link the java plugin too if its not already there:

# ln -s /usr/j2se/jre/plugin/i386/ns610/libjavaplugin_oji.so

restart Firefox and verify everything went smoothly by going to about:plugins

Solaris Boot Camp

Tuesday, January 31st, 2006

Well the Solaris Boot Camp came to Dallas and it was a very cool thing, and Bob is a cool guy and was nice to meet. Anyone that can cram that much information into that small amount of time deserves some respect. Some things I learned from Bob (and some I forgot about):

FMA features like fmadm, fmstat

  • boot -m milestone=milestone allows you to boot to a specific milestone
  • boot -m milestone=all boots all milestones
  • boot -m milestone=none which is useful in reparing a system that have problems booting early
  • boot -m verbose will print a line of information at boot when every service is started

    Change your default run level:
    (To change to another run-level just skip the -d part)

  • svcadm milestone -d milestone/single-user:default
  • svc:/milestone/single-user:default is runlevel S
  • svc:/milestone/multi-user:default is runlevel 2
  • svc:/milestone/multi-user-server:default is runlevel 3

    If you look at an FMRI entry:
    svc://localhost/network/login:rlogin
    notice the localhost part.. the word is eventually we’ll be able to use svc://someotherhost/network/login:rlogin

  • SMF service “unintialized” means that it didn’t start due to incomplete initialization (check sysidconfig, zlogin -C, NFS question)
  • SMF service “offline” means its tried to start but its dependencies weren’t met.
  • SMF service “disabled” means its off.
  • SMF service “maintenance” means error must be resolved by admin. check log.
  • SMF service “degraded” means its running at limited capacity in comparison to normal operation.

    Cool presentation Bob, and let me know when the Sun Developers Day comes.

  • 10 steps to install server

    Wednesday, January 25th, 2006

    This is the steps to setup a CD-less install server if you are using > Solaris 3/05 x86 (or a Solaris x86 with GRUB). They cleaned up a lot of things with GRUB booting off PXE and it is a lot easier and painless as this example shows. This does not include profiles so you will have to sit in through the install process and answer questions. It is just a quick and easy way to get Solaris x86 installed on a remote machine without burning CDs.

    1. Download ISO images

    2. Unzip them, run
    lofiadm -a iso_file.iso
    for each one

    3. mkdir /mnt/disk1 /mnt/disk2 /mnt/disk3 /mnt/disk4

    4. mount -F hsfs /dev/lofi/# /mnt/disk#
    for each one

    5.
    /mnt/disk1/Solaris_11/Tools/setup_install_server /path/to/setup/installserver

    6. For each CD:
    /mnt/disk#/Solaris_11/Tools/add_to_install_server /path/to/setup/installserver

    7.
    /path/to/setup/installserver/Solaris_11/Tools/add_install_client -d -e client_mac -s install_server_ip:/path/to/setup/installserver i86pc

    After this command it will give you information to use for the DHCP server you setup on step #10. If you are familiar with the old x86 network boot, you will notice they dont use SUNW.i86pc anymore and there is a lot less options to add for the DHCP server.

    8. share -F nfs -o ro,anon=0 -d “Install Server” /path/to/setup/installserver

    9. Run:
    /usr/sadm/admin/bin/dhcpmgr
    and follow the correct IP setup, defaults work great here if using 192.168 network.

    10. Add Macro by clicking on Macros then Edit -> Create (Use the information from the add_install_client command to put in the DHCP Macro. It’s only 2 options: “BootSrvA” which is the IP address of the install server, and “BootFile” which is the name of the bootfile on the install server.

    Tell your client to boot off using PXE!

    BrandZ speed blowfish

    Tuesday, December 20th, 2005

    The openssl speed blowfish under BrandZ Linux beats the one under Opensolaris. I’m not sure what the deal with that is.

    BrandZ Linux:

    -bash-2.05b# openssl speed blowfish
    OpenSSL 0.9.7a Feb 19 2003
    built on: Thu Sep 9 13:45:36 EDT 2004
    options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx)
    compiler: gcc -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DL_ENDIAN -DTERMIO -Wall -O2 -g -pipe -march=i686 -Wa,--noexecstack -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
    available timing options: TIMES TIMEB HZ=100 [sysconf value]
    timing function used: times
    The 'numbers' are in 1000s of bytes per second processed.
    type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
    blowfish cbc 39551.57k 41451.84k 42518.77k 42711.76k 42924.44k

    Solaris (my post from the other day):

    # openssl speed blowfish
    OpenSSL 0.9.7d 17 Mar 2004
    built on: date not available
    options:bn(64,32) md2(int) rc4(ptr,char) des(ptr,cisc,16,long) aes(partial) blowfish(ptr)
    compiler: information not available
    available timing options: TIMES TIMEB HZ=100 [sysconf value]
    timing function used: times
    The 'numbers' are in 1000s of bytes per second processed.
    type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
    blowfish cbc 30605.68k 33575.83k 34549.35k 34830.73k 34888.60k

    DTrace Example #2

    Thursday, October 27th, 2005

    Here’s another example where I use DTrace to fix a problem I was having:

    The problem I was having is trying to upload something via FTP through a web application and it wasn’t uploading for some reason. The FTP daemon was receiving the commands but the file wasn’t showing up in the directory.

    FTP log of the session trying to upload:

    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 165209 daemon.info] USER pinnftp
    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 125383 daemon.info] PASS password
    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 201503 daemon.info] CWD /
    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 313182 daemon.info] PORT
    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 307055 daemon.info] TYPE Image
    Oct 27 14:54:26 callacctweb ftpd[25157]: [ID 206289 daemon.info] STOR logo-left.jpg

    Nothing looks suspicious here, and even to test if it was a permission error I went ahead and made the directory +w by everyone. Still, I kept getting the same stuff, and no file showing up in the directory.

    So I run opensnoop (as I tell the web app to upload the file):

    Oct 27 15:05:23 0 25165 -1 2 /var/ld/ld.config
    Oct 27 15:05:23 0 25165 3 0 /lib/libsocket.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libnsl.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libpam.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libbsm.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libsendfile.so.1
    Oct 27 15:05:23 0 25165 3 0 /usr/lib/libgss.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libc.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libcmd.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libmd5.so.1
    Oct 27 15:05:23 0 25165 3 0 /lib/libsecdb.so.1
    Oct 27 15:05:23 0 25165 3 0 /platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1
    Oct 27 15:05:23 0 25165 3 0 /dev/conslog
    Oct 27 15:05:23 0 25165 2 0 /dev/null
    Oct 27 15:05:23 0 25165 4 0 /etc/ftpd/ftpservers
    Oct 27 15:05:23 0 25165 4 0 /etc/ftpd/ftpaccess
    Oct 27 15:05:23 0 25165 4 0 /etc/netconfig
    Oct 27 15:05:23 0 25165 4 0 /dev/udp
    Oct 27 15:05:23 0 25165 4 0 /etc/nsswitch.conf
    Oct 27 15:05:23 0 25165 4 0 /lib/nss_files.so.1
    Oct 27 15:05:23 0 25165 4 0 /etc/services
    Oct 27 15:05:23 0 25165 4 0 /var/run/name_service_door
    Oct 27 15:05:23 0 25165 5 0 /etc/ftpd/ftpconversions
    Oct 27 15:05:23 0 25165 -1 2 /etc/ftpd/banner.msg
    Oct 27 15:05:23 0 25165 5 0 /etc/ftpd/ftphosts
    Oct 27 15:05:23 0 25165 5 0 /etc/shadow
    Oct 27 15:05:23 0 25165 -1 2 /etc/shells
    Oct 27 15:05:23 0 25165 5 0 /etc/ftpd/ftpusers
    Oct 27 15:05:23 0 25165 -1 2 /etc/ftpusers
    Oct 27 15:05:23 0 25165 5 0 /var/run/ftp.pids-realusers
    Oct 27 15:05:23 0 25165 6 0 /usr/share/lib/zoneinfo/US/Central
    Oct 27 15:05:23 0 25165 6 0 /var/run/syslog_door
    Oct 27 15:05:23 0 25165 6 0 /var/run/syslog_door
    Oct 27 15:05:23 0 25165 -1 2 /etc/pam_debug
    Oct 27 15:05:23 0 25165 6 0 /etc/pam.conf
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_authtok_get.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/passwdutil.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/libsldap.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/libldap.so.5
    Oct 27 15:05:23 0 25165 6 0 /lib/libdoor.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/libsasl.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libnspr4.so
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libplc4.so
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libnss3.so
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libssl3.so
    Oct 27 15:05:23 0 25165 6 0 /lib/libpthread.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libthread.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/librt.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libdl.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libsoftokn3.so
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/libplds4.so
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/.htaccess
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/web/.htaccess
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/web/app/.htaccess
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 0 23893 30 0 /system/contract/process/latest
    Oct 27 15:05:23 0 23893 30 0 /proc/25165/psinfo
    Oct 27 15:05:23 0 18224 13 0 /etc/svc/volatile/svc_nonpersist.db-journal
    Oct 27 15:05:23 0 18224 17 0 /etc/svc/volatile/sqlite_9C3PWfLqAwfyW8l
    Oct 27 15:05:23 0 18224 13 0 /etc/svc/volatile/svc_nonpersist.db-journal
    Oct 27 15:05:23 0 18224 17 0 /etc/svc/volatile/sqlite_KPSalwKdewEwutR
    Oct 27 15:05:23 155 25165 -1 2 .message
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 155 25165 7 0 /var/run/syslog_door
    Oct 27 15:05:23 155 25165 7 0 /var/run/syslog_door
    Oct 27 15:05:23 155 25165 7 0 /var/run/syslog_door
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 155 25165 -1 13 logo-left.jpg
    Oct 27 15:05:23 0 18224 13 0 /etc/svc/volatile/svc_nonpersist.db-journal
    Oct 27 15:05:23 0 18224 17 0 /etc/svc/volatile/sqlite_3bPs9j3k6YGQuOq
    Oct 27 15:05:23 0 18224 13 0 /etc/svc/volatile/svc_nonpersist.db-journal
    Oct 27 15:05:23 0 18224 17 0 /etc/svc/volatile/sqlite_fcgHWsRuwiXRABD
    Oct 27 15:05:23 0 23893 29 0 /system/contract/process/5264/ctl
    Oct 27 15:05:23 0 25165 6 0 /lib/libaio.so.1
    Oct 27 15:05:23 0 25165 6 0 /platform/SUNW,Sun-Fire-V240/lib/libmd5_psr.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/mps/cpu/sparcv8plus/libnspr_flt4.so
    Oct 27 15:05:23 0 25165 6 0 /lib/libscf.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libuutil.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_dhkeys.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_unix_cred.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/libproject.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libproc.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/librtld_db.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libelf.so.1
    Oct 27 15:05:23 0 25165 6 0 /lib/libctf.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_unix_auth.so.1
    Oct 27 15:05:23 0 25165 6 0 /etc/nsswitch.conf
    Oct 27 15:05:23 0 25165 6 0 /etc/shadow
    Oct 27 15:05:23 0 25165 6 0 /etc/shadow
    Oct 27 15:05:23 0 25165 6 0 /etc/passwd
    Oct 27 15:05:23 0 25165 6 0 /etc/shadow
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_roles.so.1
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_unix_account.so.1
    Oct 27 15:05:23 0 18260 5 0 /etc/user_attr
    Oct 27 15:05:23 0 25165 6 0 /etc/shadow
    Oct 27 15:05:23 0 25165 6 0 /var/adm/lastlog
    Oct 27 15:05:23 0 25165 6 0 /etc/default/login
    Oct 27 15:05:23 0 25165 6 0 /usr/lib/security/pam_unix_session.so.1
    Oct 27 15:05:23 0 25165 6 0 /var/adm/lastlog
    Oct 27 15:05:23 0 25165 6 0 /etc/shadow
    Oct 27 15:05:23 0 25165 6 0 /etc/project
    Oct 27 15:05:23 0 25165 6 0 /etc/project
    Oct 27 15:05:23 0 25165 6 0 /etc/project
    Oct 27 15:05:23 0 25165 6 0 /etc/project
    Oct 27 15:05:23 0 25165 6 0 /etc/project
    Oct 27 15:05:23 0 25165 6 0 /etc/security/policy.conf
    Oct 27 15:05:23 0 25165 6 0 /etc/default/nss
    Oct 27 15:05:23 0 25165 6 0 /etc/group
    Oct 27 15:05:23 0 25165 6 0 /var/adm/wtmpx
    Oct 27 15:05:23 0 25165 -1 2 /etc/ftpd/welcome.msg
    Oct 27 15:05:23 0 25165 7 0 .
    Oct 27 15:05:23 0 25165 -1 2 .message
    Oct 27 15:05:23 0 25165 7 0 .
    Oct 27 15:05:23 0 25165 7 0 .
    Oct 27 15:05:23 155 25165 7 0 /var/run/syslog_door
    Oct 27 15:05:23 155 25165 7 0 .
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 7 0 /var/apache/logs/owalog.log
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/.htaccess
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/web/.htaccess
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/web/app/.htaccess
    Oct 27 15:05:23 60001 24924 -1 2 /usr/apache/pinnacleweb/web/app/uploads/.htaccess
    Oct 27 15:05:24 0 99 4 0 /devices/pci@1c,600000/scsi@2:devctl
    Oct 27 15:05:24 0 99 4 0 /devices/pci@1c,600000/scsi@2:devctl
    Oct 27 15:05:24 0 99 4 0 /devices/pci@1c,600000/scsi@2:devctl
    Oct 27 15:05:24 0 99 4 0 /devices/pci@1c,600000/scsi@2:devctl
    ^C

    What were looking for here is all of the ‘-1‘ FD values. This indicates there was an error somewhere. Looking at all of them, there’s only one that really sticks out, and its the name of the image I was trying to upload, logo-left.jpg

    It has an error number of 13, lets see what this means:

    root@callacct:~/DTraceToolkit-0.83# grep 13 /usr/include/sys/errno.h
    #define EACCES 13 /* Permission denied */
    #define ECONNABORTED 130 /* Software caused connection abort */
    #define ECONNRESET 131 /* Connection reset by peer */
    #define ENOBUFS 132 /* No buffer space available */
    #define EISCONN 133 /* Socket is already connected */
    #define ENOTCONN 134 /* Socket is not connected */
    /* XENIX has 135 - 142 */

    It is showing I’m getting a permission denied. This makes more sense if you look at the FTP log it shows it issuing “CWD /” then trying to upload a file which means its changing to the root (/) directory first then uploading the file and failing with the permission denied. The root directory doesn’t have permission to let anyone upload there and the FTP web app shouldn’t be issuing a ‘cd /’ and then trying to upload the file.

    Available here in txt format.

    Opensolaris grub and gdm modification

    Wednesday, August 10th, 2005

    This guy has some really cool pictures for grub and gdm splash screens. You can set your grub or gdm to look like any of these. Really badass looking and only takes a few seconds to install.

    Solaris Express Build 19

    Thursday, July 28th, 2005

    Build 19 of Solaris Express it out. Go update.

    OSUG

    Wednesday, May 25th, 2005

    If you haven’t checked out the OpenSolaris user group video footage you should now. I got this from benr. Some of it is hard to hear clearly but a lot of it you can understand and it talks about the OpenSolaris release and all mighty Newboot that will replace the Device Configuration Assistant.