Create a Bootable USB for Mac OS X (Yosemite 10.10)

Unknown-4

OS X Yosemite

It’s Mac OS X season again and with that is a new version of Mac OS X. In this case it is Mac OS X 10.10, or what is better known as Yosemite. Most people will upgrade their Mac over the top of their existing OS, which is perfectly fine. However, there are times when OS X needs to be installed on a new (blank) hard drive, or, we simply want to perform a “clean install”. When doing this I prefer to use a bootable USB drive instead of a DVD. This is becoming especially convenient as newer Macs don’t have (or need) an internal DVD drive.

For reference, Apple has a page that covers how to create a bootable USB drive with the OS X 10.9 Mavericks installation files, but leaves out a few of the details discussed here. This should also provide is little context around this being a standard process that is supported by Apple. No hackery here.

What is needed

The process is easy and any Mac user who considers themselves to be semi-technical will be capable of creating a bootable USB drive containing the Mac OS X installation files. And, this does not require downloading any third-party tools or paying for extra utilities. Here is what you need.

  • A Mac with internet access
  • One 8 GB (or larger) USB drive
  • The OS X installation file from Apple (i.e.; “Install OS X Yosemite”)

Downloading the OS X installation file

To create a bootable USB drive for OS X, you first need to download the desired operating system setup file from Apple, such as OS X 10.10 Yosemite. You can search for the OS, “OS X Yosemite”, in the App Store (or using this link) to access it in the App Store directly. Once the download completes, you will see the OS X Install window for Yosemite (or other version), but do not proceed with the install; you need quit the install. You just needed the Install OS X Yosemite application, which should now be in the Applications folder on your computer. For Yosemite, the file name will be Yosemite.app.

Creating the bootable USB drive

Here is what you need to do:

  1. Connect the USB drive to your Mac. Backup any files that may be stored on it before you proceed because this USB drive will need to be completely reformatted.
  2. Format the USB drive, using Disk Utility, as a Mac OS Extended (Journaled) drive, named Yosemite. I suggest not using any spaces to keep a future step simple. This is performed using the Erase tab within the Disk Utility app. Be sure the USB drive does not have multiple partitions (that can happen, so use to the Partition tab to verify and correct this).
  3. Open Terminal. This located in the Applications > Utilities folder.
  4. The following command is used to make the USB drive bootable as well as copying the necessary OS installation files on the USB drive.A couple quick points to help make sense of the command below. The –volume /volume/Yosemite attribute of the command specifies the target drive, the USB drive in this case. The –applicationpath attribute specifies the OS X source installation file that was downloaded earlier. You will also notice the command (createinstallmedia) used to create the installable USB drive is actually contained with Yosemite.app file that was downloaded.Type (paste) the following command:
    sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Yosemite --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
  5. To kick off the process, type in your user password when requested.

This process can take upwards of 30 minutes or more without any indication on the screen it is still processing. Even though it may appear to have locked up, put your worries aside and your patience will be rewarded. The time it takes will vary depending on the speed of your Mac and the USB drive write speed.

Sample log

Below is a log of the terminal screen from when I created my bootable USB drive containing the Yosemite OS X installation files.

Marks-MacBook-Pro:~ Mark$ sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Yosemite --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
Ready to start.

To continue we need to erase the disk at /Volumes/Yosemite.
If you wish to continue type (Y) then press return: Y
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.
Marks-MacBook-Pro:~ Mark$

You should now have a bootable USB drive from which you can boot your Mac and perform a fresh install of the Max OS X operating system.

SharePoint Cumulative Updates Best Practices

SharePoint Cumulative Updates Best Practices

This guidance pertains to production SharePoint environments and is applicable to SharePoint 2007, 2010, 2013, and likely future versions.

Maintaining a healthy SharePoint environment requires a practical approach to applying cumulative updates. SharePoint Cumulative Updates are patches released by Microsoft that fix known issues. As their name suggest, they are cumulative in content so they include previously released patches. However, a plan that simply applies the latest updates is likely not in your best interest and can actually put your environment at risk.

General rule

Install updates and patches when you encounter an issue that is addressed by the update. The only exception is you should try to maintain some reasonable level of update. It is not ideal to let your environment lapse two years behind in SharePoint updates.

Maintain a 6+ month lag

Maintain your production environment at a 6 to 12 month update lag. In other words, don’t install any updates that are less than 6 months old, unless it is necessary. Extending beyond the 12 month is fine as long has your environment is operating in a healthy manner, but you should not let your updates lag too far beyond 12 months. This keeps your SharePoint environment relatively current while minimizing your risk as new updates are applied. Should you encounter an issue after applying an update, the likelihood of a fix already existing is much greater than if you had applied the newest update available. Microsoft does a good job of testing their releases, but the number of possible configurations, feature combinations, and server patch levels are almost infinite so you are wise to stay away from the bleeding edge.

Test your updates first

Every update should be applied to a test environment and thoroughly tested before applying said update to production. The idea of having to completely regression test SharePoint is not practical nor should it be expected. But you should have a test environment for every production environment, and that test environment should be used to test updates.

Urgent updates (updates that address an urgent problem in production), will require more focused and targeted testing. This is less than ideal, but necessary when a critical issue is identified. However, general operational maintenance updates can be applied to the test environment and remain there for several months before applying that same update to production. This allows for more exhaustive user and operational testing activity to expose any possible problems.

Synergy with developers

If you have SharePoint developers on staff or contract, they can provide a tremendous benefit regarding updates. You should coordinate your update plans with them to ensure they are developing with at least the current production version, or even better, the next cumulative update identified and targeted for production. I suggest developers keep their environments to a relatively recent update level. This is usually not an issue for them and can be very easy if they develop using virtual machines.

Ensuring a successful update

Below are a few points that will help you make the update process as smooth as possible:

  • Something to consider: Minimize server downtime. Placing the content databases in a read-only mode while installing the binaries right before applying the patches can reduce server downtime. This allows your users access the SharePoint servers during the initial upgrade process and only experience downtime during the later portion of the update process. Again, not necessarily a recommendation, but something to consider.
  • If you are using virtualization, take snapshots or backups of your Web Front End and Application servers(s). I am a big proponent of virtualized SharePoint servers.
  • After installing the binaries of the Service Pack, run the Psconfig command on every server:
  • psconfig –cmd upgrade –inplace b2b –wait

References

SharePoint 2013 Updates site
http://technet.microsoft.com/en-US/sharepoint/jj891062

Starting the SharePoint 2013 User Profile Synchronization Service

Below are the steps to start the SharePoint 2013 User Profile Synchronization Service.

Local Administrator

Ensure the service account is a member of the local machine Administrators group.

Grant “Replicating Directory Changes” permission

Using the Active Directory Users and Computers manager, grant “Replicating Directory Changes” permission to the service account (SP_Farm).

Restart the SharePoint Timer Service

Start the SharePoint Server Synchronization Service

The service can take several minutes to start.

Force Pairing (Connecting) an Apple bluetooth keyboard to an iPad (iOS device)

How to Force Pairing (Connecting) an Apple bluetooth keyboard to an iPad (iOS device)

Apple devices are common place in my home, and occasionally we like to connect a single shared Apple bluetooth keyboard to one of the iPads. If the bluetooth keyboard was last connected to another device that is within range and turned on, the normal steps to pair a bluetooth keyboard to an iPad will typically not work. The problem is because the keyboard immediately exits pairing mode as it connects to the other, unintended iOS device. This can make the activity of pairing the keyboard to the intended device a bit frustrating.

The solution is easy:
Simply continue to hold the power button down on the bluetooth keyboard after the power LED light begins to flash. This will keep the keyboard in pairing mode and prevent it from automatically connecting to the last device it was paired/connect to.

General steps to pair an Apple keyboard to an iPad:

  1. Turn off the Apple keyboard by pressing the power button for three seconds.
  2. On the iPad, ensure bluetooth is enabled: Settings > Bluetooth.
  3. On the Apple bluetooth keyboard, press and hold the power button. After about 5 seconds the keyboard power indicator (LED) will begin to flash indicating the keyboard is in pairing mode.
    1. To force pairing: Keep pressing the power button as you continue.
  4. When the “Apple Wireless Keyboard” device appears in the list of discovered bluetooth devices on your iPad, tap/select it to connect.
  5. The iPad will then prompt you with a 4-digit code to enter on the keyboard. You can now stop pressing the power button on the keyboard.
  6. On the keyboard, enter the 4-digit code and press the enter/return key. Your iPad should now be connected to the iPad.

I hope this helps.

Below are a few articles I found interesting and useful on using an Apple keyboard with your iPad.

Cheers,
Mark

Shut down or Restart Windows 8 from Remote Desktop

Here is how you can quickly and easily Shut down or Restart a Windows 8 or Windows Server 2012 computer. This works when logged in locally and when logged in via Remote Desktop.

  1. Navigate to the desktop.  Note: When logged in locally, pressing the Windows key will quickly toggle between the desktop and the start screen. When logged in via Remote Desktop, you will need to press Alt + Home to toggle.
  2. Press Alt + F4. This will present the Shut Down Windows dialog allowing you to Switch user, Sign out, Sleep, Shut down, or Restart the computer.
    Mac users: For those of you remoting in from a Mac, the keys are:  fn + Control + Command + F4

Below are examples of the Shut Down Windows dialog when logged in locally and when logged in via Remote Desktop.

Shut Down Windows dialog when logged in locally

Shut Down Windows dialog when logged in via Remote Desktop

Remote Desktop keyboard shortcuts for Windows 8

The following table contains keyboard shortcuts for working with Remote Desktop Connection on Windows 8. I have placed this list here primarily for myself, but it may be helpful to other developers using Remote Desktop and/or Hyper-V when developing software.

Press this key To do this
Alt+Page Up Move between apps from left to right
Alt+Page Down Move between apps from right to left
Alt+Insert Cycle through apps in the order that they were started
Alt+Home Display the Start screen
Ctrl+Alt+Break Switch between a window and full screen
Ctrl+Alt+End Display the Windows Security dialog box
Ctrl+Alt+Home In full-screen mode, activate the connection bar
Alt+Delete Display the system menu
Ctrl+Alt+minus (-) on the numeric keypad Place a copy of the active window, within the client, on the Terminal server clipboard (provides the same functionality as pressing Alt+Print Screen on a local PC)
Ctrl+Alt+plus (+) on the numeric keypad Place a copy of the entire client window area on the Terminal server clipboard (provides the same functionality as pressing Print Screen on a local PC)
Ctrl+Alt+Right arrow “Tab” out of the Remote Desktop controls to a control in the host app (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) app.
Ctrl+Alt+Left arrow “Tab” out of the Remote Desktop controls to a control in the host app (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) app.

Source:

Dell M4600 Performance Improvement (Disable Intel SpeedStep)

Last weekend I spent a little time working at home and I could not get over how much slower my notebook was performing. I unplugged the power adaptor (130w) to run on battery alone and my performance was back. Could this be right?! So, I downloaded a free benchmarking tool and ran a few tests. The performance running on battery alone was more than double than when using the 130 watt power adaptor.

I then began spelunking around in the BIOS to see what havoc I could bring to life. There was one setting I found to be very interesting: Intel SpeedStep. The Intel SpeedStep setting was enabled, which at first glance sounds good like enabling a turbo charger for your computer. However, disabling this setting “puts your computer in the highest performance state and prevents the Intel SpeedStep applet or native operating system driver from adjusting the processor’s performance”. Here are the results of my benchmark testing. I think most people will prefer to disable this “feature”.

Dell M4600 Performance Rating

Power Source SpeedStep On SpeedStep Off Battery Charges
Battery

596-670

598-622

N/A

Medium Adaptor (130w)

288-289

600-624

No charge, No drain
(charges when off or sleeping)

Large Adaptor (180w)

658-672

609-622

Yes

The most obvious results show that using a power supply with less than 180 watts with SpeedStep enabled cuts the performance about 53% to a rating of 289 – that is a huge drop. With SpeedStep disabled and using the 130 watt power supply, not only does the performance resume to 100% generating a performance rating of 624; the battery does not drain at all. It doesn’t charge either, but it does charge when the computer is in a sleep state or powered off; which will likely not be an issue for most people.

One thing also worth pointing out is the best performance numbers were obtained when using the 180w power adaptor with SpeedStep enabled. It is my belief that this highest rating is only sustainable for short periods of time and does represent a sustainable performance rating.

I have chosen to disable SpeedStep. Disabling the Intel SpeedStep may not be ideal for those of you who spend a significant amount of time working unplugged (on battery); however, I was able to use my computer for 4 hours this weekend on battery alone with SpeedStep disabled. Most people using a Dell M4600 are using it as a portable workstation and will usually be plugged into a power source.

There is one benefit I can think of in keeping the Intel SpeedStep enabled. If you are using a lower wattage power adaptor (e.g., 180w), it will reduce your processor performance enough to allow the lower wattage power adaptors to charge your battery while using your computer. But that is about the only advantage I can think of.

