Solaris hints

This page is the top level of my Solaris site. [There is also a mirror site available]

At this level, you can find architecture-neutral Solaris hints and scripts.
Also available:

Table of Contents

Outside links

I maintain a page with critical information and tools written by other people. Everything else on bolthole.com is written by me, Philip Brown.


Informational documents


Informational in-line quickies...

  1. To turn a solaris 9 "cd 1 of 1" into two mountable filesystems, do the following:
     mkdir /mnt/s0 /mnt/s1
     lofiadm -a cd1.iso
     mount -o ro -F hsfs /dev/lofi/1 /mnt/s0
     df -k /mnt/s0
     dd if=cd1.iso of=/tmp/cd1.s1.img bs=1k iseek=(number of blocks from df)
     lofiadm -a /tmp/cd1.s1.img
     mount /dev/lofi/2 /mnt/s1 
    You can now run /mnt/s0/Solaris_9/Tools/setup_install_server

  2. To turn off CD (auto-run,volstart, auto-irritation) globally, you can either do chmod 0444 /usr/dt/bin/sdtvolcheck, or create a /etc/dt/config/sessionetc file that does nothing. (since /usr/dt/config/sessionetc seems to do nothing except start sdtvolcheck)

  3. If you want an "#ifdef solaris", the portable way is
     #if defined (__SVR4) && defined (__sun)
     
    This should work on gcc, sun cc, and lots o other compilers, on both sparc and intel.

  4.  perl -MCPAN -e 'install Bundle::libnet'
     


SCCS related scripts and tips

Portable scripts that run on sparc AND intel

quotecheck.y isnt a script, but it IS a portable way to find mismatched quotes in a shellscript. Read the file for directions on how to compile this lex program.


Fun with packaging

Speaking of packaging, if you ever need to extract something from an RPM package (Like from a source RPM, an "RPMS"), you can use the following:

rpm2cpio file.rpm |cpio -ivd
This will extract the files into the current directory

Solaris Driver Developer resources

First, a quick code hint I dont know where else to put. If you want to have a section of code specifically for solaris, you can use
# if defined (__SVR4) && defined (__sun)
  /* solaris specific code here */
#endif

The rest of this section is now in its own section of my site, the driver section


PS:If you're looking to hire a sysadmin in the greater Los Angeles area, you can look at my resume :-)

Written by:Philip Brown
Bolthole Top Search Bolthole.com