3

I have problem with my macbook air 2011 11" . I had linux on this macbook but i would like to install original Mac OS. I erased original ssd disk and wanted to install mac os lion via recovery mode. There is an error. So i tried to run recovery mode(cmd + option + R) and install mac os high sierra but unfortunately there was also error that macbook cannot download required components. So I dowloaded TransMac and dmg file for Lion from this page https://support.apple.com/en-us/HT211683 and created bootable flash disk but macbook didnt recognize bootable usb disk. When i tried to create bootable usb disk via rufus with linux macbook can recognize. Do somebody know where is the problem ? Thank you very much .

4
  • What macOS version are you running?
    – Thinkr
    Commented Jun 6, 2023 at 10:59
  • none now. because I erased the entire disk
    – nikdo
    Commented Jun 6, 2023 at 11:08
  • Do you have access to another Mac?
    – Allan
    Commented Jun 6, 2023 at 14:19
  • Unfortunately no.
    – nikdo
    Commented Jun 6, 2023 at 14:34

1 Answer 1

3

Note: Links to instructions for other versions of OS X/macOS can found here.

Using Windows to create an USB flash drive OS X Lion or Mountain Lion installer requires third party software beyond just TransMac. The steps below outline one possible method for creating an USB flash drive OS X Lion or Mountain Lion installer using Windows and other free third party tools.

Note: 64 bit Windows 10 Pro version 22H2 was used to test this answer.

  1. Use Microsoft Edge (or some other web browser) to download the following installers to your Downloads folder. The file names are current as of June 8, 2023. If both 32 bit and 64 bit versions are available, the 64 bit version is given in the table.

    Product Use Installer Type
    Lion 10.7 or Mountain Lion 10.8 Free for use on Mac computers InstallMacOSX.dmg Mac Disk Image
    7-Zip Free 7z2201-x64.exe Application
    TransMac 15 day free trial tmsetup.zip Compressed (zipped) Folder
  2. Install all downloads except “Lion 10.7 or Mountain Lion 10.8”. If you wish, the installed downloads can be uninstalled from the Windows Control Panel after use.

  3. Use a 7-Zip File Manager application window to extract the InstallESD.dmg Mac disk image file from the InstallMacOSX.dmg Mac disk image file to your Downloads folder. From a File Explorer window, start by navigating to your Downloads folder. In this window, right click on the InstallMacOSX.dmg Mac disk image file, then select "7-Zip" > "Open archive". This should open a 7-Zip File Manager application window. In this window, right click on each file or folder in the order given in the table below, then select the corresponding action.

    File or Folder Action Type
    Install Mac OS X Open Folder
    InstallMacOSX.pkg Open Inside * Package File
    InstallMacOSX.pkg Open Folder
    InstallESD.dmg Copy To… Mac Disk Image File

    When finished, close the 7-Zip File Manager window.

  4. Insert a 8 GB or larger flash drive into an USB port. If prompted, you do not need to initialize the flash drive.

  5. Open the TransMac application with Administrator privileges. (In other words, right click on the TransMac icon, then choose "Run as administrator" or "More" > "Run as administrator".) In the TranMac application window, right click on the USB flash drive icon in the treeview pane, then select "Restore with Disk Image". In the "Restore Disk Image to Drive" popup , choose to "Open" the InstallESD.dmg Mac disk image file in your Downloads folder as the Disk Image to restore, then select the OK button. Next, select Yes in the "Last Warning!" popup. When finished, close the TransMac window.

  6. Eject the USB flash drive and try booting on the Mac.

    Note: Internally, the USB flash drive is using the Apple Partition Map (APM), which may prevent the flash drive from being bootable. If you can not boot from the USB flash drive, then see the section below title "How to generate a GUID Partition Table (GPT) from the Apple Partition Map (APM)".

  7. Use the File Explorer to delete the InstallESD.dmg file in your Downloads folder. If you wish, you can also delete the downloaded files. When finished, close the File Explorer window, then empty the Recycle Bin.


How to generate a GUID Partition Table (GPT) from the Apple Partition Map (APM)

  1. Use Microsoft Edge (or some other web browser) to download the following zipped file to your Downloads folder. The file name is current as of June 8, 2023.

    Product Use Installer Type
    GPT fdisk Free gdisk-windows-1.0.9.zip Compressed (zipped) Folder
  2. Copy the command sgdisk64.exe from the downloaded GPT fdisk zipped file to your Downloads folder.

  3. Insert the flash drive created by TransMac with the Apple Partition Map (APM) into an USB port. If prompted to format in a popup window, select the Cancel button.

  4. Use a 7-Zip File Manager application window to view the Apple Partition Map (APM) stored in the InstallESD.dmg Mac disk image file. From a File Explorer window, start by navigating to your Downloads folder. In this window, right click on the InstallESD.dmg Mac disk image file, then select "7-Zip" > "Open archive" > "*". This should open a 7-Zip File Manager application window. At the time of this writing, this window appeared as shown in the image below.

    APM

    The values in "Size" column are the same for USB flash drive created from this file by TransMac. Therefore, these values can be used to determine offset and size of the partitions stored in the Apple Partition Map (APM) on the USB flash drive.

  5. Open an "Administrator: Windows PowerShell" window. (In other words, right click on the "Windows PowerShell" icon, then choose "Run as administrator" or "More" > "Run as administrator".) In the "Administrator: Windows PowerShell" window, take the following actions.

    • Change the current directory to be the location of your Downloads folder. If your Downloads folder is in the default location, then you can use the command given below. Otherwise, make the appropriate substitution.

      cd -d $env:userprofile\downloads
      

      Note: If necessary, the File Explorer can be used to determined the location of your Downloads folder. From the File Explorer, right click on your Downloads folder, then select Properties. When the popup titled "Downloads Properties" appears, select either the General or Location tab to view the location.

    • Set the variable bo to the offset in bytes of the 5.hfs disk image (Apple_HFS). This can be accomplished by summing the sizes of the items before the 5.hfs disk image (Apple_HFS). An example, based on the previous image, is shown below.

      $bo=512+1536+30720+2048+2048
      
    • Set the variable bs to the size in bytes of the 5.hfs disk image (Apple_HFS). An example, based on the previous image, is shown below.

      $bs=5148295168
      

      When finished, close 7-Zip File Manager window.

    • Enter the following to set the so and ss variables to the offset in sectors and size in sectors, respectively, of the 5.hfs disk image (Apple_HFS). This is also the offset and size of partition containing the volume labeled "Mac OS X Install ESD" on the flash drive.

      $so=$bo/512
      $ss=$bs/512
      

      Based on the values given in the previous image, the variables so and ss would equal 72 and 10055264, respectively.

    • Enter the following to get a list of drives.

      echo  "list disk" | diskpart
      
    • From the values in the Disk ### and Size columns, determine the number assigned to the USB flash drive. Here the number is assumed to be 1. The following sets the dn variable to 1. If the number assigned to your USB flash drive is different, then make the appropriate substitution.

      $dn=1
      
    • The following command wipes the locations where GPT and MBR data structures would normally reside on the flash drive. The volume labeled "Mac OS X Install ESD" on the flash drive will remain unchanged.

      .\sgdisk64 --zap-all "${dn}:"
      

      Note: Since the GPT and MBR data structures are being zapped, any caution, warning or error messages regarding GPT headers, partition tables or CRCs can be ignored. These messages normally occur before the wipe takes place.

    • The following command initializes the GPT and MBR data structures, then adds a HFS+ type partition to the GPT. This partition encompasses the volume labeled "Mac OS X Install ESD" on the flash drive. The volume itself will remain unchanged.

      .\sgdisk64 -a 8 -n 1:${so}:+$ss -t 1:af00 -i 1 "${dn}:"
      
    • Close the "Administrator: Windows PowerShell" window.


References

1
  • Thank you very much!
    – nikdo
    Commented Jun 11, 2023 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .