Jump to content

1 Screenshot

About This File

https://youtu.be/zOB8-Z7_1Og

#!/bin/bash

# Menu

clear
utilisateur=`users`
echo "" Hi, $utilisateur
echo ""
echo "  ?" "Création de votre clef usb - Creating your Flash Drive ?"
echo ""

# Monter l'installateur
echo "Sur quel Support?"
echo ""
echo "Glissez votre Support dans la fenêtre terminal"
echo ""
echo "On what media want to install?"
echo ""
echo "Drag and Drop your Flash Drive"
read support
echo ""
echo "Glissez l'installer OS X dans la fenetre Terminal"
echo ""
echo "Drag and Drop your installer osx"
read installer
hdiutil attach "$installer"/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

# Creation d'une image temporaire of 7316mb
hdiutil create -o /tmp/Osx -size 7316m -layout SPUD -fs HFS+J -type SPARSE

# Monter l'image temporaire
hdiutil attach /tmp/Osx.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Restorer Base System dans l'image temporaire
asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase

# Installation des fichiers
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/

# Copie des dépendances d'installation
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg

# Restoration de l'image Systeme sur la clef Usb
sudo asr restore -source /Volumes/OS\ X\ Base\ System/ -target "$support" -erase


# Démonter l'Installateur
hdiutil detach /Volumes/install_app

# Démonter l'image  Base Système
hdiutil detach /Volumes/OS\ X\ Base\ System/


# Effacer l'image Temporaire
 rm -f /tmp/Osx.sparseimage

diskutil rename /Volumes/OS\ X\ Base\ System\ 1 OSX\ Flash\ Drive


What's New in Version 1.0   See changelog

Released

No changelog available for this version.

  • Like 1
 Share


User Feedback

Recommended Comments

thanks for this stuff. Please rename file so that we can know which release it's ;)

I'll look into it

Link to comment
Share on other sites

hello, great stuff, 

 

a little news:  using this today with 10.12.3 and clover 3994 had a crash. or the Terminal disappeared and never came back.

 

what step:  to erase the USB stick.  

 

after drag and drop of both USB and OS to install.  Then restores, then new window pops up with and then Terminal asks to erase Pencil Stick.  Well after answering "y" the Terminal did what it normally does then disappeared.  Flash Drive Maker disappeared and so did the USB.  

 

What could be the problem here?  I looked in Console, no answers.  How strange.

 

However, I will try to replicate the problem and debug.

 

Mak

Link to comment
Share on other sites

changed the steps to do this.

 

First, erased the previous installer, with Disk Utility and the did the whole process.

 

working fine.

 

Must have been a hiccup after updating to 10.12.3.

 

just finished restoring and verifying to USB.  

 

 

Thank you

 

Mak

Link to comment
Share on other sites

×
×
  • Create New...