maxieduncan
Showing posts with label OSX. Show all posts
Showing posts with label OSX. Show all posts

Saturday, 15 May 2010

Changing the Partition Map Scheme for a disk using a Mac

There's a number of reasons why you might want to change the Partition Map Scheme of a disk but the most likely is that you're setting up the disk so that you boot a particular OS from it.

On the mac the default application supplied for changing this is Disk Utility. You can find this in the Utilities directory in the Applications directory.

You can use Disk Utility to both see what type of Partition Map Scheme is being used and to change it.

Checking the Partition Map Scheme


  1.  Go the USB disk in Disk Utility
  2. At bottom right you can see the Partition Map Scheme that is currently being used, in this case it's Master Boot Record.

Changing the Partition Map Scheme


Following these instructions will result in all data on the disk being lost so be careful
  1.  Go the USB disk in Disk Utility and select the partition tab
  2.  In the Volume Scheme select the number of partitions that you want (if in doubt use 1 Partition)
  3. Select the format (use MS-DOS (FAT) if you want to use the disk on other platforms)

  4. Click the Options... button at the bottom and select the Partition Map Scheme you want to use

  5. Click Apply to write the partition: this will erase any data on the disk

Friday, 14 May 2010

Archive Applications on the Mac

I've always used StuffitExpander on the mac but it's not a great program to use with algorithms other than stuffit and recently I've had a couple of files where it just didn't work.

There's quite a few different options out there but the most useful ones I've come across are: The Unarchiver and
UnRarX for rar files.

Saturday, 10 April 2010

Creating bootable Linux USB sticks on the mac

This post is primarily aimed at creating Ubuntu as that's what I've used lately.

From a disk image (.img)

Ubuntu originally provided the Ubuntu Netbook Remix as a .img that made creating a bootable USB as simple as the steps below.

  1. Download the desired .img file
  2. Open a Terminal (under Utilities)
  3. Run diskutil list to get the current list of devices
  4. Insert your flash media
  5. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  6. Run diskutil unmountDisk /dev/diskX where X is the number of disk determined above
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskX bs=1m again using the disk number from the last step and the actual path to your img.
  8. Run diskutil eject /dev/diskX and remove your flash media when the command completes

From a iso image (.iso)

Since Ubuntu 9.10, Canonical has only supplied iso image files and it's not possible to create a bootable USB drive from the Ubunto iso on a mac. If you follow the steps below you'll see the error Could not validate source - error 254. Mac OSX only supports restoring images in particular formats and the one that Ubuntu use (ISO 9660) isn't supported by Apple.

On the mac the default application supplied for changing this is Disk Utility. You can find this in the Utilities directory in the Applications directory.

To create the USB disk do the following:
  1. First make sure that the disk is bootable and that the Partition Map Scheme used is Master Boot Record
  2. After that it's simply a matter of using the Disk Utility Restore functionality to write the iso image to the USB disk
    • Drag the iso image into Source from the Finder
    • Drag the USB disk into Destination from the list in Disk Utility

Friday, 6 November 2009

Tweaking Google Notifier for Mac

Google Notifier for Mac has some basic settings available in the Preferences menu but the useful ones are hidden.

To be able to change these settings you need to hold down the Option and Command buttons when clicking on the Preferences... option in the Notifier menu. This brings up a key/value dialog that you can use to set the options below. The keys are case sensitive

Check Interval
By default the Notifier only checks for emails every 10 minutes, this setting lets you change that.
Key:
AutocheckInterval
Value:
The interval in minutes, e.g. 2

Secure Login
You can make sure that Notifier always encrypts your password when in it logs in.
Key:
SecureAlways
Value:
1

Sunday, 25 October 2009

Displaying monitoring data in the Mac OSX toolbar

MenuMeters is a cool app for monitoring your Mac's performance in the toolbar. A simple preferences pane allows you to choose what is displayed and how often it is updated.

Showing hidden files in the Finder

This tip is taken from MacWorld

On the command line enter:

defaults write com.apple.Finder AppleShowAllFiles YES 
You then need to restart the Finder. To do this hold down the option key then click and hold down on the Finder icon in the Dock and when the menu displays click relaunch.

Using locate command on Mac OSX

When you try using locate on Mac OSX you'll typically get the error:

/var/db/locate.database: No such file or directory

To resolve this simply run:

sudo /usr/libexec/locate.updatedb

Thanks to Neil Ang for having found where this command lived.

The installed macFUSE version is too new for the operating system.

When using parallels on Mac OSX Leopard you may get the following warning:

Operating System too old

The installed macFUSE version is too new for the operating system.

Please downgrade your macFUSE installation to one that is compatible with current running operating system
.

All you need to do here is install the latest version of MacFuse from google. More details can be found on the Parallels Forum.

Installing ATG with JBoss on Mac OSX

Installing ATG on Mac OSX is very straight forward even if it isn't officially supported. This assumes that you are already comfortable with installing ATG on other platforms. A more detailed description can be found here if you are not. The below method has worked with ATG 2007.1, 9 and 9.1

  1. Unpack the jboss archive into the location where you want to use it.
  2. Run the unix version of the ATG installer using the following values:
    • For JBOSS_HOME, the path to where you installed jboss
    • For JAVA_HOME, /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home (or whatever version you are using)
  3. Update the $ATG_HOME/home/installconfig/config.xml so that other ATG applications such as Merch can be installed.

And that's it, ATG should be installed.

None of the solid scripts will work on Mac OSX so you'll need to set up a MySQL database if you want to run the demos.

Example config.xml


<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="*">
    <<install xmlns="">
        <product name="ATG Adaptive Scenario Engine" version="9.1">
            <configure>false</configure>
        </product>
        <product name="ATG Consumer Commerce" version="9.1">
            <configure>false</configure>
        </product>
        <product name="ATG Content Administration" version="9.1">
            <configure>false</configure>
        </product>
        <product name="ATG Portal" version="9.1">
            <configure>false</configure>
        </product>
        <product name="ATG Business Commerce" version="9.1">
            <configure>false</configure>
        </product>
    </install>
    <systemEnv xmlns="">
        <locale>en</locale>
        <rootDir>/Applications/ATG/ATG9.1</rootDir>
        <jBossListenPort>8080</jBossListenPort>
        <docRoot>/Applications/ATG/ATG9.1/home/doc</docRoot>
        <platform>SunOS</platform>
        <rmiPort>8860</rmiPort>
        <programFolder>/Applications/ATG/ATG9.1</programFolder>
        <appServer>JBoss</appServer>
        <baseLevel>ATG9.1_249</baseLevel>
        <jBossHome>/Applications/jboss-4.2.1.GA</jBossHome>
        <jBossVersion>4.2.1</jBossVersion>
        <ATGJRE>/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java</ATGJRE>
        <patchLevel>9.1</patchLevel>
    </systemEnv>
</config>

Starting MySQL on Mac OSX

The documentation for this can be found mysql.com

The command to start mysql if the startup item is installed is:

sudo /Library/StartupItems/MySQLCOM/MySQLCOM start

Otherwise use:

/usr/local/mysql/bin/mysqld_safe and then bg to background the process.