Jump to content
InsanelyMac Forum
  • Announcements

    • Allan

      Solution to create a topic or post.   04/24/2018

      Hello guys. The majority of you are having issues to create a topic or post here. This are a problem with our current theme InsanelyMac.  Now the theme will be the Default IPS. Sorry for any inconvenience.
TNTS

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

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.org/showthread.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/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os - this one's for functional drives.

Share this post


Link to post
Share on other sites

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.org/showthread.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/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os - this one's for functional drives.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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'.

Share this post


Link to post
Share on other sites

I promise, this'll be the last:

 

Can I do it under a vm?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



×