Sunday, April 5, 2015

Yosemite Hackintosh VMware Fusion 7 Bootcamp

Current Versions:

  • Yosemite v10.10.2
  • VMware Fusion Pro v7.1
  • Tuxera NTFS v2014


  •  Paragon v12 for Yosemite wasn't recognizing the NTFS volumes, so switched to Tuxera and it seemed to work better
  • Seemed like unmounting the recovery partition on my main Windows drive kept Fusion from trying to pull that in as the Bootcamp drive
  • Fusion took a very long time to process my main Windows boot drive... probably over a half hour with no progress status the whole time... apparently we  just have to be very patient

Saturday, April 4, 2015

Windows VMware Yosemite to Physical

General guide for installing physical boot OS X from a Windows VMware hosted guest instance. Including some specifics for Yosemite, the Clover boot loader and my hardware.


  • I tend to shuffle things around enough that I don't always have a working hackinstosh available. My MacBook pro is circa 2007 and stops at OS X 10.7.5, which doesn't run all the latest tools. Therefore the ready-to-run VMware Yosemite images out there are a convenient bootstrapping approach.
  • I had trouble getting my USB stick to boot with Clover – which appears to be a known X99-UD4 issue – so on the way to prepping a USB for UniBeast, I figured why not see how tough it is to install directly from the VMWare guest to my intended physical drive and skip the USB process.

Hardware as of this guide:

  • mobo: Gigabyte GA-X99-UD4 - LGA 2011-v3
    • bios: F12
    • onboard ethernet: Intel I218-V
  • CPU: Intel i7-5820k - 6 core Haswell-E
  • Video: Asus Strix Nvidia GeForce GTX 750Ti 2GB – not OS X native and 5280k doesn't have on-die intel graphics to lean on for initial bootup so drivers must be installed prior to first physical boot, addressed below. I can confirm this card supports (at least) dual monitors on DVI & DP. And the DP is running 2560 x 1600 res. This card was the perfect fit for my preferences:
    • fanless unless pushed hard
    • 3 x digital display, INCLUDING DP
    • well stocked and no more horsepower than I care to pay for = $160

Obtain Software Bits:

Software versions only listed for reference as of this build, not crucial unless noted.
  • VMware Workstation (v11.1)
  • Yosemite VMWare image - including patches to enable OS X guests
  • Clover - while UniBeast covers more hardware situations, if your hardware is lined up for it, Clover is pretty slick -- particularly the EFI only footprint --.  Couple nice bits for me: HaswellE kernel patch, no fuss iMessage NVRAM
  • Kexts
  • Nvidia's web driver  (** v343.02.02f04 seemed to work better than latest v346.01.01f01) - my GeForce GTX 750Ti is not natively supported
  • Pacifist (v3.5.2) - to crack open pkg files
  • (optional) MacDrive (v9.3.2.6) - generally handy for getting files on Mac HFS drives from Windows

    BIOS settings:

    • SATA controller in AHCI mode
    • (Post) xHCI = manual, xHCI handoff = disabled - i think this is a USB3 compatibility thing

    VMware Guest Configs:

    1. add 'smc.version = 0' to the VMX file in order to resolve 'vmcore/vmm/main/physMem_monitor.c:1123'
    2. In addition to vmware virtual drive add your physical disk to the guest
      1. i found SATA to never work vs IDE or SCSI... SCSI gave some minor warning so i went with IDE, full disk, persistent
    3. MBR trick to allow boot utilities (e.g. Clover installer) under vmware guest to write to physical disk:
      1. ** Before firing up vmware guest
      2. hide the physical disk from Windows (currently 8.1 - 6.3.9600) by temporarily clearing the MBR signature in the very last 2 bytes of sector 0 (see DirectDisk tool screenshot below)
      3. refresh Disk Management or DiskPart.exe > rescan
      4. put 55AA signature back - be careful not to refresh Disk Management or DiskPart
      5. now fire up vmware guest


    1. Fire up VMware and OS X guest
    2. Install Yosemite to the physical drive (app store download)
    3. Install AppleIntelE1000.kext into S/L/E to make sure present upon first phys boot
    4. Install Nvidia drivers - *** package will block under vmware saying “OS is not compatible” ...
      • use Pacifist to extract "1.3.2-65-346.01.01f01-NVWebDrivers.pkg" which bypasses the sanity check... This won't be a perfect install but does at least allow a rough bootup with display. Once physical drive boots on native iron, reinstall full package.
    ================= heading into EFI mod mode =================
      1. Boot vmware into physical disk via "power on to firmware" option
        • FYI – if you find that Clover is getting in the way of booting this physical disk under vmware for making adjustments, it is easy to move the whole EFI\Clover partition into another folder to temporarily disable it – see Mounting EFI under Windows under Misc tweaks below.
      2. Patch kernel for Haswell-E - Clover r3131+ can do this with a checkbox now
    1. Install Clover
      1. pick up at 9:37 on this guide video
      2. EFI\EFI\CLOVER\drivers64UEFI
        1. add HFSPlus.efi - is in his files pack. I couldn't find an official download point but it's all over the net.
        2. remove VBoxHfs-64.efi
      3. EFI\EFI\CLOVER\Kexts – FakeSMC, AppleIntelE1000e (move from /S/L/E to be clean), VoodooTSCSync
      4. Clover Configurator (v4.22.6 is very nice UI)
        1. Boot: 
          1. -v - verbose, you're going to want to watch for any clues if it blows up
          2. npci=0x2000 - everybody says this one is crucial
          3. nvda_drv=1 - got very low end res even with Nvidia drivers loaded w/o this
          4. kext-dev-mode=1 - this means load unsigned kexts
          5. slide=0 - pulled this from a guide (not sure necessary)
        2. Kernel and Kext Patches = KernelHaswellE
    2. FINI

      - You should now be able to reboot your physical host and select the physical drive for boot

    Misc tweaks:

    • Fix Home/End keys in Terminal
    • Mounting EFI partition under windows
      1. cmd.exe
      2. diskpart
      3. list disk (looking for your boot drive)
      4. select disk 1
      5. list part
      6. select part 1 (EFI will be first on a normally formatted GUID drive)
      7. assign letter=e
      8. (when done) remove letter=e
      9. Then need to launch explorer.exe as admin to access this E: drive
        1. cmd.exe as admin
        2. taskkill /im explorer.exe /f
        3. explorer

    MBR Trick:

    Saturday, December 13, 2014

    Chrome Blacklist Blocker (PowerShell)

    If you need this, you'll know why ;)

    Save ChromeBlacklistBlocker.ps1 somewhere local.

    You can run it via right mouse > "Run with PowerShell".
    It will dump out some event text whenever it notices a registry change.
    (this is currently commented out and latest code hides the powershell console window after launch)

    Or more permanently, put a shortcut like this into your auto "Startup" folder:
    powershell.exe {path}\ChromeBlacklistBlocker.ps1

    It will monitor the HKLM\Software\Policies registry branch and delete the value named "1" under Google\Chrome\ExtensionInstallBlacklist.
    This value is specific to my scenario but is of course editable to your specific needs.

    You can test it is working by creating the "1" value yourself and it should disappear.

    Another good way to test is to fire gpupdate.exe force a group policy update - again, if you need this, that should make sense :)

    More Google search keywords: block registry key

    Tuesday, November 18, 2014

    Open Source Photo Slideshow in Powershell

    All Source


    • Good randomization - One soon learns that a key feature of a photo screensaver is good randomization. Fortunately PowerShell has a readily available random commandlet that seems to do quite well.
    • Skips .hidden folders
    • Several hotkeys defined - open current image folder, copy current image to My Photos, rotate current image (and save), back up to previously shown photo and pause.
    • Easy to modify for your own preferences - it's just PowerShell

    I borrowed baseline code from the project referenced in the comments to generate the few Windows Forms GUI objects necessary to provide a topmost canvas for the current photo.

    Wednesday, August 27, 2014

    Style all <select>'s with a given CSS class into a fancy radio button look

    Json.Net Serialize Dictionary<Tkey, Tobject> to List<Tobject>

    Motivation: Wanted convenience of a Dictionary on the server side MVC controller (for some key look-up based logic), yet send the same list of objects down to Knockout Ajax client, which most readily consumes lists as Javascript object arrays.

    Could've just exposed the List<Object> as another property but wanted to see if I could roll it all into one property just to learn a little more about the Json.Net API.

    Nice that Json.Net's tokenization framework has already abstracted away from specific types within the overridden method scope on custom JsonConverter class, so this approach generically handles *any* Dictionary<object, object> without any additional effort.

    using Newtonsoft.Json;
    using Newtonsoft.Json.Linq;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    namespace YouNameIt {
      using CartItemDict = Dictionary<long, CartItemDto>;
      //reverse of this:
      //adapted from here:
      public class DictToListConverter : JsonConverter
        public override bool CanConvert(Type objectType)
          return objectType == typeof (Dictionary<object, object>);
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
          throw new NotImplementedException();
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
          var t = JToken.FromObject(value);
          if (t.Type != JTokenType.Object)
            var o = (JObject) t;
            var values = o.Properties().Select(p => p.Value).ToList();
            (new JArray(values)).WriteTo(writer);
      public class CartDto
        public CartItemDict Items { get; set; }
        public decimal TotalPrice { get; private set; }
      public class CartItemDto : VariantDto
        public long CartItemId { get; private set; }
        public int Quantity { get; private set; }
        public decimal UnitPrice { get; private set; }
        public decimal LinePrice { get; private set; }
        private List _addons;
        public List Addons { get { return _addons ?? (_addons = new List()); } }

    Friday, July 4, 2014

    [SOLVED] Comodo v7 blocking HTTP/S and FTP/S on Windows 8.1 IIS 8.5

    Besides opening incoming HTTP ports in the firewall via "Global Rules", the annoying thing for me to find was also adding an "Application Rule" for "Windows Operating System" on those same ports.

    Comodo v7.0.317799.4142

    And this guy explains what's necessary for FTP very nicely...

    • in comodo > global settings > application rule - add 20,21 & 5000-6000 as allowed incoming TCP ports on "Windows Operating System"... you will also hopefully get prompted to allow svchost which is responsible for running the ftpsvc
    • on internet router - forward ports 20,21 and 5000-6000
    • in IIS FTP settings
    • filezilla settings
      • require explicit ftp over tls