Properly Install Mac Yosemite OS X 11.3 On Windows with VirtualBox

I have a MacBook Pro but I wanted to use the Mac OS on my desktop for testing purposes only. So I looked up some sites and read through some articles and after trying a few it seemed a couple of steps worked on one site and a couple on another site and then I needed some side steps to get it all working.

For example Macbreaker.com has a great article on installing Yosemite on your PC (Non-VM). While as some forum post on xda-developers had a quick and dirty install Yosemite on your VirtualBox from beta, but it didn’t work for me. I would get an error Undefined 0 and so I had to track down a solution for that which is geared towards creating a bootable USB drive for Yosemite.  During those previous steps I had to figure out how to get the downloaded Yosemite Install from my mac into a format I can put on my Windows 8 machine for my virtualbox. So I had to convert the downloaded app the an ISO format. Though if you combine this with the bootable USB steps I needed, it took a matter of jumping around to get it working. Then to top it off I needed the MultiBeast files for sound, internet etc from the first article.

So I’ve taken the time to organize all the steps from all those articles into one that worked for me and made some flight modifications to the steps where needed.

Pre-Req Setup:

Install VirtualBox and make sure it shows 64bit OS Options.

image

If you don’t have the 64 bit options you need to do one or both of the following.

 

Step 1: Download Yosemite on a Mac System

  • OS X Yosemite (Free): The method used by this guide requires that you download a free copy of the Yosemite installer app from the Mac App Store. Though the Mac App Store is included in Mac OS X 10.6.6 and newer, you have to be running at least 10.6.8 to download Yosemite.

Edit: Once that’s downloaded then you should be able to run the following commands to start the process of converting the downloaded app into an iso.

Step 2: Extract, Mount, Start Creation of ISO files

# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Yosemite.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

Step 3: Extract missing BaseSystem files for future ISO files

…you'll need to open theInstallESD.dmg file from your Yosemite Install app.

  1. Head to Applications
  2. Find the Install OS X Yosemite app
  3. Right-click on it and Show Package Contents

  1. Navigate to Contents -> SharedSupport and open InstallESD.dmg
  2. Wait for it to finish Verifying... and mount

  1. When it mounts, you'll see a new window with a Packages folder

Now, don't do anything with this Packages folder just yet. First, we need to unhide the files located in this newly mounted OS X Install ESD image.

To see the hidden files in the OS X Install ESD image, open up a Terminal and input the following two commands (hit Enter after each one). And don't worry, we'll be undoing this at the end of this guide.

  • defaults write com.apple.finder AppleShowAllFiles TRUE
  • killall Finder

If successful, you will see three other files slightly grayed out in the mounted OS X Install ESD window. The one we need here is BaseSystem.dmg.

Step 4: Copy the BackSystem.dmg file to /Volumes/install_build/

I ended up copying with the .dmg and the .chunklist but article says you only need the .dmg.

Easiest way for me I created a folder on the desktop called “tmp” then I copied both files from OS X Install ESD into this “tmp” folder on my desktop. Then I was able to run the cp (copy) command in terminal. When you open Terminal it drops you into your user folder. You can switch to your “tmp” folder on your desktop like this

cd ~/Desktop/tmp

Once you are in the folder those files are located then copy them to the future ISO files location

cp BaseSystem.dmg /Volumes/install_build/
cp BaseSystem.chunklist /Volumes/install_build/
Note: Without this step you end up getting the Undeified Error 0 in Step 7

Step 5: Build the ISO file

This will put an iso file on your desktop called Yosemite.iso

# Unmount the installer image
hdiutil detach /Volumes/install_app

# Unmount the sparse bundle
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite

# Remove the sparse bundle
rm /tmp/Yosemite.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso

Now copy this 6GB file over to your Windows Machine. I used a 16GB USB which was formatted in ExFat

You can now re-hide the hidden files running the same command but with FALSE

  • defaults write com.apple.finder AppleShowAllFiles FALSE
  • killall Finder

 

STEP 6. Setup VirtualBox

Create your new VirtualBox VM according to the following:

Edit: I ended up using 8GB of ram.

- Create a VM disk with > 40 GiB
- Under General > Basic:Version, use "Mac OS X (64bit)"
- Under System > Motherboard
    : Base Memory, select 6 GiB VM RAM
    : Chipset, use PCIIX 
    : Extended Features, select all to use EFI, ACPI, and UTC
