Jump to content

How to create Lion USB on Windows w/o Snow Leopard?


  • Please log in to reply
13 replies to this topic

#1
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

I have a snail-paced (768 KBp/s) internet connection and Snow Leopard is not being sold in my country so I can only be bothered with one download. I already have the source of the .iso/.dmg that is retail (its legal don't worry. My cousin in the US who had a Mac purchased it for me as a birthday gift and got the .dmg file) and I need to turn it to a bootable drive. Do I just write to the USB with TransMac or PowerISO? Or do I need to install a bootloader? If so how do I do that without a Mac?



#2
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

I have a snail-paced (768 KBp/s) internet connection and Snow Leopard is not being sold in my country so I can only be bothered with one download. I already have the source of the .iso/.dmg that is retail (its legal don't worry. My cousin in the US who had a Mac purchased it for me as a birthday gift and got the .dmg file) and I need to turn it to a bootable drive. Do I just write to the USB with TransMac or PowerISO? Or do I need to install a bootloader? If so how do I do that without a Mac?

 

You could use dmg2img to extract the data partition and USBit to write the Image on a stick.

From Ubuntu or any linux distro you prefer you could install Chameleon bootloader manually.

It's even possible to force a mount of the HFS+ volume to intergrate a Disabler.kext and FakeSMC.kext.

 

I've done it several times and it works.

 

best regards



#3
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

You could use dmg2img to extract the data partition and USBit to write the Image on a stick.

From Ubuntu or any linux distro you prefer you could install Chameleon bootloader manually.

It's even possible to force a mount of the HFS+ volume to intergrate a Disabler.kext and FakeSMC.kext.

 

I've done it several times and it works.

 

best regards

So the way I understand it, I use dmg2img to convert it to .img then use a program to write it to a stick? As for installing the bootloader, is it as easy as copying and pasting a file to the root of an ISO or is it something else?



#4
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

So the way I understand it, I use dmg2img to convert it to .img then use a program to write it to a stick? As for installing the bootloader, is it as easy as copying and pasting a file to the root of an ISO or is it something else?

dmg2img converts the zlib-compressed DMG to a raw image file. USBit is used to rawrite the image on the stick,

then you need to mark partition active, install bootsector with

dd if=boot0 bs=440 count=1 of=/dev/sdX

where X is your USB device. Then force a HFS+ mount and copy boot (use the ZIP folder) to the root of the partition.

While mounted you can also copy the kexts into /System/Library/Extensions/ folder.

Search for a guide to force a RW mount.

 

hint:

 

 

$>dmg2img -l InstallESD.dmg

dmg2img v1.6.5 © vu1tur (to@vu1tur.eu.org)

InstallESD.dmg --> (partition list)

partition 0: Driver Descriptor Map (DDM : 0)
partition 1:  (Apple_Free : 1)
partition 2: Apple (Apple_partition_map : 2)
partition 3: Macintosh (Apple_Driver_ATAPI : 3)
partition 4:  (Apple_Free : 4)
partition 5: disk image (Apple_HFS : 5)  « data partition
partition 6:  (Apple_Free : 6)

 

You need only the HFS+ data partition ;) don't extract the other partitions.



#5
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

dmg2img converts the zlib-compressed DMG to a raw image file. USBit is used to rawrite the image on the stick,

then you need to mark partition active, install bootsector with

dd if=boot0 bs=440 count=1 of=/dev/sdX

where X is your USB device. Then force a HFS+ mount and copy boot (use the ZIP folder) to the root of the partition.

While mounted you can also copy the kexts into /System/Library/Extensions/ folder.

Search for a guide to force a RW mount.

 

hint:

Okay so for partitioning, can I use something like GParted? If not or if so, what should be the specs of the partition (like what type is it and all) and for compilation I just do make clean and make right?



#6
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

Okay so for partitioning, can I use something like GParted? If not or if so, what should be the specs of the partition (like what type is it and all) and for compilation I just do make clean and make right?

I did no partitioning, the raw image already includes the hfs+ partition info.

 

If you want to write the raw image to a partition make byte-size exactly match the raw image size!

I prefer cfdisk to create an active partition type AF (=Apple Filesystem).



#7
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

I did no partitioning, the raw image already includes the hfs+ partition info.

 

Okay I think I'm starting to get the picture here:

 

1. I use the flash drive formatted to any FS (atm its FAT32)

2. I use dmg2img to convert the dmg to a pre-partitioned HFS+ image

3. I write the now converted image to the USB with USBit (how do I do that?)

4. I mount the flash drive using some hfplus program in Ubuntu

5. I compile and move the chameleon binary files to the root of the flash drive.

 

Here's a couple of other questions:

1. After reading on the instructions on how to compile, I read that it would have other folders. Which folder would have the binary files or what would be the binary files' name?

2. Should I disable journaling or should I try to mount it as it is journaled?



#8
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

Okay I think I'm starting to get the picture here:

 

1. I use the flash drive formatted to any FS (atm its FAT32)

2. I use dmg2img to convert the dmg to a pre-partitioned HFS+ image

3. I write the now converted image to the USB with USBit (how do I do that?)

4. I mount the flash drive using some hfplus program in Ubuntu

5. I compile and move the chameleon binary files to the root of the flash drive.

 

Here's a couple of other questions:

1. After reading on the instructions on how to compile, I read that it would have other folders. Which folder would have the binary files or what would be the binary files' name?

2. Should I disable journaling or should I try to mount it as it is journaled?

$>dmg2img -p 5 InstallESD.dmg InstallESD.img

dmg2img v1.6.5 (c) vu1tur (to@vu1tur.eu.org)

InstallESD.dmg --> InstallESD.img


decompressing:
opening partition 5 ...             100.00%  ok

Archive successfully decompressed as InstallESD.img

$>dir
 
15.10.2013  16:05    <DIR>          .
15.10.2013  16:05    <DIR>          ..
02.08.2011  13:22     3 743 009 943 InstallESD.dmg
15.10.2013  16:06     4 175 548 416 InstallESD.img

I'd not compile it, you can use the binaries from insanelymac downloads section.

You can even mount the raw image as a loopback device in linux.



#9
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

I'd not compile it, you can use the binaries from insanelymac downloads section

 

Okay a couple of other things (sorry if its starting to get annoying):

1. What version of Ubuntu did you use to mount the HFS+ partitions?

2. Did you have to disable journalling or not?

3. Can you verify if these guides might work in case thinks get sticky or give any troubleshooting tips just in case things go wrong?

   

Guides:

http://ubuntuforums....d.php?t=1420673 - the guys from here modified a hack that disabled journalling by adding 2 lines of code. (PS: How do I compile it?)

http://askubuntu.com...ut-access-to-os - this one's for functional drives.



#10
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

Okay a couple of other things (sorry if its starting to get annoying):

1. What version of Ubuntu did you use to mount the HFS+ partitions?

>>> 13.04 (latest)

2. Did you have to disable journalling or not?

>>> no, search for a guide howto force-mount journaled HFS+ RW

3. Can you verify if these guides might work in case thinks get sticky or give any troubleshooting tips just in case things go wrong?

>>> the guides work, as stated I did it several times but it will make a difference using Snow Leopard or Lion which has a BaseSystem.dmg

 

Journaling is not required for install boot.

   

Guides:

http://ubuntuforums....d.php?t=1420673 - the guys from here modified a hack that disabled journalling by adding 2 lines of code. (PS: How do I compile it?)

http://askubuntu.com...ut-access-to-os - this one's for functional drives.



#11
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem

Thanks Felix! I'll try it out first thing in the morning.


Just to clarify one last thing. To write the created image file from dmg2img using USBit I use the "Recover" button. I just think this thread could be a tutorial. :D



#12
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

Thanks Felix! I'll try it out first thing in the morning.


Just to clarify one last thing. To write the created image file from dmg2img using USBit I use the "Recover" button. I just think this thread could be a tutorial. :D

usbit.jpg

 

Yes, 'Restore' button in 'Device Mode'.



#13
TNTS

TNTS

    InsanelyMac Protégé

  • Members
  • Pip
  • 30 posts
  • Gender:Male
  • Interests:Apple devices
    Mac OS X
    Linux
    Windows
    Eminem
I promise, this'll be the last:

Can I do it under a vm?

#14
DirectXtraOrdinary

DirectXtraOrdinary

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 317 posts
  • Gender:Male
  • Location:Mödling, Austria

I promise, this'll be the last:

Can I do it under a vm?

for sure :D







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy