{"id":6047,"date":"2016-07-14T11:59:29","date_gmt":"2016-07-14T03:59:29","guid":{"rendered":"http:\/\/rmohan.com\/?p=6047"},"modified":"2016-07-14T12:00:30","modified_gmt":"2016-07-14T04:00:30","slug":"solaris-10-reference","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6047","title":{"rendered":"solaris 10 reference"},"content":{"rendered":"<p><strong>solaris Release<\/strong><\/p>\n<p>Get the release of your OS by cat \/etc\/release:<br \/>\nOpenSolaris 2009.06\tExample:<br \/>\nOpenSolaris 2009.06 snv_111b X86<br \/>\nCopyright 2009 Sun Microsystems, Inc.  All Rights Reserved.<br \/>\nUse is subject to license terms.<br \/>\nAssembled 07 May 2009<br \/>\nSolaris 10<br \/>\n         Oracle Solaris 10 9\/10 s10s_u9wos_14a SPARC<br \/>\n     Copyright (c) 2010, Oracle and\/or its affiliates. All rights reserved.<br \/>\n                            Assembled 11 August 2010<br \/>\nSystem administration<\/p>\n<p>SMF<\/p>\n<p>Enable\/disable services<\/p>\n<p>Since Solaris 10, the old (but nice ?) start\/stop script in rc?.d have been replaced by SMF, the Service Management Facility.<\/p>\n<p>svcs<br \/>\nsvcs -x\tlists services encountering problems<br \/>\nsvcs -a\tlists all services including disabled ones<br \/>\nsvcs -l <service>\tprovides information concerning a specific service<br \/>\nExample:<br \/>\nsvcs -l svc:\/network\/routing\/ndp:default<br \/>\nfmri         svc:\/network\/routing\/ndp:default<br \/>\nname         in.ndpd IPv6 neighbour discovery daemon<br \/>\nenabled      true (temporary)<br \/>\nstate        online<br \/>\nnext_state   none<br \/>\nstate_time   July 20, 2013 07:52:23 PM CEST<br \/>\nlogfile      \/var\/svc\/log\/network-routing-ndp:default.log<br \/>\nrestarter    svc:\/system\/svc\/restarter:default<br \/>\ncontract_id  63<br \/>\ndependency   require_all\/refresh svc:\/network\/routing-setup (online)<br \/>\nsvcadm<br \/>\nsvcadm enable <service>\tto enable a service. e.g svcadm enable svc:\/network\/samba:default<br \/>\nsvcadm disable <service>\tto disable a service.<br \/>\nsvcadm enable -t <service>\ttemporary enabling\/disabling a service (won&#8217;t persist over reboot)<br \/>\nsvcadm refresh <service>\trestart the service<br \/>\nsvccfg<br \/>\nsvccfg -s <service> setprop<options>\tset properties. Eg. svccfg -s svc:\/application\/x11\/x11-server setprop options\/tcp_listen = true<br \/>\nOr, for example, get the current keymap layout:<br \/>\nsvc:\/system\/keymap:default> listprop keymap\/layout<br \/>\nkeymap\/layout  astring  French<br \/>\nsvc:\/system\/keymap:default> exit<br \/>\nsvcprop<br \/>\nsvcprop <service>\tlist properties for a given service.<br \/>\neg.<br \/>\n$ svcprop svc:\/application\/x11\/x11-server<br \/>\noptions\/default_depth integer 24<br \/>\noptions\/server astring \/usr\/openwin\/bin\/Xsun<br \/>\noptions\/server_args astring &#8220;&#8221;<br \/>\noptions\/stability astring Evolving<br \/>\noptions\/value_authorization astring solaris.smf.manage.x11<br \/>\noptions\/tcp_listen boolean true<\/p>\n<p>OpenSolaris uses the SMF too. It (unfortunately ?) ships with many services and will probably need some tuning if your host is a bit slow. A nice reading on that behalf: Solaris 10 Benchmark v4.0.<\/p>\n<p>Creating a manifest for a new service<\/p>\n<p>See for example the SVN manifest I use.<br \/>\nUseful services<\/p>\n<p>Name\tService Name\tComments<br \/>\nApache\tSolaris: svc:\/network\/http:apache2, OpenSolaris: svc:\/network\/http:apache22\tEnable to set up your own web server<br \/>\nAvahi Daemon Bridge to Bonjour\tsvc:\/system\/avahi-bridge-dsd:default\tDisabled. Used by DNS Multicast<br \/>\nCDE\tsvc:\/application\/graphical-login\/cde-login:default\tDisabled on Solaris: I use gdm. Does not exist on OpenSolaris<br \/>\nDHCP\tdhcpagent\tdisabled: I use static address<br \/>\nFiber Channel\tsvc:\/system\/device\/fc-fabric:default\tKeep enabled or the system won&#8217;t reboot<br \/>\nGDM\tSolaris: svc:\/application\/gdm2-login:default, OpenSolaris: svc:\/application\/graphical-login\/gdm:default\tenabled<br \/>\nGSS >API\tgss:default\tDisable. The GSS API is a security abstraction layer that is designed to make it easier for developers to integrate with different authentication schemes. It is most commonly used in applications for sites that use Kerberos for network authentication, though it can also allow applications to interoperate with other authentication schemes (quoted from Solaris 10 Benchmark v4.0).<br \/>\nIPFilter&#8217;s service\tipmon\tEnabled. used for zones<br \/>\nIPv6 neighbour discovery daemon\tsvc:\/network\/routing\/ndp:default\tDisabled. I don&#8217;t use IPv6 at home !<br \/>\nKeyboard defaults\tsvc:\/system\/keymap:default\tEnabled. If needed, set keyboard layout explicitly to fr.<br \/>\nsvc:\/system\/keymap:default> listprop keymap\/layout<br \/>\nkeymap\/layout  astring  French<br \/>\nsvc:\/system\/keymap:default> exit<br \/>\nKerberos\tsvc:\/network\/security\/ktkt_warn:default\t&#8220;While Kerberos can be a security enhancement, if the local site is not currently using Kerberos then there is no need to enable this service&#8221; (according to here)<br \/>\nmetainit\tsvc:\/system\/metainit:default\tdisable. SVM initialization<br \/>\nmetasync\tsvc:\/system\/metasync:default\tdisable. SVM initialization<br \/>\nMySQL\tsvc:\/application\/database\/mysql:version_51\tif you don&#8217;t need MySQL you can safely disable<br \/>\nMulticast DNS and DNS Service Discovery\tmulticast:default\tdisable<br \/>\nN Port ID Virtualization\tsvc:\/network\/npiv_config:default\tDo not disable or the syste, won&#8217;t reboot. N_Port_ID Virtualization (NPIV) is a method for virtualizing a FibreChannel Port. With NPIV, one physical FibreChannel port can obtain many N_Port_IDs.<br \/>\nPPD Cache Update\tsvc:\/application\/print\/ppd-cache-update:default\tdisable<br \/>\nRlogin\tnetwork\/login:rlogin\tenable this for rlogin<br \/>\nSamba\tSolaris: svc:\/network\/samba:default, OpenSolaris: svc:\/network\/smb\/client:default\tenabled. On OpenSolaris, the Samba client is necessary for smbfs.<br \/>\nSendmail\tsvc:\/network\/smtp:sendmail\tI don&#8217;t need it. To remove sendmail packages, pkgrm SUNWsndmu and SUNWsndmr. Beware sendmail is required by fetchmail<br \/>\nTime Slider\tsvc:\/application\/time-slider:default\tFor ZFS Snapshots<br \/>\nVNC Configuration\tsvc:\/system\/xvm\/vnc-config:default\tdisable<br \/>\nList of online services<\/p>\n<p>Currently, the list of online services on my OpenSolaris host are:<br \/>\nSTATE          STIME    FMRI<br \/>\nlegacy_run     20:36:20 lrc:\/etc\/rcS_d\/S50yukonx<br \/>\nlegacy_run     20:36:59 lrc:\/etc\/rc2_d\/S20sysetup<br \/>\nlegacy_run     20:36:59 lrc:\/etc\/rc2_d\/S47pppd<br \/>\nlegacy_run     20:36:59 lrc:\/etc\/rc2_d\/S72autoinstall<br \/>\nlegacy_run     20:36:59 lrc:\/etc\/rc2_d\/S73cachefs_daemon<br \/>\nlegacy_run     20:37:00 lrc:\/etc\/rc2_d\/S81dodatadm_udaplt<br \/>\nlegacy_run     20:37:00 lrc:\/etc\/rc2_d\/S89PRESERVE<br \/>\nlegacy_run     20:37:00 lrc:\/etc\/rc2_d\/S98deallocate<br \/>\ndisabled       20:36:57 svc:\/system\/xvm\/ipagent:default<br \/>\nonline         20:36:04 svc:\/system\/svc\/restarter:default<br \/>\nonline         20:36:05 svc:\/network\/loopback:default<br \/>\nonline         20:36:05 svc:\/network\/datalink-management:default<br \/>\nonline         20:36:06 svc:\/system\/filesystem\/root:default<br \/>\nonline         20:36:06 svc:\/network\/physical:nwam<br \/>\nonline         20:36:07 svc:\/system\/scheduler:default<br \/>\nonline         20:36:07 svc:\/system\/boot-archive:default<br \/>\nonline         20:36:07 svc:\/system\/identity:node<br \/>\nonline         20:36:14 svc:\/system\/filesystem\/usr:default<br \/>\nonline         20:36:14 svc:\/system\/device\/local:default<br \/>\nonline         20:36:14 svc:\/system\/filesystem\/minimal:default<br \/>\nonline         20:36:15 svc:\/system\/identity:domain<br \/>\nonline         20:36:15 svc:\/system\/hostid:default<br \/>\nonline         20:36:15 svc:\/system\/name-service-cache:default<br \/>\nonline         20:36:15 svc:\/system\/rmtmpfiles:default<br \/>\nonline         20:36:15 svc:\/system\/resource-mgmt:default<br \/>\nonline         20:36:15 svc:\/system\/cryptosvc:default<br \/>\nonline         20:36:15 svc:\/network\/ipfilter:default<br \/>\nonline         20:36:15 svc:\/milestone\/network:default<br \/>\nonline         20:36:15 svc:\/system\/sysevent:default<br \/>\nonline         20:36:16 svc:\/system\/power:default<br \/>\nonline         20:36:16 svc:\/system\/picl:default<br \/>\nonline         20:36:16 svc:\/network\/npiv_config:default<br \/>\nonline         20:36:16 svc:\/system\/device\/fc-fabric:default<br \/>\nonline         20:36:16 svc:\/milestone\/devices:default<br \/>\nonline         20:36:17 svc:\/system\/manifest-import:default<br \/>\nonline         20:36:17 svc:\/system\/coreadm:default<br \/>\nonline         20:36:17 svc:\/network\/initial:default<br \/>\nonline         20:36:18 svc:\/network\/service:default<br \/>\nonline         20:36:18 svc:\/network\/dns\/client:default<br \/>\nonline         20:36:18 svc:\/milestone\/name-services:default<br \/>\nonline         20:36:19 svc:\/network\/smb\/client:default<br \/>\nonline         20:36:20 svc:\/system\/keymap:default<br \/>\nonline         20:36:20 svc:\/milestone\/single-user:default<br \/>\nonline         20:36:24 svc:\/network\/routing-setup:default<br \/>\nonline         20:36:24 svc:\/network\/routing\/ndp:default<br \/>\nonline         20:36:55 svc:\/system\/filesystem\/local:default<br \/>\nonline         20:36:56 svc:\/system\/sysidtool:net<br \/>\nonline         20:36:56 svc:\/network\/shares\/group:default<br \/>\nonline         20:36:56 svc:\/system\/boot-archive-update:default<br \/>\nonline         20:36:56 svc:\/system\/cron:default<br \/>\nonline         20:36:56 svc:\/network\/shares\/group:zfs<br \/>\nonline         20:36:56 svc:\/network\/rpc\/bind:default<br \/>\nonline         20:36:56 svc:\/application\/stosreg:default<br \/>\nonline         20:36:56 svc:\/system\/sysidtool:system<br \/>\nonline         20:36:56 svc:\/milestone\/sysconfig:default<br \/>\nonline         20:36:56 svc:\/system\/sac:default<br \/>\nonline         20:36:57 svc:\/system\/dbus:default<br \/>\nonline         20:36:57 svc:\/system\/utmp:default<br \/>\nonline         20:36:57 svc:\/system\/filesystem\/autofs:default<br \/>\nonline         20:36:57 svc:\/network\/inetd:default<br \/>\nonline         20:36:57 svc:\/system\/console-login:default<br \/>\nonline         20:36:57 svc:\/system\/filesystem\/zfssnap-roleadd:default<br \/>\nonline         20:36:57 svc:\/system\/dumpadm:default<br \/>\nonline         20:36:57 svc:\/application\/desktop-cache\/mime-types-cache:default<br \/>\nonline         20:36:58 svc:\/application\/desktop-cache\/gconf-cache:default<br \/>\nonline         20:36:58 svc:\/system\/postrun:default<br \/>\nonline         20:36:58 svc:\/application\/desktop-cache\/input-method-cache:default<br \/>\nonline         20:36:58 svc:\/application\/desktop-cache\/pixbuf-loaders-installer:default<br \/>\nonline         20:36:58 svc:\/application\/opengl\/ogl-select:default<br \/>\nonline         20:36:58 svc:\/network\/rpc\/smserver:default<br \/>\nonline         20:36:58 svc:\/network\/login:rlogin<br \/>\nonline         20:36:58 svc:\/application\/pkg\/update:default<br \/>\nonline         20:36:59 svc:\/system\/system-log:default<br \/>\nonline         20:36:59 svc:\/network\/ssh:default<br \/>\nonline         20:37:00 svc:\/application\/desktop-cache\/desktop-mime-cache:default<br \/>\nonline         20:37:00 svc:\/milestone\/multi-user:default<br \/>\nonline         20:37:01 svc:\/system\/intrd:default<br \/>\nonline         20:37:01 svc:\/system\/fmd:default<br \/>\nonline         20:37:01 svc:\/milestone\/multi-user-server:default<br \/>\nonline         20:37:03 svc:\/system\/zones:default<br \/>\nonline         20:37:03 svc:\/application\/font\/fc-cache:default<br \/>\nonline         20:37:10 svc:\/application\/desktop-cache\/icon-cache:default<br \/>\nonline         20:37:12 svc:\/system\/filesystem\/zfs\/auto-snapshot:daily<br \/>\nonline         20:37:13 svc:\/system\/filesystem\/zfs\/auto-snapshot:monthly<br \/>\nonline         20:37:13 svc:\/application\/graphical-login\/gdm:default<br \/>\nonline         20:37:13 svc:\/network\/http:apache22<br \/>\nonline         20:37:13 svc:\/system\/filesystem\/zfs\/auto-snapshot:weekly<br \/>\nonline         20:37:19 svc:\/system\/hal:default<br \/>\nonline         20:37:19 svc:\/system\/filesystem\/rmvolmgr:default<br \/>\nonline         20:37:28 svc:\/system\/filesystem\/zfs\/auto-snapshot:frequent<br \/>\nonline         20:37:28 svc:\/system\/filesystem\/zfs\/auto-snapshot:hourly<br \/>\nonline         20:37:28 svc:\/application\/time-slider:default<br \/>\nInetadm<\/p>\n<p>Get status of an inet service:<br \/>\ninetadm | grep ftp<br \/>\ndisabled  disabled       svc:\/network\/ftp:default<br \/>\nEnable an inet service:<br \/>\npfexec inetadm -e ftp<br \/>\n$ inetadm | grep ftp<br \/>\nenabled   online         svc:\/network\/ftp:default<br \/>\nSystem Admin GUIs<\/p>\n<p>The host can be graphically administered using:<\/p>\n<p>SMC (Solaris Management Console): user management, hosts editing, cron batches, SMF. Launch \/usr\/sadm\/bin\/smc. On Solaris only (not OpenSolaris).<br \/>\nWebmin: web-based administration. Pretty good.<br \/>\nVisual Panels: this is an additional piece of software. I&#8217;m not a fan, but it&#8217;s there if you want it.<br \/>\nUser management<\/p>\n<p>How to add a new user<\/p>\n<p>To add a new user,<\/p>\n<p>use the graphical Solaris Management Console (smc&#038;)<br \/>\nor manually:<br \/>\nmake sure the home dir exists and is readable by the group,<br \/>\nthen type:<br \/>\nuseradd -d <homedir> -g <group> -s \/usr\/bin\/bash <username><br \/>\nAllow a user for pfexec<\/p>\n<p># cat \/etc\/security\/exec_attr | grep &#8220;Primary&#8221;<\/p>\n<p>Primary Administrator:suser:cmd:::*:uid=0;gid=0<\/p>\n<p># usermod -P&#8217;Primary Administrator&#8217; testuser<br \/>\nLogs<\/p>\n<p>\/var\/adm\/messages<br \/>\n\/var\/cron\/log\tCron&#8217;s log. Will also log auto snapshot actions.<br \/>\n\/var\/adm\/sulog\tSuccessful or failed su logins<br \/>\n\/var\/log\/syslog<br \/>\nAuthentication<\/p>\n<p>Log failed logins<\/p>\n<p>Set SYSLOG_FAILED_LOGINS in \/etc\/default\/login<\/p>\n<p>Password policy<\/p>\n<p>The password policy is configured in \/etc\/default\/passwd. The default settings are reasonable. Several parameters are commented out, but they have a default value. On the contrary, an unsecure setting could be as follows:<\/p>\n<p>MAXWEEKS=<br \/>\nMINWEEKS=<br \/>\nPASSLENGTH=4<br \/>\nHISTORY=0<br \/>\nMINDIFF=0<br \/>\nMINDIGIT=0<br \/>\nSee more information here.<\/p>\n<p>Automatic login<\/p>\n<p>On Solaris 10, to have the host automatically log in as a given user:<\/p>\n<p># gdmsetup &#038; &#8211;> set up for user you wish to log in<br \/>\n# vi \/etc\/X11\/gdm\/gdm.conf<br \/>\n&#8230;<br \/>\nSystemMenu=true<br \/>\n# \/etc\/init.d\/dtlogin stop<br \/>\n# \/usr\/dt\/bin\/dtconfig -d<br \/>\n# svcadm enable gdm2-login<br \/>\nNow, automatic login is a bit disappointing, because you still have to provide user&#8217;s password&#8230;<\/p>\n<p>On OpenSolaris 2008.11, no such issue ! Use gdmsetup and it works.<\/p>\n<p>Whoami<\/p>\n<p>An alternative to whoami is<br \/>\n\/usr\/xpg4\/bin\/id -un<br \/>\nSystem Path<\/p>\n<p>The default path for Solaris 10 should be set in \/etc\/default\/login:<\/p>\n<p>PATH=\/usr\/sfw\/bin:\/opt\/csw\/bin:\/usr\/sbin:\/sbin:\/usr\/bin:\/usr\/openwin\/bin<br \/>\nSUPATH=\/usr\/sbin:\/usr\/bin<br \/>\nPATH is the default path for users.<\/p>\n<p>SUPATH is the default path for root when running su.<\/p>\n<p>Both paths are overriden by user&#8217;s .profile, .login, .cshrc or .bashrc. So, check those files out too.<\/p>\n<p>System Locale<\/p>\n<p>Locales are a complicated matter I haven&#8217;t completely grasped yet \ud83d\ude09 I would recommend using UTF-8 as much as possible as it supports English and French characters, but UTF-8 will only work if the application supports it. For example, xterm do not support UTF-8 (I read there is a workaround using efonts but I haven&#8217;t tested). Urxvt does.<br \/>\nIf setting locale to UTF-8 fails, ISO Latin 15 (ISO-8859-15) is a good alternative to display French accents and euro symbol.<br \/>\nThe main locale environment variables are:<br \/>\nLANG: general language specification<br \/>\nLC_ALL: language setting. If not empty, overrides LANG and other LC_ variables<br \/>\nLC_MESSAGES: compilation warnings, errors in the specified language<br \/>\nThose variables are described in man 5 environ. To check your current locale:<br \/>\n$ locale<br \/>\nLANG=C<br \/>\nLC_CTYPE=&#8221;C&#8221;<br \/>\nLC_NUMERIC=&#8221;C&#8221;<br \/>\nLC_TIME=&#8221;C&#8221;<br \/>\nLC_COLLATE=&#8221;C&#8221;<br \/>\nLC_MONETARY=&#8221;C&#8221;<br \/>\nLC_MESSAGES=&#8221;C&#8221;<br \/>\nLC_ALL=<br \/>\nIf a user wishes to customize its locale, he\/she should usually set LANG (or individually, each LC_ variable). However, this setting is not persistent: it must be added to user&#8217;s .bashrc.<br \/>\nThose settings may affect locale-dependant applications. For instance, to launch Thunderbird with English menus but French accents supports, set LANG to en_US.UTF-8. To use Thunderbird with French menus: fr_FR.UTF-8.<br \/>\nTo set the system&#8217;s locale, modify the settings in \/etc\/default\/init and reboot:<br \/>\nLANG=&#8221;en_US.UTF-8&#8243;<br \/>\nLC_CTYPE=&#8221;C&#8221;<br \/>\nLC_NUMERIC=&#8221;C&#8221;<br \/>\nLC_TIME=&#8221;C&#8221;<br \/>\nLC_COLLATE=&#8221;C&#8221;<br \/>\nLC_MONETARY=&#8221;C&#8221;<br \/>\nLC_MESSAGES=&#8221;C&#8221;<br \/>\nTo add a new locale, use localeadm<br \/>\nI encountered strange lags with OpenSolaris, when launching simple applications such as xclock, xeyes etc: the computer would freeze for a few seconds, and finally the application appears.<br \/>\nThis does not occur any longer once I set all LC_ variables to C except LANG to en_US.UTF-8 in \/etc\/default\/init.<br \/>\nLANG=&#8221;en_US.UTF-8&#8243;<br \/>\nLC_CTYPE=&#8221;C&#8221;<br \/>\nLC_NUMERIC=&#8221;C&#8221;<br \/>\nLC_TIME=&#8221;C&#8221;<br \/>\nLC_COLLATE=&#8221;C&#8221;<br \/>\nLC_MONETARY=&#8221;C&#8221;<br \/>\nLC_MESSAGES=&#8221;C&#8221;<br \/>\nSetting the System Date<\/p>\n<p>To set\/correct time, do:<\/p>\n<p>date -s 1334<br \/>\nto set clock to 13:34.<\/p>\n<p>To set the timezone, use the tzselect utility. Alternatively, it is possible to do:<br \/>\npfexec \/usr\/sbin\/rtc -z Europe\/Paris<br \/>\nNetworking<\/p>\n<p>To restart the network:<br \/>\nsvcadm restart svc:\/network\/physical:nwam<br \/>\nTo add a new computer, use the Solaris Management Console, Computers &#038; Network, Computers, then selection Action \/ Add Computer. This basically adds an entry to \/etc\/hosts.<br \/>\nCheck out files \/etc\/hostname, \/etc\/hostname.<SOMETHING> (hme0, yukonx&#8230;), \/etc\/nodename, \/etc\/inet\/hosts, \/etc\/inet\/ipnodes.<br \/>\nList possible interfaces: ifconfig -a plumb, then ifconfig<br \/>\nList routes: routeadm<br \/>\nGUI: network-admin<br \/>\nSet a static IP address<\/p>\n<p>Specifying a static IP address consists in:<\/p>\n<p>ethernet interface: an ether interface must exist and be named. I use the default name for mine: yukonx0<br \/>\nmake sure the networking service is enabled: either physical:default or physical:nwam. The former is the most &#8216;basic&#8217; networking service. The latter is a networking daemon that automatically configures your host. It&#8217;s worth a try: on my OpenSolaris host, it worked straight out of the box and I consequently did not have to configure networking manually. On Solaris u5, however, I had to do it manually.<br \/>\nconfigure a few files (with nwam, most of these steps should be automatically done):<br \/>\n\/etc\/hostname.<INTERFACE NAME>: specify your host&#8217;s name:cify your host&#8217;s name:<br \/>\n$ more \/etc\/hostname.yukonx0<br \/>\nboureautic<br \/>\n\/etc\/hosts: set the loopback address and your static IP address:<br \/>\n$ cat \/etc\/hosts<br \/>\n#<br \/>\n# Internet host table<br \/>\n#<br \/>\n#::1    localhost       loghost boureautic<br \/>\n127.0.0.1       localhost       loghost<br \/>\n192.168.0.2     boureautic<br \/>\n\/etc\/resolv.conf: set the appropriate DNS servers (those are the ones used by Free):<br \/>\nnameserver 212.27.40.240<br \/>\nnameserver 212.27.40.241<br \/>\n\/etc\/nsswitch.conf: make sure the line hosts sets &#8220;files&#8221; before &#8220;dns&#8221;.<br \/>\nhosts:      files dns<br \/>\nfor physical:default, set the default gateway: route add default 192.168.0.254. And then, automatically add the route at each reboot writing a script \/etc\/rc2.d\/S99route<br \/>\nFor a manual try, add the network interface with ifconfig:<br \/>\nifconfig yukonx0 192.168.0.2 netmask 255.255.255.0 up<br \/>\nEavesdropping network packets<\/p>\n<p>No need to install Ethereal: on Solaris, there&#8217;s snoop. Example 1:<br \/>\npfexec snoop 192.168.0.2 and 192.168.0.3 and tcp > trace.txt<br \/>\nThis will record all TCP packets which mention 192.168.0.2 and 192.168.0.3. Example 2:<br \/>\npfexec snoop -d yukonx0 -o smbfs.snoop 192.168.0.2 and 192.168.0.3 and tcp<br \/>\nThe output is written to smbfs.snoop, and we listen only on network card yukonx0.<br \/>\nEnable Rlogin<\/p>\n<p>To add the rlogin network service:<\/p>\n<p>svcs -l rlogin<br \/>\nsvcadm enable network\/login:rlogin<br \/>\nNote that svcadm enable -t network\/login:rlogin only performs a temporary enable of rlogin (won&#8217;t persist over reboot).<\/p>\n<p>X<\/p>\n<p>Display windows remotely<\/p>\n<p>This is basic on X Window, but from time to time I however encounter problems to do it.<\/p>\n<p>For remote display:<\/p>\n<p>export DISPLAY=:0.0<br \/>\nAlso use \/usr\/openwin\/bin\/xauth list to list which entities are authorized.<\/p>\n<p>XScreensaver<\/p>\n<p>There&#8217;s a known bug on Solaris 10 u5: when you log on, a message is displayed: \u00e2\u20ac\u0153failed to execute child process \u00e2\u20ac\u0153xscreensaver\u00e2\u20ac\u009d (no such file or directory) screesaver functionality will not work in this session\u00e2\u20ac\u009d.<\/p>\n<p>To get rid of this message, do<\/p>\n<p>ln -s \/usr\/openwin\/bin\/xscreensaver \/usr\/bin\/xscreensaver<br \/>\nGDM<\/p>\n<p>To add FVWM to possible sessions, modify \/usr\/share\/xsessions\/fvwm.desktop<br \/>\n[Desktop Entry]<br \/>\nEncoding=UTF-8<br \/>\nName=FVWM<br \/>\nName[fr]=FVWM 2.5.26<br \/>\nComment=This session logs you into FVWM 2.5.26<br \/>\nExec=\/usr\/local\/bin\/fvwm<br \/>\nIcon=<br \/>\nType=Application<br \/>\nOn Solaris 10, stop dtlogin to use gdm:<\/p>\n<p># \/etc\/init.d\/dtlogin stop<br \/>\n# \/usr\/dt\/bin\/dtconfig -d<br \/>\n# svcadm disable cde-login<br \/>\n# svcadm enable gdm2-login<br \/>\nOn OpenSolaris 2008.11, gdm refers to the service svc:\/application\/graphical-login\/gdm:default. There is no CDE login.<\/p>\n<p>On OpenIndiana, to add FVWM as a possible session, edit .dmrc:<\/p>\n<p>[Desktop]<br \/>\nSession=fvwm<br \/>\nLanguage=C<br \/>\nLayout=<br \/>\nXDMCP<\/p>\n<p>To configure XDMCP, launch gdmsetup then click on the remote tabs and activate &#8216;same as local&#8217;.<\/p>\n<p>The logs of XDMCP are sent to the console. Make sure that only GDM is launched not also CDE (disable service cde-login for gdm2-login).<br \/>\nOn OpenIndiana, activate XDCMP in \/etc\/gdm\/custom.conf<br \/>\n[xdmcp]<br \/>\nEnable=true<br \/>\nDisplaysPerHost=2<br \/>\nFonts<\/p>\n<p>To display usable fonts, use xfontsel<br \/>\nTo use a given font in a xterm, use -fn:<br \/>\nxterm -fn -*-fixed-medium-*-*-*-14-*-*-*-*-*-*-* &#038;<br \/>\nor create an ~\/XTerm file (or in ~\/.Xdefaults) and specify the fonts, size (etc) you wish to use:<\/p>\n<p>XTerm*font: 9&#215;15<br \/>\ncorresponds to:<br \/>\nxterm -font 9&#215;15 &#038;<br \/>\nFonts are typically located in \/usr\/X11\/lib\/X11\/fonts\/misc\/<br \/>\nSoftware Management<\/p>\n<p>Package management\tTypical install directories\tLocal package database\tComments<br \/>\npkgadd etc\t\/usr, \/usr\/sfw, \/opt\/sfw\t\/var\/sadm\/pkg\tDefault package management utility on Solaris. Does not handle dependencies. SUN&#8217;s packages are prefixed by SUNW (eg SUNWvbox).<br \/>\npkg-get\t\/opt\/csw\t\t&#8220;Old&#8221; Blastwave package management. Close to apt-get. Handles dependencies. Blastwave&#8217;s package are prefixed by CSW (eg CSWperl).<br \/>\npkgutil\t\/opt\/csw\t\tNew Blastwave package management. Close to apt-get. Handles dependencies. Install using pkgadd -d http:\/\/get.opencsw.org\/now, which fetches CSWpkgutil.<br \/>\nTo install the new PKI:<br \/>\n\/opt\/csw\/bin\/cswpki &#8211;import &#8211;force<br \/>\npkg\t\t\tNew package management of OpenSolaris. I don&#8217;t like it very much, it takes ages to run. Packages are prefixed with IPS (eg IPSgnutls)<\/p>\n<p>Commands\tSolaris\tpkg-get\tpkgutil\tIPS (OpenSolaris)<br \/>\nAdd \/ Install\tpkgadd -d <unzipped-package><br \/>\n1\/ unzip the package (gunzip, bunzip2, unzip&#8230;) and 2\/ pkgadd.\tpkg-get install <blastwave-package> (automatically downloads and installs dependencies)\t\tpkg install <IPS package><br \/>\nRemove\tpkgrm packagename\tpkg-get remove packagename<br \/>\nUpgrade<br \/>\npkg-get upgrade packagename<br \/>\nThis will upgrade all packages for which a new version exists. It consists in uninstalling the old version (remove) and then installing the new version (install). At first, seeing a remove operation may be surprising, but in the end, it works.<br \/>\nGet package details\tpkginfo -l packagename<br \/>\n$ pkginfo -l SUNWopenssl-commands<br \/>\n   PKGINST:  SUNWopenssl-commands<br \/>\n      NAME:  OpenSSL Commands (Usr)<br \/>\n  CATEGORY:  system<br \/>\n      ARCH:  i386<br \/>\n   VERSION:  11.11,REV=2008.10.30.20.37<br \/>\n    VENDOR:  Sun Microsystems, Inc.<br \/>\n      DESC:  OpenSSL Commands (Use)<br \/>\n   HOTLINE:  Please contact your local service provider<br \/>\n    STATUS:  completely installed<\/p>\n<p>pkg info package<br \/>\n$ pkg info -l SUNWxwplt<br \/>\n          Name: SUNWxwplt<br \/>\n       Summary: X Window System platform software<br \/>\n      Category: System\/X11<br \/>\n         State: Installed<br \/>\n     Publisher: opensolaris.org<br \/>\n       Version: 0.5.11<br \/>\n Build Release: 5.11<br \/>\n        Branch: 0.111<br \/>\nPackaging Date: Fri May  8 16:45:51 2009<br \/>\n          Size: 14.34 MB<br \/>\n          FMRI: pkg:\/SUNWxwplt@0.5.11,5.11-0.111:20090508T164551Z<\/p>\n<p>List contents of a package\tpkgchk -l <package> (also lists details)\t\t\tpkg contents <IPS package><br \/>\nExample:<br \/>\npkg contents xsane\/sane-backends<br \/>\nusr\/lib\/sane\/libsane-pixma.so.1<br \/>\nusr\/lib\/sane\/libsane-pixma.so.1.0.19<br \/>\nusr\/share\/man\/man5\/sane-pixma.5<br \/>\nSearch in which package a command belongs to\tgrep xxx \/var\/sadm\/install\/contents or \/usr\/sbin\/pkgchk -l -p thecommand\t\t\tpkg search -r <command><br \/>\nSearch for packages starting with a given name\t\t\tpkgutil -a blah<br \/>\nList all available packages on the server\t\t\tpkgutil -l<br \/>\nLocate software repositories\t\t\t\tpkg publisher<br \/>\nVerify an installation\t\t\t\tpkg verify package<br \/>\nThis will tell you for instance if a link is broken:<br \/>\npkg verify web\/browser\/firefox<br \/>\nPACKAGE                                                                 STATUS<br \/>\npkg:\/\/openindiana.org\/web\/browser\/firefox                                ERROR<br \/>\n\tlink: usr\/bin\/firefox<br \/>\n\t\tTarget: &#8216;\/opt\/sfw\/lib\/firefox\/firefox&#8217; should be &#8216;..\/lib\/firefox\/firefox&#8217;<\/p>\n<p>There&#8217;s a nice comparison between Debian&#8217;s apt-get and IPS or pkgadd \/ IPS: here.<br \/>\nPatches<\/p>\n<p>On Solaris: use the Sun Connection Update Manager (last version is currently 1.0.4). To do so, it is mandatory to register Solaris. The command line tool is \/usr\/sbin\/updatemanager (run as root). This will ask for registration if you haven&#8217;t done so yet). This is a graphical interface.<br \/>\nI encountered a serious problem with patches: I patched the system with security or recommended patches, some of those patches failed, and then at the next reboot: kernel crash (impossible to boot, except in single user mode). So beware&#8230; See Sun&#8217;s Forums and Google Groups: looks like others encountered the same problem\u00e2\u20ac\u00a6<\/p>\n<p>On OpenSolaris: launch \/usr\/sbin\/updatemanager<br \/>\npkg-get<\/p>\n<p>To install pkg-get,<br \/>\nGet pkg-get from Blastwave.<br \/>\nInstall it: pkgadd -d pkg_get-3.8.4-SunOS5.8-all-CSW.pkg. The procedure is perfectly described on Blastwave&#8217;s site. Check its digest with:<br \/>\ndigest -v -a md5 pkg_get.pkg<br \/>\nThen configure it in \/opt\/csw\/etc\/pkg-get.conf. Set up the mirror to use, the tree version (stable, unstable, testing), and the download directory (by default: \/var\/pkg-get\/donwloads).<br \/>\nurl=http:\/\/ibiblio.org\/pub\/packages\/solaris\/csw\/unstable<br \/>\nPKGGET_DOWNLOAD_DIR=\/tmp<br \/>\nThen use pkg-get to install Blastwave packages.<br \/>\npkgutil<\/p>\n<p>Blastwave has recently replaced pkg-get by pkgutil. To install pkgutil,<\/p>\n<p>get the package<br \/>\ndo: pkgadd -d <pkgutil-pkg>\nthen use pkgutil to handle other packages.<br \/>\nUsing other packages<\/p>\n<p>Unpack a debian package:<\/p>\n<p>\/usr\/xpg4\/bin\/ar x package.deb<br \/>\ngunzip data.tar.gz<br \/>\ntar -xvf data.tar<br \/>\nKernel module<\/p>\n<p>List which kernel module is installed: modinfo<br \/>\nLoad a kernel module: modload<br \/>\nDeveloper&#8217;s corner<\/p>\n<p>Bash<\/p>\n<p>A very simple .bashrc on Solaris:<br \/>\nexport PATH=\/usr\/bin\/amd64:$PATH:\/opt\/csw\/bin:.<br \/>\nexport PS1=&#8221;[\\u@\\w] &#8221;<br \/>\nOn OpenSolaris:<br \/>\nPS1=&#8217;${LOGNAME}@$(\/usr\/bin\/hostname):$(<br \/>\n    [[ &#8220;${LOGNAME}&#8221; == &#8220;root&#8221; ]] &#038;&#038; printf &#8220;%s&#8221; &#8220;${PWD\/${HOME}\/~}# &#8221; ||<br \/>\n    printf &#8220;%s&#8221; &#8220;${PWD\/${HOME}\/~}\\$ &#8220;)&#8217;<\/p>\n<p>export PATH=$PATH:\/usr\/local\/bin:\/usr\/share\/bin<br \/>\n32-bit vs 64-bit<\/p>\n<p>To know whether your architecture is 32 or 64 bit: isainfo -b<\/p>\n<p>There&#8217;s a very interesting article on Blog&#8217;o thnet.<\/p>\n<p>To summarize, on 64-bit processors, the kernel, device drivers and some key applications (or those with a high performance issue) are 64-bit, but all other applications are usually 32-bit. There are no emulation libraries on Solaris 64 to run 32-bit libraries: there are two different system calls.<\/p>\n<p>To check whether a given application is 32 or 64 bit, run file:<\/p>\n<p>$ file \/usr\/bin\/amd64\/ls<br \/>\n\/usr\/bin\/amd64\/ls:      ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, stripped<br \/>\nThis also means that on 64-bit hosts, you should set your PATH to locate 64-bit applications before 32-bit ones. For example \/usr\/bin\/amd64 should be set before \/usr\/bin.<\/p>\n<p>Compilers etc<\/p>\n<p>For Solaris, there&#8217;s a very interesting article on the subject here. Mainly, what I get of out it is:<br \/>\nno need to install a gcc package (such as CSWgcc) because gcc is usually installed by default in \/usr\/sfw (mine is version 3.4.3).<br \/>\nno need to install gmake (3.80) either: it&#8217;s already installed in \/usr\/sfw.<br \/>\nput \/usr\/sfw\/bin at the top of your path, and remove \/usr\/ucb (or leave it at the end of your path &#8211; because it points to an &#8216;old&#8217; cc).<br \/>\ninstall Sun Studio to get cc (among other things). Actually, cc is said to be better than gcc (faster code), but gcc is perhaps better known by GNU\/Free addicts. Anyway, if cc is installed, add \/opt\/SUNWspro\/bin to your path.<br \/>\nFor example,<\/p>\n<p>export PATH=\/usr\/bin\/amd64:\/usr\/sfw\/bin:\/opt\/csw\/bin:\/usr\/ccs\/bin:\/usr\/openwin\/bin:\/usr\/bin:\/bin:.<br \/>\nexport LD_LIBRARY_PATH=\/usr\/sfw\/lib\/amd64:\/lib\/amd64:\/usr\/lib\/amd64:\/usr\/sfw\/lib:\/lib:\/usr\/lib:\/opt\/csw\/lib:.<br \/>\nexport MAKE=gmake<br \/>\nFor OpenSolaris, install SUNWgcc and SUNWgmake.<br \/>\nLibrary path<\/p>\n<p>According to Rich Teer&#8217;s article, programs should actually be linked with the -R option. This strategy reduces the need for a LD_LIBRARY_PATH.<\/p>\n<p>However, in situations where the program hasn&#8217;t been linked that way, there are 2 different ways to configure your library path on Solaris:<\/p>\n<p>set the common LD_LIBRARY_PATH and LD_LIBRARY_PATH_64 environment variables<br \/>\nor use the crle (Configuration Runtime Linker Environment) command.<br \/>\nTo list your current paths: crle or crle -64 To set new paths: crle -l <a path> -l <another path> \u00e2\u20ac\u00a6<\/p>\n<p>Typical required paths are: \/lib, \/usr\/lib, \/opt\/csw\/lib, \/opt\/SUNWspro\/lib.<\/p>\n<p>GRUB<\/p>\n<p>The menu to edit is in \/rpool\/boot\/grub\/menu.lst. You get its location by typing bootadm list-menu<br \/>\nModifying GRUB live<\/p>\n<p>When the system starts and the GRUB selections shows, edit the boot entries by typing &#8216;e&#8217;. Other commands:<br \/>\n&#8216;d&#8217; to delete a line<br \/>\n&#8216;b&#8217; to boot<br \/>\nThose modifications are temporary.<br \/>\nRestoring GRUB<\/p>\n<p>To restore GRUB (and be able to boot Solaris) when @## someone\/something has scratched it, do:<\/p>\n<p>boot from the install CD of Solaris<br \/>\nFor Solaris 10, select &#8220;6&#8221; for a prompt, single user mode<br \/>\nrestore the boot loader<br \/>\ninstallgrub -m \/boot\/grub\/stage1 \/boot\/grub\/stage2 \/dev\/rdsk\/c0d0s0<br \/>\nNB. installboot is now obsolete.<\/p>\n<p>See more information on BigAdmin.<\/p>\n<p>Updating GRUB<\/p>\n<p>The command is:<br \/>\n\/mnt\/boot\/solaris\/bin\/update_grub -R \/mnt<br \/>\nwhere \/mnt is the root one wants to boot.<br \/>\nBooting with or without boot information text<\/p>\n<p>By default, OpenSolaris configures GRUB so that there is a &#8216;nice&#8217; graphical splash screen. Unfortunately, when you&#8217;re fine tuning your OS, this prevents you from seeing the messages, so you might prefer to move back to text boot.<br \/>\nTo do so, first, locate the GRUB menu file:<br \/>\n$ bootadm list-menu<br \/>\nthe location for the active GRUB menu is: \/a\/rpool\/boot\/grub\/menu.lst<br \/>\ndefault 0<br \/>\ntimeout 10<br \/>\n0 OpenSolaris 2008.11 snv_101b_rc2 X86 With Splash Screen<br \/>\nNotice in my case, the menu file is located in \/a\/rpool\/boot\/grub\/menu.lst. Edit that file with your favorite text editor so that such an entry<br \/>\ntitle OpenSolaris 2009.06 snv_111b With Splash Screen<br \/>\nfindroot (pool_rpool,1,a)<br \/>\nsplashimage \/boot\/solaris.xpm<br \/>\nforeground d25f00<br \/>\nbackground 115d93<br \/>\nbootfs rpool\/ROOT\/opensolaris-1<br \/>\nkernel$ \/platform\/i86pc\/kernel\/$ISADIR\/unix -B $ZFS-BOOTFS,console=graphics<br \/>\nmodule$ \/platform\/i86pc\/$ISADIR\/boot_archive<br \/>\nbecomes like this:<br \/>\ntitle OpenSolaris 2009.06 snv_111b text boot<br \/>\nfindroot (pool_rpool,1,a)<br \/>\nbootfs rpool\/ROOT\/opensolaris-1<br \/>\nkernel$ \/platform\/i86pc\/kernel\/$ISADIR\/unix -B $ZFS-BOOTFS<br \/>\nmodule$ \/platform\/i86pc\/$ISADIR\/boot_archive<br \/>\ni.e remove the splashimage, foreground, background and console=graphics from the file.<br \/>\nIt&#8217;s done ! You can reboot. However, I recommend you always backup your old GRUB menu. NB. This can be modified &#8216;live&#8217; at boot time, by typing e to edit the GRUB menu when it displays.<br \/>\nSelect the default GRUB menu<\/p>\n<p>pfexec bootadm set-menu default=3<br \/>\nThe GRUB menu can be located using bootadm list-menu.<br \/>\nBoot environments<\/p>\n<p>It is possible to create several boot environments and boot different versions of Solaris, using a utility named beadm. In particular, the upgrade process actually creates a new boot environment for the new upgrade. Beadm seamlessly handles the tasks of copying all relevant file systems and updating GRUB. To list boot environments<br \/>\n$ beadm list<br \/>\nBE            Active Mountpoint Space Policy Created<br \/>\n&#8212;            &#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;-<br \/>\nopensolaris   &#8211;      &#8211;          7.57G static 2009-01-03 13:18<br \/>\nopensolaris-1 NR     \/          3.59G static 2009-07-20 22:38<br \/>\nTo mount an unmounted boot environment, do<br \/>\n$ beadm mount name \/some\/where<br \/>\nTo destroy a boot environment (deletes the corresponding dataset with all files in it, but only unshared files):<br \/>\nbeadm destroy name<br \/>\nFor instance, if you destroy opensolaris,<br \/>\n$ beadm destroy opensolaris<br \/>\n$ beadm list<br \/>\nBE            Active Mountpoint Space  Policy Created<br \/>\n&#8212;            &#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8211;  &#8212;&#8212; &#8212;&#8212;-<br \/>\nopensolaris-1 NR     \/          11.80G static 2009-07-20 22:38<br \/>\nYou can also get information on disk space using:<br \/>\n$ df \/<br \/>\nFilesystem           1K-blocks      Used Available Use% Mounted on<br \/>\nrpool\/ROOT\/opensolaris-1<br \/>\n                      14266663   7646247   6620416  54% \/<br \/>\nreboot<\/p>\n<p>Quick reboot:<br \/>\nreboot -f<br \/>\nThis command should be faster&#8230; To transition between BEs, use the init 6 \/ luactivate command.<br \/>\nPartitioning<\/p>\n<p>Solaris cuts partition into slices. Those slices are numbered 0 to 7 and they correspond to the &#8216;s&#8217; of the device (c0t0d0s3 refers to slice number 3). Slice number 2 is reserved and refers to the entire disk by convention.<\/p>\n<p>Slices of a given partition may be listed with format.<\/p>\n<p>On Solaris 10, use the command &#8216;print&#8217; to show the current layout of a given disk.<br \/>\npartition> print<br \/>\nCurrent partition table (unnamed):<br \/>\nTotal disk cylinders available: 39691 + 2 (reserved cylinders)<\/p>\n<p>Part      Tag    Flag     Cylinders         Size            Blocks<br \/>\n  0 unassigned    wm       0 &#8211; 27046       13.00GB    (27047\/0\/0) 27263376<br \/>\n  1 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  2     backup    wu       0 &#8211; 39690       19.08GB    (39691\/0\/0) 40008528<br \/>\n  3 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  4 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  5 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  6 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  7 unassigned    wm       0                0         (0\/0\/0)            0<\/p>\n<p>partition> 3<\/p>\n<p>Part      Tag    Flag     Cylinders         Size            Blocks<br \/>\n3 unassigned    wm       0                0         (0\/0\/0)            0<\/p>\n<p>Enter partition id tag[unassigned]:<br \/>\nEnter partition permission flags[wm]:<br \/>\nEnter new starting cyl[0]: 27047<br \/>\nEnter partition size[0b, 0c, 27047e, 0.00mb, 0.00gb]: 39690e<br \/>\npartition> print<br \/>\nCurrent partition table (unnamed):<br \/>\nTotal disk cylinders available: 39691 + 2 (reserved cylinders)<\/p>\n<p>Part      Tag    Flag     Cylinders         Size            Blocks<br \/>\n  0 unassigned    wm       0 &#8211; 27046       13.00GB    (27047\/0\/0) 27263376<br \/>\n  1 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  2     backup    wu       0 &#8211; 39690       19.08GB    (39691\/0\/0) 40008528<br \/>\n  3 unassigned    wm   27047 &#8211; 39690        6.08GB    (12644\/0\/0) 12745152<br \/>\n  4 unassigned    wm       0                0         (0\/0\/0)            0<\/p>\n<p>  5 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  6 unassigned    wm       0                0         (0\/0\/0)            0<br \/>\n  7 unassigned    wm       0                0         (0\/0\/0)            0<\/p>\n<p>partition> label<br \/>\nReady to label disk, continue? yes<\/p>\n<p>partition> quit<\/p>\n<p>format> volname<br \/>\nEnter 8-character volume name (remember quotes)[&#8220;&#8221;]:secondar<br \/>\nReady to label disk, continue? yes<\/p>\n<p>On OpenSolaris, use verify.<br \/>\naxelle@boureautic:~# format<br \/>\nSearching for disks&#8230;done<br \/>\nAVAILABLE DISK SELECTIONS:<br \/>\n       0. c3d0 <\/p>\n<p>To show the disk partitions (not slices), use parted (or gparted).<br \/>\n$ parted \/dev\/dsk\/c5t1d0p0<br \/>\nGNU Parted 1.8.8<br \/>\nUsing \/dev\/dsk\/c5t1d0p0<br \/>\nWelcome to GNU Parted! Type &#8216;help&#8217; to view a list of commands.<br \/>\n(parted) print<br \/>\nprint<br \/>\nModel: Generic Ide (ide)<br \/>\nDisk \/dev\/dsk\/c5t1d0p0: 500GB<br \/>\nSector size (logical\/physical): 512B\/512B<br \/>\nPartition Table: msdos<\/p>\n<p>Number  Start   End    Size   Type      File system  Flags<br \/>\n 1      1049kB  106MB  105MB  primary   ntfs         boot<br \/>\n 2      106MB   115GB  115GB  primary   ntfs<br \/>\n 3      115GB   273GB  157GB  primary<br \/>\n 4      273GB   500GB  227GB  extended               lba<br \/>\n 5      273GB   377GB  105GB  logical<br \/>\n 6      377GB   500GB  123GB  logical   solaris<br \/>\nZFS<\/p>\n<p>ZFS is awesome !<br \/>\nPools<\/p>\n<p>Pool creation<\/p>\n<p>The good news about ZFS is that it&#8217;s as great as expected. Storage units may span over partitions: several disks, devices, partitions and even files can be gathered in a single zfs pool, and then, from that pool virtual disk spaces can be provided the way you want.<\/p>\n<p>zpool create -f pool c0d0s6 c0d0s7<br \/>\nDevices can easily be set for mirroring or RAIDZ. It&#8217;s as simple as adding a keyword to the command. However, make sure mirroring or raidz is what you need. For instance, my c0d0s6 slice has 15G and c0d0s7 has 17G. If I mirror them, I basically &#8220;lose&#8221; 2G in the second array. That&#8217;s not something I want at home (at work, the answer might be different).<\/p>\n<p>zpool create -f pool raidz c0d0s6 c0d0s7<br \/>\nzfs list<br \/>\nNAME   USED  AVAIL  REFER  MOUNTPOINT<br \/>\npool    87K  15,3G  24,5K  \/pool<br \/>\nzfs destroy pool<br \/>\nzpool create -f pool c0d0s6 c0d0s7<br \/>\nzfs list<br \/>\nNAME   USED  AVAIL  REFER  MOUNTPOINT<br \/>\npool    87K  32,5G  24,5K  \/pool<br \/>\nTrying ZFS on simulated disks<\/p>\n<p>Don&#8217;t have any available disk slices but want to try ZFS ? It&#8217;s possible to simulate pools with a file:<br \/>\nmkfile 100m \/disk1<br \/>\nCompression<\/p>\n<p>It&#8217;s very easy to set compression<\/p>\n<p>zfs set compression=on pool<br \/>\nFor example:<\/p>\n<p># zpool create -f pool c0d0s6 c0d0 s7<br \/>\n# zfs create pool\/axelle<br \/>\n# zfs create pool\/opt<br \/>\n# zfs set mountpoint=\/opt pool\/opt<br \/>\n# zfs set compression=on pool<br \/>\n# zfs set mountpoint=\/export\/home\/axelle pool\/axelle<br \/>\nNote before creating the pool, the two slices c0d0s6 &#038; c0d0s7 should be backuped, unmounted and removed from \/etc\/vsftab. Then, once the pool is created, the original content can be restored. Also, mountpoints are acceptable only if they exist: make sure \/export\/home\/axelle exists first. To see if a given pool has compression on,<br \/>\n$ zfs list -o name,compression<br \/>\nNAME                           COMPRESS<br \/>\nbackup                              off<br \/>\nbackup\/backup1                       on<br \/>\nrpool                               off<br \/>\nQuota, Reservations<\/p>\n<p>To see if there is a quota on a ZFS pool:<br \/>\n$ zfs get quota rpool<br \/>\nNAME   PROPERTY  VALUE  SOURCE<br \/>\nrpool  quota     none   default<br \/>\nIt&#8217;s a good idea to set quotas to make sure your partitions are not 100% full which is a problem (I tested&#8230;). To do so, ZFS talks of &#8220;reservations&#8221;: you reserve a given amount on the partition that should always be free.<br \/>\n$ pfexec zfs set reservation=500m rpool<br \/>\n$ zfs get reservation rpool<br \/>\nNAME   PROPERTY     VALUE   SOURCE<br \/>\nrpool  reservation  500M    local<br \/>\nShare a pool on NFS<\/p>\n<p>To share a pool on NFS:<br \/>\nzfs set sharenfs=on mypool<br \/>\nzfs get sharenfs mypool<br \/>\nsharemgr show -vp<br \/>\nPool Status<\/p>\n<p>$ zpool status<br \/>\n  pool: rpool<br \/>\n state: ONLINE<br \/>\nstatus: The pool is formatted using an older on-disk format.  The pool can<br \/>\n        still be used, but some features are unavailable.<br \/>\naction: Upgrade the pool using &#8216;zpool upgrade&#8217;.  Once this is done, the<br \/>\n        pool will no longer be accessible on older software versions.<br \/>\n scrub: none requested<br \/>\nconfig:<\/p>\n<p>        NAME        STATE     READ WRITE CKSUM<br \/>\n        rpool       ONLINE       0     0     0<br \/>\n          c3d0s0    ONLINE       0     0     0<br \/>\nListing file systems<\/p>\n<p>This is the configuration I currently use on OpenSolaris:<br \/>\n# zfs list<br \/>\nNAME                       USED  AVAIL  REFER  MOUNTPOINT<br \/>\nrpool                     41.3G  6.71G  1.42G  \/a\/rpool<br \/>\nrpool\/ROOT                5.78G  6.71G    18K  legacy<br \/>\nrpool\/ROOT\/opensolaris    5.78G  6.71G  5.32G  \/<br \/>\nrpool\/dump                 895M  6.71G   895M  &#8211;<br \/>\nrpool\/export              32.3G  6.71G    19K  \/export<br \/>\nrpool\/export\/home         32.3G  6.71G   551M  \/export\/home<br \/>\nrpool\/export\/home\/axelle  31.7G  6.71G  31.3G  \/export\/home\/axelle<br \/>\nrpool\/swap                 895M  7.50G  88.3M  &#8211;<br \/>\nThe REFER column is the size of the file system if it stood alone.<br \/>\nThe MOUNTPOINT column indicates where the file system is to be mounted. It does not indicate the file system is actually mounted. To list more options, such as whether the file system is mounted or not, mountable or not etc, do:<br \/>\n$ zfs list -o name,mountpoint,canmount,mounted<br \/>\nNAME                      MOUNTPOINT           CANMOUNT  MOUNTED<br \/>\nrpool                     \/a\/rpool                   on      yes<br \/>\nrpool\/ROOT                legacy                    off       no<br \/>\nrpool\/ROOT\/opensolaris    \/                      noauto       no<br \/>\nrpool\/ROOT\/opensolaris-1  \/                      noauto      yes<br \/>\nrpool\/dump                &#8211;                           &#8211;        &#8211;<br \/>\nrpool\/export              \/export                    on      yes<br \/>\nrpool\/export\/home         \/export\/home               on      yes<br \/>\nrpool\/export\/home\/axelle  \/export\/home\/axelle        on      yes<br \/>\nrpool\/swap<br \/>\nSnapshots<\/p>\n<p>This is a great feature of ZFS:<br \/>\nSetting up snapshots: time-slider-setup<br \/>\nMounting a ZFS pool:<br \/>\nzfs import -r <poolname>\nListing snapshots in a given pool:<br \/>\nzfs list -t snapshot<br \/>\nor even: zfs list -t snapshot -o name,used<br \/>\nDestroying a given snapshot (if your system is 100% full and you absolutely need some space):<br \/>\nzfs destroy thesnapshot<br \/>\nRestoring a given snapshot:<br \/>\nzfs rollback -rRf <name><br \/>\nTroubleshooting ZFS pools<\/p>\n<p>If disks in the pool have changed names (sda, sdb&#8230;), the pool won&#8217;t be available. To fix, that:<br \/>\nexport the pool: sudo zpool export pool<br \/>\nget the id of the disk (if you want to import by disk-id):<br \/>\n$ sudo zpool import<br \/>\n   pool: pool<br \/>\n     id: 12116846563890507123<br \/>\n  state: ONLINE<br \/>\n action: The pool can be imported using its name or numeric identifier.<br \/>\n config:<\/p>\n<p>        pool                                               ONLINE<br \/>\n          ata-WDC_WD5000AADS-00S9B0_WD-WCAV90510116-part6  ONLINE<br \/>\nimport the disk by id:<br \/>\n$ sudo zpool import -d \/dev\/disk\/by-id 12116846563890507123<br \/>\nSystem crash dump<\/p>\n<p>$ pfexec dumpadm<br \/>\n      Dump content: kernel pages<br \/>\n       Dump device: \/dev\/zvol\/dsk\/rpool\/dump (dedicated)<br \/>\nSavecore directory: \/var\/crash\/boureautic<br \/>\n  Savecore enabled: no<br \/>\nTo set the size for the dump on ZFS<br \/>\nzfs set volsize=2G rpool\/dump<br \/>\nSwap<\/p>\n<p>$ swap -l<br \/>\nswapfile             dev    swaplo   blocks     free<br \/>\n\/dev\/zvol\/dsk\/rpool\/swap 182,2         8  1832952  1832952<br \/>\nMounting partitions<\/p>\n<p>To mount existing partitions:<\/p>\n<p>UFS: default file system for Solaris, no need to specify file system type: mount \/dev\/dsk\/\u00e2\u20ac\u00a6 \/mountpoint<br \/>\nFAT: use &#8216;pcfs&#8217; file system type. If the partition is located in a primary partition (number N &#8211; for PCs between 1 and 4), you can simply mount that partition:<br \/>\nmount -F pcfs \/dev\/dsk\/c0d0pN \/mountpoint<br \/>\nwhere p0 means the whole disk and p1 to p4 refer to the primary fdisk partitions.<br \/>\nHowever, there&#8217;s another way to mount that partition: c0d0p0:<letter or number>. The letter ranges from c to z, and the number starts at 1. To select the first FAT partition: c0d0p0:1 or c0d0p0:c will do the trick. To select the second partition: c0d0p0:2 or c0d0p0:d. Note it&#8217;s always p0. Beware: the letter won&#8217;t always match the Windows unit drive. If your first unit drive (C:\\) is a NTFS, then D:\\ is FAT and E:\\ is FAT, the first FAT partition is D:\\ &#8230; but to mount it in Solaris use c0d0p0:1 or c0d0p0:c !<\/p>\n<p>This method is particularly useful to mount partitions located within extended partition, because there&#8217;s no way to address the partition directly with a c0d0pN.<\/p>\n<p>NFS: useful command: sharemgr show -vp<br \/>\nNTFS: not supported by Solaris<br \/>\nFor automatic mounting, add an entry to \/etc\/vfstab:<\/p>\n<p>\/dev\/dsk\/c0d0p3 \/dev\/rdsk\/c0d0p3        \/mnt\/win_e      pcfs    3       yes<br \/>\nTo mount a file as a filesystem, use lofiadm (loopback file driver). I haven&#8217;t tried that yet, but see instructions here.<\/p>\n<p>Samba: this is a nice solution to mount remote Windows shares.<br \/>\npfexec mount -F smbfs -o uid=username \/\/host\/share \/mntpoint<br \/>\nThe partition will be mounted for the specified username.<br \/>\nTo do so, the samba client service must be started:<\/p>\n<p>pfexec svcadm enable svc:\/network\/smb\/client:default<br \/>\nNB. Samba uses the following packages:<br \/>\nsystem      SUNWsmbau     samba &#8211; A Windows SMB\/CIFS fileserver for UNIX (Usr)<br \/>\nsystem      SUNWsmbfskr   SMB\/CIFS File System client support (Kernel)<br \/>\nsystem      SUNWsmbfsr    SMB\/CIFS File System client support (Root)<br \/>\nsystem      SUNWsmbfsu    SMB\/CIFS File System client support (Usr)<br \/>\nfor server:<br \/>\nsystem      SUNWsmbskr    SMB Server (Kernel)<br \/>\nsystem      SUNWsmbsr     SMB Server (Root)<br \/>\nsystem      SUNWsmbsu     SMB Server (Usr)<br \/>\nsystem      SUNWsmbau     samba &#8211; A Windows SMB\/CIFS fileserver for UNIX (Usr)<br \/>\nMounting a USB card<\/p>\n<p>Plug it in, and then check where it has been mounted using df -h. My mobile phone is mounted in \/rmdisk\/noname .<\/p>\n<p>Mounting a USB IOMEGA drive<\/p>\n<p>Plug it in. It automatically mounts in \/media\/IOMEGA_HDD on my system.<\/p>\n<p>Zones<\/p>\n<p>Zones are sorts of virtual environments. You can run different &#8216;branded&#8217; OS in each zones, in particular other Solaris or&#8230; a Linux. The zones (normally) don&#8217;t communicate with each other, so it&#8217;s a safe (or safer) way to isolate systems. This page explains how to install a Linux Zone on OpenSolaris. Below, I shall rather detail a few common zone commands. Listing zones:<br \/>\n$ zoneadm list -vc<br \/>\n  ID NAME             STATUS     PATH                           BRAND    IP<br \/>\n   0 global           running    \/                              native   shared<br \/>\n   &#8211; lzonelinux       installed  \/a\/rpool\/zones\/lzonelinux      lx       shared<br \/>\n&#8230;<br \/>\n$ zoneadm list -vc<br \/>\n  ID NAME             STATUS     PATH                           BRAND    IP<br \/>\n   0 global           running    \/                              native   shared<br \/>\n   1 lzonelinux       running    \/a\/rpool\/zones\/lzonelinux      lx       shared<br \/>\nrunning: means the OS in the zone is up and running<br \/>\ninstalled: means the zone is operational, but it is not running currently<br \/>\nViewing the configuration for a zone:<br \/>\n$ zonecfg -z lzonelinux<br \/>\nzonecfg:lzonelinux> export<br \/>\ncreate -b<br \/>\nset zonepath=\/rpool\/zones\/lzonelinux<br \/>\nset brand=lx<br \/>\nset autoboot=false<br \/>\nset ip-type=shared<br \/>\nadd net<br \/>\nset address=x.y.z.w\/24<br \/>\nset physical=yukonx0<br \/>\nend<br \/>\nadd attr<br \/>\nset name=kernel-version<br \/>\nset type=string<br \/>\nset value=2.6<br \/>\nend<br \/>\nOther solution: zonecfg, then info.<br \/>\nzonecfg -z lzonelinux<br \/>\nWARNING: you do not have write access to this zone&#8217;s configuration file;<br \/>\ngoing into read-only mode.<br \/>\nzonecfg:lzonelinux> info<br \/>\nzonename: lzonelinux<br \/>\nzonepath: \/a\/rpool\/zones\/lzonelinux<br \/>\nbrand: lx<br \/>\nautoboot: false<br \/>\nbootargs:<br \/>\npool:<br \/>\nlimitpriv:<br \/>\nscheduling-class:<br \/>\nip-type: shared<br \/>\nhostid:<br \/>\nnet:<br \/>\n        address: x.y.z.w\/24<br \/>\n        physical: yukonx0<br \/>\n        defrouter not specified<br \/>\nattr:<br \/>\n        name: kernel-version<br \/>\n        type: string<br \/>\n        value: 2.6<br \/>\nNote that it is not possible to modify the zone path for an installed zone. The zone must first be uninstalled:<br \/>\npfexec zoneadm -z lzonelinux uninstall<br \/>\nAre you sure you want to uninstall zone lzonelinux (y\/[n])? y<br \/>\nTo boot an (installed) zone:<br \/>\npfexec zoneadm -z lzonelinux boot<br \/>\nThen login:<br \/>\npfexec zlogin lzonelinux<br \/>\n[Connected to zone &#8216;lzonelinux&#8217; pts\/7]<br \/>\nWelcome to your shiny new Linux zone.<br \/>\n&#8230;<br \/>\nTo stop (halt) a zone:<br \/>\npfexec zoneadm -z lzonelinux halt<\/p>\n<p>Detecting hardware<\/p>\n<p>To scan PCI devices, do scanpci (as root).<\/p>\n<p># \/usr\/X11\/bin\/scanpci -v<br \/>\nor<br \/>\n# prtconf -v -p<br \/>\nor<br \/>\n# prtdiag<br \/>\nTo list connected hardware<\/p>\n<p>cfgadm -al<br \/>\nTo get status of hardware<\/p>\n<p>iostat -En<\/p>\n<p>To detect new hardware<\/p>\n<p>touch \/reconfigure<br \/>\nTo list USB devices (or removable devices):<br \/>\n$ rmformat -l<br \/>\nAdding a hard disk<\/p>\n<p>When adding a new hard disks, the following tasks should be done:<\/p>\n<p>connect the hard disk and detect it (touch \/reconfigure). It is detected when new entries in \/dev\/rdsk appear, such as c0t1d0*. This can also be confirmed by the format command, which displays all visible disks.<br \/>\nmake sure the disk is formatted using the format command: the message &#8220;disk formatted&#8221; should be displayed<br \/>\npartition the hard disk as desired, using the format command. To list partitions, use the format command. The flag wm means &#8220;writable and mountable&#8221;, wu &#8220;writable but unmountable&#8221;, rm &#8220;read-only and mountable&#8221;.<br \/>\nlabel the disk once partitions are correct. Use the format command. Then, the prtvtoc command should display the correct layout of partitions.<br \/>\ncreate a new file system, using newfs (newfs \/dev\/rdsk\/c0t1d0s0). This creates a UFS file system.<br \/>\nmount it ! (using mount) (mount \/dev\/dsk\/c0t1d0s0 \/backup)<br \/>\nNetwork card installation<\/p>\n<p>My network card:<\/p>\n<p>pci bus 0x0002 cardnum 0x00 function 0x00: vendor 0x11ab device 0x4364<br \/>\n Marvell Technology Group Ltd.  Device unknown<br \/>\n CardVendor 0x105b card 0x0e0a (Card unknown)<br \/>\n  STATUS    0x0010  COMMAND 0x0047<br \/>\n  CLASS     0x02 0x00 0x00  REVISION 0x20<br \/>\n  BIST      0x00  HEADER 0x00  LATENCY 0x00  CACHE 0x01<br \/>\n  BASE0     0x00000000fddfc004  addr 0x00000000fddfc000  MEM 64BIT<br \/>\n  BASE2     0x0000ee01  addr 0x0000ee00  I\/O<br \/>\n  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0x0a<br \/>\n  BYTE_0    0x00  BYTE_1  0x00  BYTE_2  0xf0  BYTE_3  0x01<br \/>\nDownload the Solaris package (I tried version 8.19.2.3), gunzip it, untar. Finally, do pkgadd -d . YUKONXsolx. Then, configure the network.<\/p>\n<p>\/etc\/rcS.d\/S50yukonx<br \/>\n\/kernel\/drv\/amd64\/yukonx<br \/>\n\/kernel\/drv\/yukonx.conf<br \/>\n\/usr\/sbin\/yukonx_vlan_config<br \/>\n\/usr\/share\/man\/man7d\/yukonx.7d<br \/>\n[ verifying class <none> ]<br \/>\n[ verifying class <master> ]<br \/>\n## Executing postinstall script.<br \/>\nadd_drv yukonx<br \/>\nstarting network interfaces &#8230;<br \/>\nyukonx0 started<br \/>\nMy Firewire card:<\/p>\n<p>pci bus 0x0003 cardnum 0x06 function 0x00: vendor 0x104c device 0x8024<br \/>\n Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY\/Link)<br \/>\n CardVendor 0x105b card 0x0e0a (Foxconn International, Inc., Card unknown)<br \/>\n  STATUS    0x0210  COMMAND 0x0006<br \/>\n  CLASS     0x0c 0x00 0x10  REVISION 0x00<br \/>\n  BIST      0x00  HEADER 0x00  LATENCY 0x40  CACHE 0x01<br \/>\n  BASE0     0xfdbff000  addr 0xfdbff000  MEM<br \/>\n  BASE1     0xfdbf8000  addr 0xfdbf8000  MEM<br \/>\n  MAX_LAT   0x04  MIN_GNT 0x02  INT_PIN 0x01  INT_LINE 0x0a<br \/>\nMAC address<\/p>\n<p>$ arp -a<br \/>\nApple Time Capsule<\/p>\n<p>Time Capsules are shared using Samba. To discover an existing time capsule, do:<br \/>\n$ smbclient &#8211;no-pass -L 192.168.0.13<br \/>\nDomain=[WORKGROUP] OS=[Apple Base Station] Server=[CIFS 4.32]<br \/>\nSound card<\/p>\n<p>My sound card:<\/p>\n<p>pci bus 0x0000 cardnum 0x14 function 0x02: vendor 0x1002 device 0x4383<br \/>\n ATI Technologies Inc SB600 Azalia<br \/>\n CardVendor 0x105b card 0x0e0a (Foxconn International, Inc., Card unknown)<br \/>\n  STATUS    0x0410  COMMAND 0x0006<br \/>\n  CLASS     0x04 0x03 0x00  REVISION 0x00<br \/>\n  BIST      0x00  HEADER 0x00  LATENCY 0x40  CACHE 0x01<br \/>\n  BASE0     0x00000000fe024004  addr 0x00000000fe024000  MEM 64BIT<br \/>\n  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0x0b<br \/>\n  BYTE_0    0x00  BYTE_1  0x00  BYTE_2  0x02  BYTE_3  0x00<br \/>\nOn Solaris 10, I use the OSS driver oss-solaris-v4.1-rc2-i386.pkg. On OpenSolaris, the sound card is automatically recognized \ud83d\ude42<br \/>\npkgadd -d oss-solaris-v4.1-rc2-i386.pkg<br \/>\n[&#8230;]<br \/>\n## Installing part 1 of 1.<br \/>\n\/etc\/oss\/devices.list<br \/>\n\/etc\/oss <implied directory><br \/>\n\/etc\/oss\/version.dat<br \/>\n\/kernel\/drv\/amd64\/oss_hdaudio<br \/>\n\/usr\/bin\/osstest<br \/>\n\/usr\/bin\/ossxmix<br \/>\n\/usr\/include\/oss\/oss_userdev_exports.h<br \/>\n\/usr\/include\/oss <implied directory><br \/>\n\/usr\/include\/sys\/soundcard.h<br \/>\n\/usr\/man\/man1\/ossinfo.1<br \/>\n\/usr\/man\/man7d\/oss_hdaudio.7d<br \/>\n\/usr\/sbin\/ossdetect<br \/>\n\/usr\/sbin\/ossdevlinks<br \/>\n\/usr\/sbin\/osslic<br \/>\n\/usr\/sbin\/ossupdate<br \/>\n\/usr\/sbin\/savemixer<br \/>\n\/usr\/sbin\/soundoff<br \/>\n\/usr\/sbin\/soundon<br \/>\n\/usr\/sbin\/vmixctl<br \/>\n## Executing postinstall script.<br \/>\nSetting up Open Sound System&#8230;.please wait<br \/>\nunloaded osscommon<br \/>\ncan&#8217;t unload the module: Device busy<br \/>\nadd_drv -m &#8216;* 0666 root sys&#8217; osscore<br \/>\nadd_drv -m &#8216;* 0666 root sys&#8217; -i &#8216;&#8221;pci1002,4383&#8243;&#8216; oss_hdaudio<br \/>\ndevfsadm: driver failed to attach: oss_hdaudio<br \/>\nWarning: Driver (oss_hdaudio) successfully added to system but failed to attach<br \/>\nadd_drv -m &#8216;* 0666 root sys&#8217; -i &#8216;&#8221;usbif,class1&#8243;&#8216; oss_usb<br \/>\ndevfsadm: driver failed to attach: oss_usb<br \/>\nWarning: Driver (oss_usb) successfully added to system but failed to attach<br \/>\nadd_drv -m &#8216;* 0666 root sys&#8217; oss_sadasupport<br \/>\ndevfsadm: driver failed to attach: oss_sadasupport<br \/>\nWarning: Driver (oss_sadasupport) successfully added to system but failed to attach<\/p>\n<p>Then reboot, and try \/usr\/bin\/osstest and see which devices works correctly.<\/p>\n<p>Sound subsystem and version: OSS 4.2 (b 2005\/201108060332) (0x00040100)<br \/>\nPlatform: SunOS\/i86pc 5.11 snv_111b<\/p>\n<p>*** Scanning sound adapter #-1 ***<br \/>\n\/dev\/oss\/oss_hdaudio0\/pcm0 (audio engine 0): HD Audio play front<br \/>\n&#8211; Performing audio playback test&#8230;<br \/>\n  left OK  OK  OK<br \/>\n\/dev\/oss\/oss_hdaudio0\/pcm1 (audio engine 1): HD Audio play rear<br \/>\n&#8211; Performing audio playback test&#8230; <\/p>\n<p>Then, rename \/dev\/dsp:<br \/>\nln -sf \/dev\/oss\/oss_hdaudio0\/pcm4 \/dev\/dsp<br \/>\nSee Tips and tricks of OSS for more details.<\/p>\n<p>To disable the system beep: xset -b<\/p>\n<p>To set volume: if you have Gnome: gnome-volume-control<\/p>\n<p>On OpenSolaris, I experienced after a while some warning messages when booting (the OSS driver was complaining about undefined symbols). To solve this issue,<br \/>\nbackup \/etc\/oss\/installed_drivers<br \/>\nremove the line with ossusb in that file (it&#8217;s old and obsolete and one reason for the errors &#8212; see this forum<br \/>\nremove the oss driver:<br \/>\npfexec rem_drv oss_usb<br \/>\nIf you do modinfo, you should not see oss_usb any longer.<br \/>\nthen, restart the oss driver:<br \/>\nchmod u+x \/etc\/init.d\/oss<br \/>\npfexec .\/oss stop<br \/>\npfexec .\/oss start<br \/>\nTo get some information on what&#8217;s installed concerning OSS sound drivers:<br \/>\n$ ossinfo<br \/>\nVersion info: OSS 4.2 (b 2006\/201202040133) (0x00040100)<br \/>\nPlatform: SunOS\/i86pc 5.11 snv_111b (boureautic)<\/p>\n<p>Number of audio devices:        8<br \/>\nNumber of audio engines:        12<br \/>\nNumber of MIDI devices:         0<br \/>\nNumber of mixer devices:        1<\/p>\n<p>Device objects<br \/>\n 0: osscore0 OSS common devices<br \/>\n 1: oss_hdaudio0 ATI HD Audio interrupts=855 (1871)<br \/>\n    HD Audio controller ATI HD Audio<br \/>\n    Vendor ID    0x10024383<br \/>\n    Subvendor ID 0x105b0e0a<br \/>\n     Codec  3: ALC888 (0x10ec0888\/0x105b0e0a)<br \/>\n 2: oss_sadasupport SADA compatibility layer<br \/>\nVideo card<\/p>\n<p>OpenSolaris<br \/>\nFor the ATI card:<br \/>\nremove any xorg.conf you may have (unless specific settings), the default settings are fine for this card<br \/>\nremove NVidia drivers if any (pkgrm NVDAgraphicsr NVDAgraphics)<br \/>\nreboot &#8212; -r<br \/>\nFor the NVidia card (I have a Nvidia PCI Express N9400GT 512M DDR2)<br \/>\nget Solaris drivers from NVidia&#8217;s site (NVDAgraphicsr and NVDAgraphics) and install them<br \/>\nconfigure X for Nvidia: nvidia-xsettings<br \/>\nreboot &#8212; -r<br \/>\nNVidia provides helpful documentation to install its drivers on Solaris.<br \/>\nScreen resolution<\/p>\n<p>Solaris:<br \/>\nShow acceptable screen configurations (SPARC ONLY):<\/p>\n<p>ffbconfig -prconf<br \/>\nTry a given resolution (SPARC ONLY):<\/p>\n<p>ffbconfig -res xxyyz try<br \/>\nIf ffbconfig fails to set the correct resolution (bug), use eeprom:<\/p>\n<p>eeprom ouput-device=r1024x768x60<br \/>\nTo set 24 bit mode:<\/p>\n<p>ffbconfig -deflinear true<br \/>\nKeyboard<\/p>\n<p>To change the keyboard layout, do:<br \/>\n# svccfg<br \/>\nsvc:> select keymap:default<br \/>\nsvc:\/system\/keymap:default> setprop keymap\/layout = German<br \/>\nsvc:\/system\/keymap:default> exit<br \/>\n# svcadm refresh keymap:default<br \/>\nPrinters<\/p>\n<p>On OpenIndiana: Canon Pixma MP160 is automatically recognized (at hot plug) by CUPS using driver: Canon PIXMA MP160 &#8211; CUPS+Gutenprint v5.2.4. <\/p>\n<p>I still can&#8217;t get Canon Pixma MP230 to work on OpenIndiana though.<br \/>\nScanners<\/p>\n<p>On OpenIndiana: My scanner is found, but I can&#8217;t manage to scan \ud83d\ude41<br \/>\n$ sane-find-scanner<br \/>\nfound USB scanner (vendor=0x04a9 [Canon], product=0x1714 [MP160]) at libusb:\/dev\/usb:4a9.1714\/0<br \/>\n$ scanimage -L<br \/>\ndevice `pixma:04A91714_75413F&#8217; is a CANON Canon PIXMA MP160 multi-function peripheral<br \/>\nAdvanced Lights Out Manager<\/p>\n<p>Copyright 2007 Sun Microsystems, Inc.  All rights reserved.<br \/>\nUse is subject to license terms.<\/p>\n<p>Sun(tm) Advanced Lights Out Manager 1.6.6<\/p>\n<p>Please login: USERNAME<br \/>\nPlease Enter password: **************<\/p>\n<p>astra_> poweron<br \/>\nSC Alert: Host System has Reset<\/p>\n<p>astra_> console<br \/>\nMisc commands<\/p>\n<p>Getting the location of the CD or DVD burner:<br \/>\ncdrecord -scanbus<br \/>\nscsibus5:<br \/>\n        5,0,0   500) &#8216;HL-DT-ST&#8217; &#8216;DVD-RW_GSA-H41N &#8216; &#8216;RA00&#8217; Removable CD-ROM<br \/>\nEjecting a CD: eject<br \/>\nBoot prompt: stop-A at any moment to get there<br \/>\nboot -m verbose -> to understand what&#8217;s happening<br \/>\nboot cdrom -> to boot on CD-ROM !<\/p>\n<p>Installing Solaris<\/p>\n<p>On a Sparc<\/p>\n<p>on prompt &#8216;ok&#8217; (stop-A to get there), type &#8216;boot cdrom&#8217;&#8230; to boot the Solaris 10 CDs !<br \/>\ncheck the compatibility list with Sun&#8217;s Device Detection Tool: download the Sun Download Manager first, then launch the detection tool: javaws sddtool_20.jnlp &#038;<br \/>\nmake sure all network interfaces (hme0, hme1&#8230;) are plugged to the local network<br \/>\nfor network configuration, beware that using DHCP means the network interfaces are expected to receive their IP address AND hostname from the DHCP server. If hostname is not sent, a script is mandatory to set it at each boot. Otherwise use static IP addresses, setting the gateway and the network mask.<br \/>\ndefault install is okay to use. It creates 3 partitions<br \/>\nc0t0d0s0 for \/ (5059 MB in my case)<br \/>\nc0t0d0s1 for the swap (512 MB)<br \/>\nc0t0d0s7 for \/export\/home (13885MB)<br \/>\nfor software installation, select the Entire Group of Solaris 10 Software. Companion Software (freeware utilities such as gcc, make, xpdf etc) are nice to have.<br \/>\nOn x86<\/p>\n<p>The first thing to do is check one&#8217;s hardware is compatible with Solaris. Sun offers a Java based detection tool . It requires installation of a JRE 1.5. This tool worked fine on my host.<\/p>\n<p>Then, the installation basically goes as follows. Most of the time, default selects are appropriate and there are no changes to do. That&#8217;s cool.<\/p>\n<p>GNU Grub install : select Solaris (default)<br \/>\nSelect Solaris interactive installation (default).<br \/>\nSelect English as language. Actually, I usually hate to chose any other language, because translations are so poor I have to &#8216;reverse&#8217; back to English to hope to understand what&#8217;s going on&#8230; My advice here is definitely, select English, unless you really don&#8217;t understand English (but then, I wonder how you cope everyday as a computer science engineer).<br \/>\nSet your hostname.<br \/>\nSet timezone, and root password<br \/>\nAsk for a Standard Installation (not Flash)<br \/>\nConfigure for automatic eject and reboot<br \/>\nThen, select Locale: initial locale POSIX C looks fine<br \/>\nselect solaris software: entire distribution (4740 MB)<br \/>\nselect disks to install Solaris (they are labeled cXdY). It&#8217;s possible to use fdisk to create a Solaris Partition.<br \/>\nInstalling OpenSolaris<\/p>\n<p>Download and burn the latest CD of OpenSolaris. The current release (2008.11) fits on a single CD. It is both an installation CD and a Live CD. Let OpenSolaris boot from the CD, then click on &#8220;Install OpenSolaris&#8221; to get the work started.<\/p>\n<p>Upgrading OpenSolaris<\/p>\n<p>The only thing you need to do is:<br \/>\npfexec pkg install SUNWipkg<br \/>\nThen, relaunch the update manager from a GNOME environment, and have it download all updates. It&#8217;ll download approximately 800Mb, so depending on your bandwidth, it may take time. Once all packages are downloaded, it&#8217;s quite quick to update. It&#8217;ll configure a new boot environment. Reboot, everything&#8217;s fine ! Yeeeaaah !<br \/>\nThe upgrade process actually creates a new boot environment so that, once the upgrade is complete, you can still boot the old (or the new) version.<br \/>\n$ beadm list<br \/>\nBE            Active Mountpoint Space Policy Created<br \/>\n&#8212;            &#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8211; &#8212;&#8212; &#8212;&#8212;-<br \/>\nopensolaris   &#8211;      &#8211;          7.57G static 2009-01-03 13:18<br \/>\nopensolaris-1 NR     \/          3.59G static 2009-07-20 22:38<br \/>\nOn a ZFS point of view, the boot environments correspond to two different file systems:<br \/>\n$ zfs list -o name,mountpoint,canmount,mounted<br \/>\nNAME                      MOUNTPOINT           CANMOUNT  MOUNTED<br \/>\n&#8230;<br \/>\nrpool\/ROOT\/opensolaris    \/                      noauto       no<br \/>\nrpool\/ROOT\/opensolaris-1  \/                      noauto      yes<br \/>\nNote that, of course, only one of these file systems is actually mounted. In my case, the new file system with 2009.06 is rpool\/ROOT\/opensolaris-1.<br \/>\n$ zfs list<br \/>\nNAME                       USED  AVAIL  REFER  MOUNTPOINT<br \/>\n&#8230;<br \/>\nrpool\/ROOT\/opensolaris    7.18G  5.42G  6.75G  \/<br \/>\nrpool\/ROOT\/opensolaris-1  3.43G  5.42G  7.40G  \/<br \/>\nThere are shared blocks between both file systems, because not all files change when a system is upgraded, so they are not updated, and get shared between both file systems. Keeping both boot environments takes disk place. If you are short of disk space, you can safely remove the old boot environment and will get back the size of the unshared, no longer used files (don&#8217;t expect 7G back). The command is :<br \/>\n$ beadm destroy opensolaris<br \/>\n$ beadm list<br \/>\nBE            Active Mountpoint Space  Policy Created<br \/>\n&#8212;            &#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8211;  &#8212;&#8212; &#8212;&#8212;-<br \/>\nopensolaris-1 NR     \/          11.80G static 2009-07-20 22:38<br \/>\n$ zfs list<br \/>\nNAME                       USED  AVAIL  REFER  MOUNTPOINT<br \/>\nrpool                     42.2G  5.76G  1.42G  \/a\/rpool<br \/>\nrpool\/ROOT                10.3G  5.76G    18K  legacy<br \/>\nrpool\/ROOT\/opensolaris-1  10.3G  5.76G  7.41G  \/<br \/>\nrpool\/dump                 895M  5.76G   895M  &#8211;<br \/>\nrpool\/export              28.7G  5.76G    19K  \/export<br \/>\nrpool\/export\/home         28.7G  5.76G   654M  \/export\/home<br \/>\nrpool\/export\/home\/axelle  28.1G  5.76G  27.7G  \/export\/home\/axelle<br \/>\nrpool\/swap                 895M  6.55G  88.3M  &#8211;<br \/>\nWhich version of OpenSolaris do I have ?<\/p>\n<p>Do uname -a, and have a look at the &#8220;snv&#8221; version.<br \/>\nVersion\tuname label<br \/>\n2008.05\tsnv_86_rc3<br \/>\n2008.11\tsnv_101b<br \/>\n2009.06\tsnv_111b<br \/>\nAnother solution is to cat \/etc\/release.<br \/>\nRelease or Developer versions ?<\/p>\n<p>Like Ubuntu and Debian have stable and unstable versions, OpenSolaris has a release version (stable) and a developer branch (unstable). To install and download packages from the release version, have the package manager (\/usr\/bin\/packagemanager) use this URL:<br \/>\nhttp:\/\/pkg.opensolaris.org\/release<br \/>\nor this one for the developer version:<br \/>\nhttp:\/\/pkg.opensolaris.org\/dev<br \/>\nUpdating OpenSolaris<\/p>\n<p>pfexec pkg image-update -v<br \/>\nor updatemanager. or packagemanager (for packages).<br \/>\nUpgrading Solaris 10<\/p>\n<p>u4 to u5<\/p>\n<p>You need the u5 DVD (available from Sun&#8217;s website). The other alternative is to perform a live upgrade, but it seems somewhat complicated, you need a backup disk etc: try it for servers you can&#8217;t stop.<\/p>\n<p>With the u5 DVD, it&#8217;s very simple:<\/p>\n<p>boot on the DVD<br \/>\nthe beginning is like a normal installation: set hostname, timezone, root password&#8230;<br \/>\nspecify this is an upgrade and not a full re-install. The upgrade procedure will remove your u4 patches and proceed with u5 installation.<br \/>\nlet the system install reboot (remove the DVD)<br \/>\nAfter reboot, the system failed to mount my ZFS partitions (\/usr\/sbin\/zfs mount -a). It complained \/opt wasn&#8217;t empty: indeed, the installation procedure had put Star Office 8 in \/opt, whereas I already have a ZFS \/opt partition: so the ZFS \/opt failed to mount. This has been easily fixed by temporarily moving Star Office to \/, mounting the ZFS partition, and then moving back Star Office to the new ZFS \/opt.<\/p>\n<p>Apart from this slight problem, upgrade proceeded without any problem. It even kept my specific network driver, and of course did not overwrite any other partition than \/.<\/p>\n<p>u5 to u6<\/p>\n<p>The nice thing with u6 is that it supports ZFS boot. If possible, do not use CDs but DVDs: there&#8217;s a known bug on CD 2 that occurs from time to time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>solaris Release<\/p>\n<p>Get the release of your OS by cat \/etc\/release: OpenSolaris 2009.06 Example: OpenSolaris 2009.06 snv_111b X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 07 May 2009 Solaris 10 Oracle Solaris 10 9\/10 s10s_u9wos_14a SPARC Copyright (c) 2010, Oracle and\/or its affiliates. All rights reserved. Assembled [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6047"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6047"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6047\/revisions"}],"predecessor-version":[{"id":6049,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6047\/revisions\/6049"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}