June | 2011 | arfore dot com

One of the things that many system administrators encounter in the quest for maintaining up-to-date servers is the need to apply regular maintenance releases.  With some operating systems, Mac OS X for instance, the patches are released in two forms:

  • a delta update, which contains only the changes necessary to bring the system up-to-date from the current running release level
  • a combo (cumulative, full, etc.) update, which contains all changes for the current release branch

If you are lucky enough to be using an OS that gives you delta updates then you may not ever run into an issue where you don’t have enough internal drive space to update the OS.  However, if you are running an OS, like Solaris, that uses cumulative clusters then this becomes more interesting.

One situation I recently encountered was a need to patch a Solaris 10 Sparc system that did not have sufficient internal drive space to store the unzipped patch cluster for patching the system in single-user mode.  (You are patching in single-user mode right?)

The most obvious question would be: why not add another drive?  Another obvious question might be: why not patch from cd/dvd?  Well, adding a new drive to this system was not a viable solution since there were no available drives to install.  Installing from DVD would have been a possible solution, if the patches had been unzipped and burned to disc prior to the maintenance window.

The next available option was to install the patches over the network.  When patching a machine in single-user mode this becomes a little more problematic, since network resources and services are not generally available unless the server has been brought up in a multi-user mode.

After bringing the server up in single-user mode the next step was to start SSH and NFS so that the patch cluster could be installed over the NFS share.  Generally with Solaris 10 all you would need to do is execute the following command for both SSH and NFS client:

svcadm enable 

Unfortunately with single-user mode this will fail to work, since the dependent services are not auto-started.  To accomplish this in single-user mode you need to add the -r flag which instructs svcadm to start the service and recursively start the dependent services.  If you want a little more checking, also add the -s flag which tells svcadm to wait for each service to enter an online or degraded state before returning.  Below are the commands for starting SSH and NFS along with the output of a service check to show the state after the command was executed.

SSH

# svcadm enable -rs svc:/network/ssh:default
Reading ZFS config: done.
# svcs -a | grep ssh
online         15:49:26 svc:/network/ssh:default

NFS

# svcadm enable -rs svc:/network/nfs/client:default
# svcs -a | grep nfs
disabled       15:11:34 svc:/network/nfs/cbd:default
disabled       15:11:34 svc:/network/nfs/mapid:default
disabled       15:11:35 svc:/network/nfs/server:default
online         15:50:35 svc:/network/nfs/status:default
online         15:50:35 svc:/network/nfs/nlockmgr:default
online         15:50:35 svc:/network/nfs/client:default
uninitialized  15:11:37 svc:/network/nfs/rquota:default

After this was done all that was left was to mount the exported file system and run the patch cluster installation script.  Since the cluster was not local to the system it took a little longer to install the cluster, but other than that everything went smoothly.

For those of you who know me outside of my blog (or those that have been following me on Facebook) it will not be a huge surprise that I am engaged.

On June 10, 2011, I asked my girlfriend, Lisa Nicole Vickers neé Shaw, to marry me.  We are now officially engaged!

As a recent switcher from the Apple iPhone to an HTC Thunderbolt, there have been a few things that I have been sorting out with the usage of my new phone. I will be detailing some more of my adventures later, however one of the important things to me was how to retain the custom ringtones that I had created using GarageBand.

On the Mac custom ringtones are stored by default in the Ringtones directory within your iTunes Music directory.

The m4r files are really just AAC files with a custom extension that tells iTunes and iOS that it is a ringtone.  They are not DRM formatted files or special Apple files, just ordinary AAC files.  All you need to do to make them playable on Android is to change the file extension to either m4a or aac.

This is a real bonus since Android 2.2.1 will play AAC files with no problem (see http://developer.android.com/guide/appendix/media-formats.html)

Once I found this piece of information out, the only hurdle was to get the ringtones into a location that was used on my phone.  Ideally I would be able to save them to the SD Card to save on the internal storage space and to eliminate the chance of a new software update (or a custom ROM installation) to wipe them out.

It turns out that in Android there is a whole host of pre-defined locations for various data types.  As defined on the Android Developer Network:

Music/ – Media scanner classifies all media found here as user music.

Podcasts/ – Media scanner classifies all media found here as a podcast.

Ringtones/ – Media scanner classifies all media found here as a ringtone.

Alarms/ – Media scanner classifies all media found here as an alarm sound.

Notifications/ – Media scanner classifies all media found here as a notification sound.

Pictures/ – All photos (excluding those taken with the camera).

Movies/ – All movies (excluding those taken with the camcorder).

Download/ – Miscellaneous downloads.

With regards to the storage internal to the system, then, this would make the location for the ringtones be as follows:

/system/media/audio/ringtones/

The external storage location for ringtones would be:

/mnt/sdcard/media/audio/ringtones/

Once I had the filetype and location it was simple enough to mount the SD Card of my Thunderbolt and create the appropriate directory structure then copy the re-named file over.

Then open the ringtones settings pane on the Thunderbolt and voila the new ringtones are available.

%d bloggers like this: