📜 ⬆️ ⬇️

Offline installation of OS X, without OS X

Fasting is no longer as relevant as it could have been a couple of days ago, but still better late than never. And so, under the cut, the story of how I decided to upgrade to OS X Mavericks, and in the end it took me 18 hours.
The post is not designed for OS X gurus, but for ordinary users who have had problems installing the axis and cannot continue its installation.

Well, let's go:



Thursday, October 22 (date of the release of OS X Mavericks). I download it for free from the AppStore and without making any backups I plan to update my downloaded a year ago from torrents for free OS X Mountain Lion, which was put on top of OS X Lion without any questions.
')
In general, the OS is downloaded, I proceed to the installation. I clicked on its icon, answered a couple of questions, and the computer restarts. Then the axis logo appears, and it says that 40 minutes are left, and the progressbar begins to move along quietly. I'm already starting to think about what to do while the reinstallation is going on, as a message pops up saying that my disk is damaged and cannot be fixed, it is necessary to make a backup of the data and resume the installation.

Then I remember that when I installed OS X Mountain Lion, I had something like that, I go to the disk utility, select Macintosh HD and I want to poke the “Repair Disk” button, but it is inactive, then I click “Check Disk” -> goes The verification process, after which some errors are written to me, “Something there with some links, or they are named wrong, or the creation date is not the same”, in general, having run the error, did not find anything. Then somehow I made sure that the “Repair disk” button became active, I click, but it says that I cannot restore the disk, and I need to format it after making a backup (selected for those who do not see that I wrote it, and for some reason it minus post with karma) .

Well, I think you need to make a backup of important information, and think about what to do next. I start the Windows installed as the second OS, and make a backup on the BOOTCAMP disk trying to find the most important 500 GB of information on Macintosh HD to put on the remaining 30 GB on the BOOTCAMP disk. Along the way, I come across the OS X install Data folder in the root of the disk, I go in and see the following structure:

(Screenshot made now, because then I did not think about writing an article)
Well, I think it is necessary to back up this daddy, after formatting the disk, the OS installer will also be removed. (By the way, the key moment of the story)

In general, the backup is made. I decide to make the last attempt to set the axis in the usual way, but again the same error. I go into the disk utility, trying to format the disk. But it does not work. Since it is used. I reboot the laptop, clamp cmd + r and enter recovery mode, and then I can format it through the disk utility.

I reboot into Windows, trying to copy a previously saved OS X install Data daddy to the root of a formatted disk, but I cannot; Apparently Windows does not know how to work on recording with a Makovsky disk.

I remember that you can restore the old OS X Mountain Lion, and from there I plan to start installing Mavericks again.

But even then failure awaits me, as I mentioned Mountain Lion was downloaded from torrents, and when I restored it, I was asked to enter my Apple ID, and then said that I could not do it because I do not have this axis listed. Regretting that I regretted $ 20 (or how many there) a year ago, I think about the option of creating a bootable flash drive.

Googling realized that it was not so easy to do it, and in all the manuals the folder structure was not at all the same as mine (because I already started the installation and something changed there).

But I decided to try to restore the image of InastallESD.dmg to a USB flash drive. But somehow it did not work out.

Well, then you need to download it again, and do everything on manuals. I start to look, and since she just came out today, I do not find more than one good result, because rutreker blocked torrents, due to the fact that it can be downloaded for free. It remains to choose: download Mountain Lion or the dev version of the Mavericks. I decide to download the same image that I put on Mountain Lion a year ago. Downloading trying to make a flash drive, and again a failure (either I didn’t want to write or write, but the computer didn’t see what could be installed from there) apparently because of the fact that to create a flash drive you need to perform some operations with files inside the image. I decide to download a couple more versions of the OS: just Lion and the dev version of Mavericks. Along the way, google as possible using Windows to edit DMG.

It turned out that UltraISO and TransMac can help me with this. I shake. And indeed TransMac allows you to write and read flash drives in MAC format. And UltraISO allows you to view dmg files. I begin to compare the structure of the downloaded Mountain Lion with the saved OS X install Data folder and the structure described in the manuals for creating bootable flash drives.

Brief instruction from the manual:

  • Unpack the Mavericks installer in the "Programs" folder. Right click select "Show package contents".
  • In this window, open the folder "Contents", then "Shared Support", where we find the file InstallESD.dmg. We mount his image
    and open.
  • Here we find the BaseSystem.dmg file, mount it.
  • It is time to move to writing data to the drive. In the "Disk utility" select the image BaseSystem.dmg and go
    on the "Restore" tab.
  • As a source, leave the BaseSystem.dmg file, and in the "Assignment" field, drag the external drive. Then
    Click "Restore".
  • Stayed last step. We find the recovered drive in the Finder, then go to the “System” folder, section
    "Installation", from where we delete the Packages file.
  • Open the image of OS X Install ESD in Finder, where again in the "Installation" section we find the Packages folder
    (Installation Packages). Drag it into the directory from which we deleted the file in the previous step.
  • All is ready. Remove the disk, then restart the computer while holding down the Option key (Alt).


And here I understand that the only file that I need I have, that is, InastallESD.dmg, it just needs to be opened and some frauds done. With the help of UltraISO I open InastallESD.dmg I find BaseSystem.dmg there I take it out, and write it down using a TransMac to a USB flash drive. (I didn’t replace the Packages folder because there would be a little more crap added there and I just had to see if I could download my MacBook to boot from the USB flash drive), but the Mac didn’t see it, I decided to try to burn the image using the disk utility in recovery mode , so surely, but along the way I find this article on Habré, after reading I realized that I only need the Packages folder which is located in InstallESD.dmg which I can get using UltraISO, and I also find out that in addition to the disk utility and browser, I can also use the terminal which I thought all this time that is unavailable.

In general, I do everything described there and at the very last step
installer -pkg /Volumes/usb-osx/Packages/OSInstall.mpkg -target /Volumes/macHD 

Which starts the installation of os x from the console gives me an error the meaning of which is that the installation from the console is not available for my version.

Well, I think figs with it, google can I deploy a dmg image from the console and it turns out that it is possible. Then I finally solve the problem by doing what is said in the manual but from the console.
Mount the installESD.dmg image.
 hdiutil mount "/Volumes/BOOTCAMP/OS X Install Data/installESD.dmg" 


Then mount BaseSystem.dmg which is inside the newly installed installESD.dmg:
 hdiutil mount "/Volumes/OS X Install ESD/BaseSystem.dmg" 


Now I moved to the disk utility (for reliability, although I think I could also do it through the command line)
And restored BaseSystem.dmg to a USB flash drive. Pre-formatted with these settings in Disk Utility-> Disk Partition


After that, I decided to check whether it is possible to boot from a flash drive, and my joy knew no bounds:

It remains to go back to the terminal, where the flash drive is already available at "/ Volumes / OS X Base System 1" and deal with the Packeges folder
We write:
 rm "/Volumes/OS X Base System 1/System/Installation/Packages" 

Thereby removing link to Packages
Further:
 cp -R "/Volumes/OS X Install ESD/Packages/" "/Volumes/OS X Base System 1/System/Installation/Packages/" 

By this we insert the Packages folder instead of the link that was deleted.
Next, reboot by pressing Option (alt)
And we see a joyful screensaver

After which the installation runs like clockwork.

Source: https://habr.com/ru/post/199164/


All Articles