• Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects
No Result
View All Result
Sick Codes - Security Research, Hardware & Software Hacking, Consulting, Linux, IoT, Cloud, Embedded, Arch, Tweaks & Tips!
No Result
View All Result
Home Tutorials

How to create a macOS recovery USB installer without macOS (on Linux/Windows)

by Sick Codes
January 29, 2022
in Tutorials
3
macOS recovery image on linux

macOS recovery image on linux

If you need a macOS USB installer, but you cannot boot into macOS, you can still create one on Windows or Linux using Docker-OSX

Create a macOS virtual machine on Linux:

https://github.com/sickcodes/Docker-OSX

docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
    sickcodes/docker-osx:monterey

I would use Monterey because it can “do recovery” on Big Sur, Catalina, Mojave, etc.

This is because Monterey can perform recovery on APFS and HFS disks.

Once you’ve created a Monterey or later macOS virtual machine, you can hot plug a USB stick in:

https://github.com/sickcodes/Docker-OSX#mount-usb-drive-hotplughot-plug-usb

Pick a port, for example, port 7700.

lsusb to get vendor ID and product ID of the USB stick, for example:

Bus 003 Device 008: ID 0781:5590 SanDisk Corp. Ultra Dual

The above vendor ID is 0781

The above product ID is 5590

Now, expose your USB stick via network access using usbredir so the macOS guest can reach the USB over-the-air:

sudo usbredirserver -p 7700 0781:5590

Now, in the Docker window hit Enter to see the (qemu) console.

Then hot plug the USB stick through to the macOS virtual machine:

chardev-add socket,id=usbredirchardev1,port=7700,host=172.17.0.1

device_add usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4

The USB will appear in the macOS virtual machine and then you can create a real USB installer.

You may need to change 172.17.0.1 to your host IP, e.g. 192.168.1.x, which you can get using ip addr on linux.

And, of course, the xxxx:yyyy of your USB stick will be different, unless it’s the same USB as mine!

Next Post

QNX QOpenCD Packages

Exploit: RTLO Injection URI Spoofing: WhatsApp, iMessage (Messages app), Instagram, Facebook Messenger. CVE-2020-20093, CVE-2020-20094, CVE-2020-20095, CVE-2020-20096

CVE-2022-28345 Spoofed URL Bypass

CVE-2022-28345 - Signal client for iOS version 5.33.2 and below are vulnerable to RTLO Injection URI Spoofing using malicious URLs such as gepj.net/selif#/moc.elpmaxe which would appear as example.com/#files/ten.jpeg

Comments 3

  1. Tom says:
    7 months ago

    Once I start the OSX docker installer, how do I proceed to restoring the recovery disk on USB? Do I need to install the OSX within the docker first… or perhaps can I download the InstallAssistant.pkg and use it already within the OSX docker installer? Perhaps I can get some help before me ~dial-up finishes downloading all that 🙂

    Reply
  2. Anonymous says:
    1 year ago

    The title is misleading.

    It mentions that this guide covers the way to create a bootable MacOS USB installer *without* MacOS. And yet, the bulk of the work is done *within* MacOS.

    The fact that the used instance of MacOS runs within a virtual machine is irrelevant. Your guide still *requires* MacOS at some point to work.

    Reply
    • Sick Codes says:
      1 year ago

      Incorrect, you can plus a USB in https://github.com/sickcodes/Docker-OSX/commit/15fa5d3ef75b2df1881bf5b72f3fff6e25e6762b

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result
  • Home
  • Releases
  • Submit Vuln
  • Press
  • About
  • PGP
  • Contact
    • Contact
    • Submit Vuln
    • VDP
  • Tutorials
    • All Posts
    • Photoshop on Linux
    • macOS on Linux
  • Supporters
  • Projects

© 2017-2021 Sick.Codes

@sickcodes

@sickcodes

@sickcodes

Discord Server

sickcodes.slack.com

t.me/sickcodeschat

./contact_form