Archive for the ‘Mac’ Category

Dual Boot for MacBook

This weekend I set myself the goal to partition the hard drive in my MacBook, leave Mac OS X Snow Leopard installed in one partition and install Windows 7 (x64) in the second partition. The reasons why I want Windows in my MacBook are the following:

  • Visual Studio: I like X Code, Apple’s development enviornment, but I like Visual Studio better.
  • .NET Framework and Silverlight: I want to develop some projects using these technologies, so (as of now) Windows is a must.
  • You never know when you will need to use Windows.

System description:

  • MacBook
  • Mac OS X (10.6.2) Snow Leopard
  • Processor: 2GHz Intel Core 2 Duo
  • Memory: 1 GB

What do you need?

  • Windows 7 DVD
  • Mac OS X Snow Leopard DVD
  • External DVD drive (optional)

My conditions were very unique, which made the whole process very interesting.

Preconditions:

  • Had to use an external DVD drive: My internal DVD drive stopped working some time ago, so I had to use an external DVD drive to be able to boot Windows 7 and install it.
  • Backing up files: My laptop was not new, so I didn’t have the privilege to reformat the hard drive without worrying about backing up files. Backing up the information in my Mac before reformatting was a must.

Important Note:
If you have a functional DVD drive, use the following instructions and ignore my notes on using an external DVD drive.

Steps 1: Backup files

Needless to say; I highly recommend doing this. I used Time Machine, an application that comes with Snow Leopard, which enables you to automatically backup copies of everything on your Mac (files, applications, and settings) in an external hard drive. This application is very easy to use and is self-explanatory.

Step 2: Boot Camp Assistant

According to this site, Bootcamp is a bootloader that “includes a firmware update which installs an EFI firmware with a minimal legacy BIOS interface that extends the Mac’s firmware to support booting OSes which require a BIOS.”|
To get started, I ran Boot Camp Assistant to partition my hard drive for Windows. As the application was scanning my disk, I got the following message:

The disk cannot be partitioned because some files cannot be moved.
Back up the disk and use Disk Utility to format it as a single Mac OS Extended (Journaled) volume. Restore your information to the disk and try using Boot Camp Assistant again.”

After doing some research on the Internet, I saw that the only solution was to reformat my hard drive to Mac OS Extended (Journaled). Confusingly, my hard drive was already Mac OS Extended (Journaled), which makes me believe that probably there were some bad sectors in my drive. Reformatting my drive was actually not a problem since I had my files backed up in my external hard drive.

At first I thought that by reinstalling the operating system in my hard drive (without actually blapping the OS) the problem would go away, but that did not fix the problem. Later on I realized that I had to reformat my hard drive to Mac OS Extended (Journaled) format. Potentially I could have fixed the problem with a disk utility, but for the longest time I have wanted to get my machine cleaned up. Below are the steps I took to reformat my hard drive:

Since you can’t reformat an in-use partition, you need to the following:

  • Connect your external DVD drive to machine (I have not tried it with an external USB drive), put the Snow Leopard DVD, and reboot your system.
    NOTE: In order to boot from an external hard drive, when you reboot your system press the Option key and you will see the external hard drive as an alternative to boot from.
  • Open Disk Utility from the top menu bar and use it to reformat your hard drive. Make sure you select Mac OS Extended (Journaled).

Once you have reformatted your hard drive, the next step is to partition it using Boot Camp Assistant:
Launch Boot Camp Assistant, select how you want to partition your hard drive and select continue.
NOTE: Resizing your partition is important depending on what operating system you want to use and whether you want to write to your windows drive from Mac OS X. If you want to use Windows 7 or Vista, you need to use NTFS. If you want to install Windows XP, you have the option of using FAT32 or NTFS. If you want to use FAT32, your partition cannot be larger than 32 GB, not because FAT has a 32 GB limitation, but rather because by design Windows 2000/XP will format 32GB on FAT32 partitions. The reasoning behind the is that performance of FAT32 decreases with larger partitions, however other operating systems such as Linux are capable of formatting FAT32 partitions up to 137GB.
NOTE: If you are using an external DVD drive to boot Windows, don’t let Boot Camp Assistant reboot the system for you. This is because, to my knowledge, Boot Camp does not support booting off external drives (ARGH!). It may be possible that if you create a bootable media as instructed in this site, and you press the Option key, you may be able to boot from an external drive. I did not try that though. Instead, quit the application and install rEFIt, which is a “a boot menu and maintenance toolkit for EFI-based machines like the Intel Mac. You can use it to boot multiple operating systems easily, including triple-boot setups with Boot Camp. It also provides an easy way to enter and explore the EFI pre-boot environment.” With rEFIt, I was able to boot from my external DVD drive and run the installer for Windows 7.

Step 3: Install Windows 7

As soon as I rebooted my machine to run the Windows 7 installer, I ran into the following problem:

“1.

2.

Select CD-Rom Boot Type:_”

The screen did not allow me to press any keys or do anything at all. The reason for this problem, according to this site, is the following:

This problem occurs because the ETFSBOOT.COM program does not handle file versions according to the International Standards Organization (ISO) 9660 specification.

Note The ETFSBOOT.COM program creates the CD boot sector.

The ISO 9660 specification instructs that a name for a file record should consist of the file name that is followed by the file version. Also, the specification instructs that you must separate the file name and the file version by a semicolon. For example, the following file record is valid:

FileName;1

The Windows PE file system driver handles the file version as an option. However, the ETFSBOOT.COM program cannot locate the Setupldr.bin/Bootmgr file if you use a file version.

Note The CDimage.exe program does not append a file version to a file name in a file record.

Therefore, if you use a program other than CDimage.exe or OSCDimg.exe to create the CDFS image file, the computer does not start from the image.

To solve this problem, I followed the instructions given at this other site. Ignore the fact that the folders are called server2008, it is just a folder name. Since I wanted to be efficient and copy/paste the command, I named the folders as indicated in the site. NOTE: Be sure to fix the mistake pointed by Rafal Fitt:

Fix the mistake:
(the missing R in path)

c:\seRver2008dvd\server2008dvd.iso

The first time I ran the command, I got the following error:

C:\server2008exe>oscdimg -n -m -bc:\server2008iso\boot\etfsboot.com c:\server2008iso c:\server2008dvd\server2008dvd.iso

OSCDIMG 2.54 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2007. All rights reserved.
Licensed only for producing Microsoft authorized content.

ERROR: Could not open boot sector file “c:\server2008iso\boot\etfsboot.com”
Error 3: The system cannot find the path specified.

I rebooted my machine and ran it again, finally working for me:

C:\server2008exe>oscdimg -n -m -bc:\server2008iso\boot\etfsboot.com c:\server2008iso c:\server2008dvd\server2008dvd.iso

OSCDIMG 2.54 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2007. All rights reserved.
Licensed only for producing Microsoft authorized content.

Scanning source tree (500 files in 46 directories)
Scanning source tree complete (871 files in 200 directories)

Computing directory information complete

Image file is 3137654784 bytes

Writing 871 files in 200 directories to c:\server2008dvd\server2008dvd.iso

100% complete

Final image file is 3137654784 bytes

WARNING: This image contains filenames and/or directory names that are
 NOT COMPATIBLE with Windows NT 3.51. If compatibility with
 Windows NT 3.51 is required, use the -nt switch rather than
 the -n switch.

Done.

Once I was able to run the Windows 7 installer, I ran into a second issue. Boot Camp Assistant helps you create a partition for Windows and prep your machine for a dual boot. This partition, however, is FAT32 which is not supported by Windows 7. Therefore, when you run the Windows 7 setup installer and get to the dialog were you need to select in which partition you want to install Windows, click on the advanced button and reformat the drive to NTFS. During the installation process, your computer will restart several times, which means that you have to pay attention and boot to Windows instead of Mac (default.)

Step 4: Install the Boot Camp Drivers for Windows

Follow the instructions given in Step 3 of the Boot Camp Install Setup Guide. The only issue I ran in this step was the following error:

Boot Camp x64 is unsupported on this computer model

To fix this issue, follow the instructions given here

Using Mac keyboard in Windows

For information on how to use the Mac keyboard in Windows 7, please refer to the section “Using Windows from Your Computer” in the Boot Camp Install Setup Guide.

Other helpful links to install Windows 7 using Snow Leopard

  • http://news.cnet.com/8301-17938_105-10315168-1.html
  • http://news.cnet.com/8301-17938_105-10301015-1.html
  • http://lifehacker.com/384256/have-your-mac-and-windows-too-with-boot-camp