- Under System > Processor, select only 1 CPU
- Under System > Acceleration: Hardware Virtualization, select all.
- Under Display > Video:Video Memory, use 128 MB, and do not select any Extended Features (2D/3D)
- Under Storage > Storage Tree, select the "Empty" (CD icon) and go to:
  "CD/DVD Drive" selector and click on the right-most CD icon for a 
  drop-down menu. On that menu, browse to and select your *.iso 
  image you downloaded above. Also select the "Live CD/DVD" option. 
- Save and close VirtualBox.

Next you need to tune VB to impersonate some recent Apple HW.
First re-start VirtualBox. Once started, run an administrative command shell and run these. Note that the first command takes a minute.

VBoxManage.exe modifyvm "YourVMname" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
VBoxManage setextradata "YourVMname" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
VBoxManage setextradata "YourVMname" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "YourVMname" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "ILoveApple"
VBoxManage setextradata "YourVMname" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "YourVMname" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

Close and reopen VirtaulBox for the changes to take effect. Be very patient, and after some error messages your OSX should bootup to start the setup process.

Edit. Note if you

Step 7. The Setup Process

Formatting the (new) VM disk/partition
Once the boot process starts loading, you'll have to select language and then choose the boot disk to install on. But only the mounted CD-ROM (DMG) image is available so you’ll have to go into Disk Utility and format the VM disk partition and give it a name.


The name can be whatever you want it to be


Now you can exit DIsk Utility and continue installing by selecting your new disk...

Once installation is finished, the system will reboot and you will be asked a few setup questions (this took awhile). Also keep in mind if the VirtualBox is not the focused application you might not see the screen change when it’s done do to video drivers.

After that the Feedback Assistant will ask you signup. Force close it.

Edit: I never got this screen

Be sure at this point to remove the .iso file from the CD Storage Device in VirtualBox else if you reboot you’ll end up going back into setup.

Step 7: Multibeast

Multibeast is a collection of kext files that you'll need to install for your Hackintoshes to have sound, internet, a high resolution screen, and more. Different Hackintosh builds require different Multibeast setups, though most setups are very similar. Whether you're installing Mac OS X on your computer for the first time, or just updating your computer from an older version of OS X, you'll probably have to run Multibeast after the initial installation of Yosemite. Find out what Multibeast options you need to install.

Edit: Now from here I’m not sure. My version runs but it’s kind of slow and I can’t change the resolution because I need to track down the right drivers and use Multibest or manually install them. You may have difference outcomes.

To run Multibeast in OS X Yosemite, you may have to go the "Security" section of System Preferences in Mac OS X, go to the "General" section, and check "Anywhere" in the "Allow applications" section. After running Multibeast, you'll also probably want to change your BIOS settings back to normal (from Step 4).

Well anyway, at this point you should be done!

Configure your Office 365 for SMTP Applications

Great article if you want to configure your local windows server to send out emails via SMTP via your Office 365 account. Though some of the initial steps have changed and not updated on the site.

http://www.configureoffice365.com/configure-office-365-smtp-relay/

Updated Steps 2-5:

  • 2. Click on Outlook in the top Right Corner (From the Portal Site)
  • 3. Click on the Gear, then Options
  • 4. Click on the link that says “Settings for POP or IMAP access…”
  • 5. This will open a popup window. Scroll to the bottom to see your SMTP Server Information.

Then follow the rest of the steps.

AngularJS Directives 2

A few weeks ago I talked about a book, “Mastering AngularJS Directives”. A great book for directives but there aren’t that many that focus mainly on Angular Directives. I’ve recently been reading through a new book, AngularJS Directives. I have to admit that I like this book even more. One main thing it has that’s nice, is a better way to visually represent directive scopes which works well. Also, it goes into much detail on compile vs link. The other book does as well but in a different manner. It’s worth a look at.

AngularJs Select Element, set Label and Value

To set your select’s label and value expressions in AngularJs, you can simply do this example.

States and Countries

States have

Code: FL

Name: Florida

Countries have

Code: US

Name: United States

 

State:
<select data-ng-options="state.name for state in vm.stateProvinces track by state.code"></select>

Country:
<select data-ng-options="country.name for country in vm.countries track by country.code"></select>

AngularJs Directives

I haven’t posted much in regards to AngularJS since most of what I would say is already out there to read by someone else. AngularJs is a great technology for the web and if you like the use of includes and templates in your html, you’ll love it.

One thing I want to point out though is if you’re not using Angular Directives, then you’re not building your web app properly. Sure it might work, sure you can do things many different ways and not use directives at all but the biggest power in Angular is using Angular Directives.  The ability to create your own html elements which act as custom components.

The tricky part with angular directives is that they are easy to copy and paste from other sources to use and somewhat “easy” to create some really basic ones.  However, it takes time, skill and an understanding of the under lying core and events to really master directives and create your own proper directives that account for performance and calling things in the right order.

There’s a balance between KISS and DRY. On one hand you can get something working quickly with KISS. However if you do plan to repeat yourself elsewhere and want to keep your code DRY then it’s not so simple and a little more complex.

One great book I recommend and reading through twice is Josh Kurz’s Mastering AngularJS Directives.  Where other books just basically repeat what’s in the angular documentation with some better examples, this book goes beyond basic AngularJs and really gets into TDD and Angular Directives. Great book for anyone wanting to get to the next level.

Remember, have an Angular App with no directives at all? Then you need to go back to the drawing board.

Scrum for the Rest of Us

I had the pleasure to work with The Braintrust Group and review their book to provide feedback on it awhile back. It has now been published up on Amazon. I defiantly would recommend this book for anyone new or experienced with Scrum. It has a lot of interesting tips and real world problems/solutions as well as pitfalls to look out for. I have to promote since my names in the book :)

Scrum for the Rest of Us! by Brian M Rabon

jpeg

Product Details

  • Paperback: 92 pages
  • Publisher: Dog Ear Publishing (January 20, 2014)
  • Language: English
  • ISBN-10: 1457525801
  • ISBN-13: 978-1457525803

Are you... Trying to implement Scrum outside of software development? Looking for specific answers to your deepest Scrum questions? Wanting modern advice that will benefit your organization?
Scrum For The Rest Of US offers practical advice, questions and answers, and tips that will help you avoid costly mistakes with Scrum. Don't waste hours searching the web, reading references that are outdated, when you can have everything that you need in a single guide.
It's THE first book written specifically for anyone interested in Scrum outside of the software development industry. Regardless of what field you are in, this book specifically points out areas that may challenge you and your organization with adopting Scrum.
Perhaps you are new to Agile/Scrum, have heard a few buzzwords, but the core concepts are not familiar yet. Perhaps you are an Agile/Scrum veteran who wants to avoid roadblocks or improve implementation. Regardless of where you are on your path to mastery, this book is intended to help you maximize the benefits of Scrum.
What you'll find in this book:

  • When and why to use Scrum
  • In-depth coverage of the roles, meetings, and artifacts in Scrum
  • Clear answers to frequently asked questions
  • Common pitfalls and how to avoid them
  • Practical case studies and examples
  • Tips and tricks for maximizing success
  • Full glossary of terms and definitions
What you won't find in this book:
  • Technobabble and industry jargon
  • Software references
  • Boring charts and meaningless statistics

SQL 2012 – Remote Connection Changes

The release of SQL 2012 default to dynamic ports for remote access.

You need to open port 1434 for the SQL Browser if you want clients to access it remotely.

More info: http://jeffreypalermo.com/blog/how-to-configure-sql-server-2012-for-remote-network-connections/

excerpt:

This TechNet article explains that to connect, the client will send a UDP packet to port 1434 first to resolve the dynamic port.  Then it will connect as normal.

The appropriate Windows Firewall rule to establish is a program rule, not a port rule.

Understanding Visual Studio 2013 and Git Source Control

 

Previous TFS Mindset

If you are used to using TFS (Team Foundation Server), switching over to Git on Visual Studio 2013 is a different thought process.  We’re used to thinking with TFS, local files and then I “check-in” “check-out” back and forth on the server. The nice thing about this was that you knew your files were backed up on the server. The downside to this is that in a team environment you’re checking in code that might break the build and cause someone else to have problems when they get the latest for various reasons. You forgot to check in a class or your code wasn’t ready and there isn’t gated check in process. Either way this is the mental image when you think of VS2013 and TFS.

 

image

With Git, using your own Git Server or GitHub etc and trying to think of Git as you think of TFS starts to cause confusion around the new Team Source view for handling projects.

image I’ll attempt to simply the understanding and how it works.

 

End Result When using VS and Git. New Mindset.

Untimely this is the end result from “Adding” or “New” or “Cloning” a project. From Visual Studio you Check-In/Out from a local Git repository. This is great in that you can check in code without affecting others. You’ll need to backup your local files though. Then after you get to a point you deem worthy, you “Sync” the changes to the Git server.

 

image

 

Goal: Create a local Git Repo. There are three ways to start a new Git Repo.

Create a “New” Local GitRepo

image

You create a local project in Visual Studio 2013. You can then add it to a “New” git repo.

  1. image
  2. image
  3. You’ll now have a new .git folder in your Project Folder     SNAGHTML260c80e8
  4. Note: if this folder is in a Dropbox folder you’ll get an error “An error was raised by libgit2. Category = Os (Error). Failed to lockfile to ‘…‘:Access is denied”. SNAGHTMLb4407d4. Simple click on “Add” image  and put in the path to the new Git Repo location.
  5. You’ll now see your local repo in the Git Repo list.SNAGHTMLb4d2766

 

Or “Add” an Existing Local Git Repo

You already have a local Git Repo you want to use you then click on “Add” and find the existing local Git Repo. All previous Git Settings with this Repo are intact so when you Sync it will sync to wherever it synced before or prompted you to specify.

image

 

Or “Clone” an Online Git Repo to a new Local Git Repo

You want to pull down files from an existing online project you can then “Clone” the repo from the Git server to new local repository and then open the project in VS.

image

 

Now you can Sync to an online Git Server

Now double click one of the repos to open up that project.

Click on Unsynced Commits

image

Depending on if the project is New or has already been synced or is a new Cloned project you’ll see one of two screens.

This is the screen you’ll see if the project is newly created. Add in the URL to the online GitRepo you want to perform the initial push too and Publish.

image

This is the screen you’ll see if the project was an existing GitRepo Add or a Clone from an online Git Server. Clicking “Sync” will then sync your local files with the server files.

SNAGHTMLb5ec2f7

Structuring Your Application Project

Great article by John Papa on Angular App Structuring guidelines and it also applies to all applications using the LIFT Guidlines. 

Regarding all Application Projects, this is a good snippet of the article.

----

App Structure

I find it extremely helpful to have an idea of what is important to me and my team in structuring my app instead of focusing on the actual structure.

You have to find your own path that is comfortable for you and your team. Instead of just picking a structure, it’s helpful to think about the “why”, so I’ll walk you through the guidelines I follow and my thought process on why I choose how I do. This is a follow up to my post onAngular Structure.

How you organize your structure is up to you. There are many right ways of doing this, and consistency in your project is key.

These are my guidelines. I’m sharing them as one possible path you can take but the main point of this post is to share how I think about structuring my Angular apps. There is a reason for the madness and if you take anything from this post it’s to be sure to have a set of guidelines and conventions of your own.

Thanks to my friend Ward Bell for helping review these and in many cases, contributing to the content quality over the several projects with me.

The LIFT Guidelines

The structure should follow these 4 basic guidelines. When I find my structure is not feeling comfortable, I go back and revisit these LIFT guidelines

  1. Locating our code is easy
  2. Identify code at a glance
  3. Flat structure as long as we can
  4. Try to stay DRY (Don’t Repeat Yourself) or T-DRY

Another way to check your app structure is to ask yourself …

How quickly can you open and work in all of the related files for a feature?

I find placing related files for a feature in the same drawer really helps me be more efficient.

Locating

I find this to be super important for a project. If the team cannot find the files they need to work on quickly, that needs to change. I’ve been on projects where this has been an issue and it wastes time.

Locating code needs to be untuitive, simple and fast. You may not know the file name or where its related files are, so putting them in the most intuitive locations and near each other saves a ton of time.

Identify

When I look at a file I expect to know what it contains and represents. If this means you want longer file names, then so be it. For me its more about being descriptive with file names and keeping that contents of the file to exactly 1 thing. No files with multiple controllers, multiple services, or a mixture.

There are deviations of the 1 per file rule when I have a set of very small directives or filters that are all related to each other, they are still easily idnetifiable. If not, 1 per file.

Flat

Nobody wants to search 7 levels of folders to find a file. Think about menus on web sites … anything deeper than 2 should take serious consideration. In a folder structure there is no hard and fast number rule, but when a folder has 10 files, that may be time to create subfolders (or drawers as I like to call them).

The general guidelines here is base on your comfort level. I prefer a flatter structure until I see a specific value (to help the rest of LIFT) in creating a new folder.

T-DRY

Being DRY is important, but not crucial if it sacrifices the others in LIFT, which is why I call it T-DRY. I don’t want to type session-view.html for a view because, well, it’s obviously a view. If it is not obvious or by convention, then I name it.

I don’t name my controllers with “controller” in their file name nor their registered name with Angular. I differ from others on this point, but it feels so un-DRY for me. I may have 30 controllers and continually typing “controller” everywhere (in file names and in code) and its obvious that it is a controller felt completely un-DRY.

-----

There is a lot more there going on and in regards with AngularJS the source article is a great read.