Contribute
Register

[GUIDE] USB flash drive installation optional dual boot Win7

Status
Not open for further replies.
Joined
Oct 16, 2010
Messages
67
Motherboard
2x SSD
CPU
core i7
Graphics
GTS 650
Mac
Classic Mac
Mobile Phone
Since my hackintosh has no optical drive (I keep all my optical media as images on my storage server) and burning DL DVD has always failed me anyways, I tried and succeeded to install SL using iBoot from a flash disk onto one single harddrive. Both SL and iBoot are on the same flash disk so no DVDs are needed.
This guide is partly based on http://www.insanelymac.com/forum/index.php?showtopic=180954 Thx, blackosx.

I will be continually updating this guide as questions arise. As this is a new guide, please report your success or troubles!

What you need:

- OS X retail disk/image

- Windows 7 retail disk/image

- 2 USB sticks which fit OS X and Win7 respectively. OS X needs an 8GB stick, Win7 can do with a 4GB stick.

- A PC running OS X to prepare OS X installation media.

Optional:
- Linux (Live disk) for preparing Win7 installation media if you want to use my technique. There are alternative ways to make a bootable USB Win7 install USB stick under Windows as well.


Let's begin:


0)
This guide does not touch on general iBoot topics, updating OS X, configuration etc. and instead focuses primarily on installing both OSs using USB sticks. I highly recommend looking at the links below for the correct BIOS settings, some gotchas and anything post installation related (MultiBeast):
Installation Troubleshooting Tips & General Recommendations http://www.tonymacx86.com/viewtopic.php?f=3&t=9541
iBoot + MultiBeast: Install Mac OS X on any Intel-based PC http://tonymacx86.blogspot.com/2010/04/iboot-multibeast-install-mac-os-x-on.html

Prepare OS X USB stick installation media under OS X :

1)
Partition and format one flash disk as Mac OS Extended (HFS+) using GUID Partition Table or Master Boot Record with the volume name "SL". Verify that the partition is bootable (Command-i in Disk Utility: "Bootable: Yes").

2)
Download latest Chameleon from http://forge.voodooprojects.org/p/chameleon/downloads/

3)
After unzipping, open Terminal and go into in the i386 directory.

4)
Modifying the MBR: Substitute X with your flash disk number (use CMD-i in Disk Utility or "diskutil list" to find the disk number. I.e /dev/disk2). Don't omit the "./" before "fdisk":
Code:
$ ./fdisk -f boot0 -u -y /dev/diskX
More info here: http://www.puredarwin.org/developers/booting/boot

5)
Unmount (not eject) partition. Can be done in Disk Utility.

6)
Modifying the bootsector of the first partition: Substitute X with your flash disk number and x with the partition number (use CMD-i in Disk Utility or "diskutil list" to find the disk and partition numbers. I.e /dev/disk2s2):
Code:
$ dd if=boot1h of=/dev/diskXsx

7)
Re-mount the flash disk. Can be done in Disk Utility.

8)
Copy startup file to flash disk at the mounted location of /dev/diskXsx:
Code:
$ cp boot /Volumes/SL/

9)
Mount iBoot.iso. Can be done in Disk Utility.

10)
Copy iBoot files to flash disk:
Code:
$ cp -Rp /Volumes/iBoot/* /Volumes/SL/

11)
Restore Mac OS X install disk to the flash disk partition using Disk Utility. Uncheck the checkbox "Erase destination" before restoring!

12)
Reboot the system.

13)
Choose OS X in the boot menu and wait for the setup to start.

14)
Choose step "a" or "b" depending on if you want a dual boot system:

Choice a)
Single boot (only OS X, no Windows):

If OS X will be the only system on your harddrive, open Utilities/Disk Utility and partition the harddrive with GUID Partition Table. Format at least one partition with HFS+ Journaled for OS X. This partition needs to be <1TB otherwise you cannot boot OS X from it. You can go ahead and install OS X now. Keep the flash disk connected and reboot after the installation is finished.
Now you should be able to choose your installed OS X in the boot menu.

Congratulations, you have successfully installed OS X !

What now?
It is time to revisit Tonymacs tutorial to set up MultiBeast:
http://tonymacx86.blogspot.com/2010/04/iboot-multibeast-install-mac-os-x-on.html

...and look at the bottom for some useful links.

Choice b)
Dual boot (OS X and Win7):

If you want to dual boot, open Utilities/Disk Utility and partition the harddrive into 2 or more partitions with GUID Partition Table. Format one partition with HFS+ Journaled for OS X and a second one with Fat32 for Win7. The HFS+ partition needs to be <1TB to be able to boot OS X from the harddrive later. You can of course create more partitions if you like, for maybe BSD, OpenSolaris, FreeDOS and possibly Acorn as well.
Do not start the installer yet! You can quit the OS X setup for now.


Prepare the Win7 installation media flash disk using a second stick

There are many ways to create a Win7 USB installation medium and any of them is fine to use, google is your friend. I only ever managed to do this successfully under linux myself :

15)
Create partition with fdisk, using type 7 and set it as active (bootable). Please look at the man page on how to use fdisk.

16)
Formating the flash disk as NTFS: Substitute X with your flash disk number and x with the partition number (I.e. /dev/sdf1). You can check this by running blkid.
Code:
$ mkfs.ntfs -f /dev/sdXx

17)
Writing a Windows boot record using ms-sys: Most distros have a binary package available. Source code is here http://ms-sys.sourceforge.net/
Substitute X with your flash disk identifier (I.e. /dev/sdf). You can check this by running blkid.
Code:
$ ms-sys -7 /dev/sdX

18) Mount the flash disk using ntfs-3g:
Code:
$ mount -t ntfs-3g /dev/sdXx /mnt/usb2

19)
Mount your Windows 7 ISO as a loop device:
Code:
$ mount -o loop windows7-x64.iso  /mnt/iso
...or insert and mount your Win7 DVD.

20)
Copy all Windows 7 installation files to the flash disk:
Code:
$ cp -r /mnt/iso/* /mnt/usb2

21)
Unmount the flash disk:
Code:
$ umount /mnt/usb2

22)
Install Windows: Boot with the Windows USB stick first and do the Windows install, picking the Fat32 partition as target and choosing NTFS if it asks to convert the partition.

23)
Install OS X: Boot with the OS X stick, choose OS X in the boot menu and wait for setup to start. Perform the OS X installation. Keep the flash disk connected and reboot after the installation is finished.
Now you should be able to choose your installed OS X or Win7 in the boot menu.

Congratulations, you have successfully installed OS X and Win7 in a dual boot configuration !

What now?
It is time to revisit Tonymacs tutorial to set up MultiBeast:
http://tonymacx86.blogspot.com/2010/04/iboot-multibeast-install-mac-os-x-on.html


Links with useful hints:
Subpixel anti-aliasing http://www.tonymacx86.com/viewtopic.php?p=15072#p15072

PrefPane for Chameleon settings http://forge.voodooprojects.org/p/c.../tree/HEAD/trunk/ChameleonPrefPane/bin/OSX106

http://www.tonymacx86.com/viewtopic.php?p=80725#p80725


P.S.:

If anyone wants to try, for step 4) instead of using the chameleon patched fdisk:
Code:
$ dd if=boot0" of=/dev/diskX bs=440 count=1
Taken from here http://forum.voodooprojects.org/index.php?topic=1141.0
This way it might be possible to do all preparations with only a Linux Live disk, without the need of having access to a Mac at all.
 
Joined
Jan 25, 2011
Messages
8
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation guide (dual boot Win7)

Hi.

First of all, thanks for your guide.
I'm trying to do the same as you, because my optical DVD drive on my desktop computer is broken (it can just read CD now...)
But I've no 8G USB (only 2x4G) so, I'm trying to restore my Snow Leopard retail DVD onto a partition I've made on my iPhone (using USB Drive http://www.dmytro.me/search/label/usb ) from my MacBook.
The problem:
Code:
macmoox:i386 moox$ dd if=boot1h of=/dev/disk2s2
dd: /dev/disk2s2: Permission denied
macmoox:i386 moox$ sudo dd if=boot1h of=/dev/disk2s2
Password:
dd: /dev/disk2s2: Operation not supported
I've format my partition using MBR because I can't make the first like ($ fdisk -f boot0 -u -y /dev/disk2
fdisk: could not open MBR file boot0: No such file or directory)
So What am I doing wrong ? Can I follow this guide while I can't use the first partition of my iPhone ( :D ) ?
 
Joined
Oct 16, 2010
Messages
67
Motherboard
2x SSD
CPU
core i7
Graphics
GTS 650
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation guide (dual boot Win7)

MoOx said:
So What am I doing wrong ? Can I follow this guide while I can't use the first partition of my iPhone ( :D ) ?

I think you should be able to, but I cannot say for sure. Just prepare your flash drive as I described above, running fdisk, dd and putting the iboot files on it. Restore Snow Leopard to your iPhone partition, which partition number should be irrelevant (i hope). When you boot from your flash drive, SL from your iPhone should show up in the boot menu.


MoOx said:
I've format my partition using MBR because I can't make the first like ($ fdisk -f boot0 -u -y /dev/disk2
fdisk: could not open MBR file boot0: No such file or directory)

You need to run
Code:
./fdisk -f boot0 -u -y /dev/disk2

The dot and slash (./) are important.

MoOx said:
macmoox:i386 moox$ dd if=boot1h of=/dev/disk2s2
dd: /dev/disk2s2: Permission denied

When you run dd, is your flash drive still mounted? If so you will need to unmount it first. This can be done is Disk Utility on OS X or using the umount command under linux.
 
Joined
Jan 25, 2011
Messages
8
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation guide (dual boot Win7)

freedumb2000 said:
MoOx said:
macmoox:i386 moox$ dd if=boot1h of=/dev/disk2s2
dd: /dev/disk2s2: Permission denied

When you run dd, is your flash drive still mounted? If so you will need to unmount it first. This can be done is Disk Utility on OS X or using the umount command under linux.

My partition is not mount (if it's mount, the message "dd: /dev/disk2s1: Resource busy." appears).
But I've made a mistake... I' think I've to use disk2s2 because of my iPhone but...

Code:
macmoox:i386 moox$ diskutil list
(...)
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.4 GB     disk2
   1:                  Apple_HFS Snow Leopard            8.4 GB     disk2s1

So It's ok !

Here is some tiny corrections (in bold)

--
dd if=boot1h of=/dev/disk2s1
mount your USB drive
cp boot /Volumes/Snow\ Leopard/ (same as /dev/disk2s1)
--
cp -Rp /Volumes/iBoot/* /Volumes/Snow\ Leopard/


Just a thing I found wired : "restore mac os x install disk to stick"
When your do "Restore", you can see "Erase "Snow Leopard" and replace its contents with the contents of "Mac OS X Install DVD". So it erase the content of the previous "cp" right ? No ? What am i missing ?
 
Joined
Oct 16, 2010
Messages
67
Motherboard
2x SSD
CPU
core i7
Graphics
GTS 650
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation guide (dual boot Win7)

Thank you for the correction! I hope I will have time soon to make the guide a little nicer, thank you for putting up with it in the meantime :)

Did fdisk work out for you? I changed the answer to your question a couple of minutes ago, because I realized what your problem was.

Good luck and let us know if it works out!
 
Joined
Jan 25, 2011
Messages
8
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation (optional dual boot Win7)

The ./fdisk work fine !

I'm currently restoring the DVD on my iPhone, it takes one or 2h.

The thing I don't understand in your guide is why we copy the iBoot content before restoring DVD on the flash drive. Like I said, make a "Restore" tell you that your partition will be "erased of all data", so cleaned. This is not true ?

PS: You miss the "s" on "/Volume/iBoot" for the cmd line
cp -Rp /Volume/iBoot/* /Volumes/Snow\ Leopard/
 
Joined
Oct 16, 2010
Messages
67
Motherboard
2x SSD
CPU
core i7
Graphics
GTS 650
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation (optional dual boot Win7)

MoOx said:
The ./fdisk work fine !

I'm currently restoring the DVD on my iPhone, it takes one or 2h.

The thing I don't understand in your guide is why we copy the iBoot content before restoring DVD on the flash drive. Like I said, make a "Restore" tell you that your partition will be "erased of all data", so cleaned. This is not true ?

PS: You miss the "s" on "/Volume/iBoot" for the cmd line
cp -Rp /Volume/iBoot/* /Volumes/Snow\ Leopard/

A restore does not delete the contents of the partition. In which order you do this does not matter.
Edit: I forgot to mention, of course you will have to uncheck the box "Erase destination" when doing the restore and you need to restore to the partition and not the drive! Hope this doesn't come too late. Otherwise try redoing the previous steps fdisk, dd, iboot again after the restore.

PS: I could not make out where I missed a "s" ?
 
Joined
Jan 25, 2011
Messages
8
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation (optional dual boot Win7)

Thanks for the reply.
I'm waiting, I'll see :)

The mistake is here "VolumeS"
/Volume/iBoot
/Volumes/iBoot
 
Joined
Jan 24, 2011
Messages
80
Motherboard
Asus VX5 Notebook
CPU
Q9000
Graphics
GTX 260M
Re: USB flash drive based installation (optional dual boot Win7)

Hi freedumb2000,

for dualboot, you are talking about to do two partitions, one in mac format and the second in fat format.

for mac: should I make a GUID Partition ?
for win: what type of partition ?(MBR?)

then you say to quit the osx installation. What should I install first? windows in the fat partition or snow leopard in the mac partition ?? Is there a difference in compatibility ??

with best wishes,

hectorox
 
Joined
Oct 16, 2010
Messages
67
Motherboard
2x SSD
CPU
core i7
Graphics
GTS 650
Mac
Classic Mac
Mobile Phone
Re: USB flash drive based installation (optional dual boot Win7)

hectorox said:
Hi freedumb2000,

for dualboot, you are talking about to do two partitions, one in mac format and the second in fat format.

for mac: should I make a GUID Partition ?
for win: what type of partition ?(MBR?)

then you say to quit the osx installation. What should I install first? windows in the fat partition or snow leopard in the mac partition ?? Is there a difference in compatibility ??

with best wishes,

hectorox


Hi,

I reformated the tutorial and modified it to reflect the answers. In short, yes use GUID. You only have one partition table, it shouldn't need to ask you for anything for the second partition. You need to install win first and then OS X, order does matter in this case.
 
Status
Not open for further replies.
Top