Changing the SpeedStep setting (Dell Precision M4600):

  1. Reboot computer and enter BIOS by pressing F12 (on the notebook keyboard)
  2. Select BIOS Setup
  3. Performance > Intel SpeedStep
  4. Un-check the Enable Intel SpeedStep
  5. Click Apply and exit BIOS.

The tool I used for benchmarking is NavaBench.
http://novabench.com

Below is additional information about the power adaptors I use for the M4600. I needed to look this up to confirm the wattage on the power adaptors. Power P in watts (W) is equal to the current I in amps (A), times the voltage V in volts (V):

P(W) = I(A) × V(V)

Dell Power Adaptors:

Power Adaptor Model Amps x Volts = Watts
Large (180w) DA180PM111 9.23 19.5 180
Medium (130w) DA130PE1-00 6.7 19.5 130

Error opening Word document

I was getting this error while trying to open a Word document using Word 2010. These steps also resolve the problem when opening an Excel document.

Problem/Error

Error: “Word experienced an error trying to open the file.”

Solution

This is corrected a couple different ways. You can either correct a specific file, or you can change your Word (or Excel, etc) trust settings to permanently remove this security feature.

For one specific file:

  1. Go to the document properties in Windows Explorer (right-mouse click, select Properties).

  2. Click Unblock.
  3. Click OK.
  4. You should now be able to open the Word document.

To permanently change the setting for all files:

  1. Click File > Options
  2. Click Trust Center >Trust Center Settings
  3. Click Protected View
  4. Uncheck the following boxes:
    1. Enable Protected View for Files originating from the Internet
    2. Enable Protected View for Files located in potentially unsafe locations
    3. Enable Protected View for Outlook attachments

Resize iframe Using jQuery on SharePoint

JavaScript to resize an iframe on a SharePoint custom page.

<script type=”text/javascript”>
// id = jQuery id of the iframe to auto resize.
// lessHeight = the amount in pixels to subtract from the browser window height when resizing the iframe.
// minHeight = the minimum height of the iframe.
function ResizeIFrame(id, lessHeight, minHeight)
{
var newHeight = window.document.body.offsetHeight – lessHeight;
var iframeHeight = (newHeight < minHeight) ? minHeight : newHeight;
$(id).height(iframeHeight);
}

// Register an iframe to be auto resized.
function ResizeIFrameRegistration(id, lessHeight, minHeight)
{
// Resize the iframe with the browser window is resized.
$(window).resize(function() { ResizeIFrame(id, lessHeight, minHeight); });
// Resize the iframe when browser page is finished loading and ready.
$(document).ready(function() { ResizeIFrame(id, lessHeight, minHeight); });
}

ResizeIFrameRegistration(“#<%= pdf.ClientID %>”, 250, 300);
</script>

How to correct: The security validation for this page is invalid (FormDigest)

How to correct the security error on a custom SharePoint web page:
The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

 

Short Answer:

Use SPUtility.ValidateFormDigest() and do not use AllowUnsafeUpdates.

A Less Desirable Solution (but more commonly used)

One way to get around this issue is to set the web’s (SPWeb) AllowUnsafeUpdates property to true. This is not ideal, especially when there is a more secure option.

 

A Better Solution

This method configures the web page to properly cache and revalidate the necessary credentials preventing the “security validation” error noted above. And, there is no need to set the AllowUnsafeUpdate spweb property to true.

 

Coding Steps:
Register the SharePoint web controls assembly in your aspx. Place this at the top of the .aspx file:
&amp;lt;%@ Register TagPrefix=“SharePoint” 
    Namespace=“Microsoft.SharePoint.WebControls” 
    Assembly=“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c“ %&amp;gt;
Place the FormDigest control on the .aspx page (I place it near the end of the page):
&amp;lt;sharepoint:formdigest id=”FormDigest1″ runat=”server” /&amp;gt;
In your page code-behind, call the ValidateFormDigest() method during the page OnInit() event to revalidate the page security. It is important to call the ValidateFormDigest method as early as possible in the page cycle.
using Microsoft.SharePoint.Utilities
protected override void OnInit(EventArgs e)
{
	if (Page.IsPostBack)
	{
		SPUtility.ValidateFormDigest();
		base.OnInit(e);
	}
}
That’s it. Your custom SharePoint page should now successfully pass the security validation. It is also important to remember that you will need to also add the FormDigest control and call the ValidateFormDigest method in any custom user controls that are performing updates to SharePoint data.

 

References: