Pages

Showing posts with label MAC OS X. Show all posts
Showing posts with label MAC OS X. Show all posts

Sunday, November 3, 2013

How to install Windows 8.1 on mid-2009 Macbook pro

How to install Windows on Macs?

The simplest answer is - use "Bootcamp"

Well if its so simple then... Why this tutorial?

Because as it stands today, the latest version (5.0.5033) of Bootcamp does not support mid-2009 macbooks, which in my opinion is a shame esp. when you see a lot of machines in the market with much lower specs are running Win8. And as I soon found out, I was not the only one looking to get this done and found this amazing link on Apple support communities page: How to install Windows 8 on Mid 09 Macbook Pro (10.8.3). A big thanks to 'projectRelentless' and others on this thread, your comments were extremely helpful!

So let me lay down my machine specs and will then go through the to-do's and not to-do's for installation process.
I'm running Mountain Lion 10.8.5 on a mid-2009 13" macbook pro. core2duo, 2.26GHz, 160GB HDD, 4GB RAM with NVIDIA 9400M

And I installed Windows8.1 64bit edition - partitioned OSX using USB installer, but installation needs a DVD - USB install will not work if you are planning to install using bootcamp support. You DO NOT need Windows7. The process should apply for Windows 8, if you have a compelling reason to install that, though I'd say 8.1 is better, esp. the windows/start icon is back :D

Note: having a USB mouse during installation could be handy. Else you'll have to click / select either using your keyboard or by pressing your trackpad at bottom left because tap-to-click won't work.

And here are the steps!

Once again, they are largely derived from the discussion I linked above and I'm going to refer mainly the changes

  1. Firstly, unlike the main instruction... you do not require a Windows7 DVD. So relax if you don't have one! But then, how do you partition the disk? (I think you can use Win8 DVD, but since I was initially trying to use USB install mode, I did not check it)
    The trick is to fool bootcamp to believe that the current device can burn a USB. How?
    • Go to Applications->Utilities, Right click on Bootcamp and select "Show Package Content"
    • Open Info.plist using Xcode, TextEdit or from terminal using vi, etc. You may be required to add yourself to users with edit permission.
    • Find the line which says - USBBootSupportedModels and add your model to the list of supported models by adding the line: <string>MacbookPro5,5</string>
      • Alternately, in some machines you may find the following key <key>Win7OnlyModels</key> . In this case, delete the line <string>MacbookPro5,5</string> which you'll find somewhere below this.  
      • Note: replace the value with your model number.
    • The next time you launch Bootcamp Assitant, you'll see an option to burn USB disk. Do this and then partition your disk. Give Windows (takes about 15-20GB) at least 40GB esp. if you are planning to install Visual Studio (10GB+) after that.
  2. Once you are done partitioning, your system will restart and boot using the USB (if you have left it plugged in). And here is the catch
    • With USB installer, you'll be able to start the installation process. Provide the key, etc. etc. but will get stuck on the screen for choosing partition.
    • You'll read in the linked discussion about "cannot install to the partition" error and the workaround of formatting the partition to use NTFS, etc. But...
      • With USB install this won't budge. You'll not be able to move any bit forward from here. Why? Apparently, the USB installer only supports Windows 8.1 or for that matter Win8 in EFI mode something that will not go hand-in-hand with this bootcamp created partition.
      • So whats the alternative? the other option is to install in CSM mode. Google to read more about UEFI vs CSM / Legacy / BIOS boot
      • What does not having EFI cost to us? Nothing much except for a little longish booting time.
  3. And this is where you'll need your DVD (Win8 or Win8.1).
    • After bootcamp assistant is done partitioning, simply remove the USB and insert your DVD.
    • Go through the installation steps.
    • You'll again find the partition screen, which will show the same error (unless you have formatted the partition when you reached this screen with your USB installation).
    • This time formatting the partition will let you pass through.
    • Let Windows do its bits, restart a couple of time and so on.
    • Create your account and choose your settings when asked.
  4. Finally, you'll find yourself staring at the shiny new tiles of Win8.1. but with a few glitches. You'll still be missing the tap-to-click feature for trackpad as well as the function keys like volume, display brightness, etc.
  5. Download the bootcamp drivers. NOTE: you do not need to install the 4.xx drivers mentioned in the discussion I referred above.
    • Go to folder: Bootcamp->Drivers->Apple and run the Bootcamp.msi. It will throw an error and won't run. This is where you'll need the registry file from http://www.theprojectdev.com/public/pub.html specified the original post. Create your own or download from the link (I simply downloaded it) and install it.
    • Now right click on the "BootCamp.msi" and run it as Administrator and it will go through.
    • This will install the bootcamp drivers and support for your trackpad and function keys and a few other features. 
    • Finally your system will ask for a restart, do it!
  6. And you are done... Now pat your back to have successfully installed it and share your happiness plus these instructions with your friends.
Enjoy!

Saturday, August 20, 2011

Configure apache localhost to use secure HTTP (HTTPS) using mod_ssl

For all those who want to test their website on localhost using the secure HTTP protocol, here is how you can configure apache for testing purpose. I did this on Mac OSX 10.6 using apache 2.2

Guidelines provided at apple are for older version. We'll use them to generate the certificate and then configure apache for newer version.

> mkdir ~/keys
> cd ~/keys
> openssl genrsa -des3 -out server.key 1024
Remember the passphrase you provide here. It will be required in next steps.

> openssl req -new -key server.key -out server.csr
Answers to all questions are straight-forward, except for Common Name: you need to provide 127.0.0.1 (i.e. server name)

> openssl genrsa -des3 -out ca.key 1024
For simplicity, keep the passphrase same as used above

> openssl req -new -x509 -days 365 -key ca.key -out ca.crt
This again asks same Questions as in step 4, but this time for Common Name you can provide any dummy name

Find sign.sh file if you have mod_ssl package downloaded, or else retrieve it from pkg.contrib folder from latest version of package. Copy the sign.sh to "keys" folder and make it executable

>chmod +x sign.sh
>./sign.sh server.csr

Say yes ("y") to the 2 questions

>sudo mkdir /etc/apache2/ssl.key
>sudo cp -r * /etc/apache2/ssl.key/

>cd /etc/apache2/ssl.key/
>sudo cp server.key server.key.original

>sudo openssl rsa -in server.key.original -out server.key

>sudo apachectl stop

>sudo vim /etc/apache2/httpd.conf

* You may want to make a backup before editing this

- Locate and comment out Port directive to listening on 80
*Note - Commenting this line will force to use only https, leave it as is if you want to use both.

- Locate and uncomment the LoadModule ssl_module libexec/apache2/mod_ssl.so

- sudo vim /etc/apache2/extra/httpd-ssl.conf
* Again make a backup before editing

- Change ServerName from www.example.com to 127.0.0.1
- Provide your email id for ServerAdmin

- Under SSLCertification, provide path to our own ssl certificate i.e. SSLCertificateFile "/private/etc/apache2/ssl.key/server.crt"

- Also, set ServerKey with: SSLCertificateKeyFile "/private/etc/apache2/ssl.key/server.key"
- You may also set the other paths as per requirement

> sudo httpd -D SSL
> sudo apachectl start

And you now have https://127.0.0.1 running