Ansible Playbook - Xpenology USB Creator for Mac OSX


Recommended Posts

I've created an Ansible Playbook for creating an Xpenology USB.

https://github.com/stevenhrabok/ansible-xpenology-usb

 

Currently it's only written for Mac OSX. In future I may add the ability to create USB Devices in Linux if there is interest in using the tool.

 

I wrote this to help automate the workflow and make the USB drive creation process more consistent.

It also helps avoid forgetting a steps in the process.

 

Features:

  • Prompts for information
    • serial number - changed in grub.cfg
    • nic 1 mac address - changed in grub.cfg
    • bootloader/synoboot filename - used to write synoboot.img to usb
    • extra drivers filename (optional) - used to replace extra.lzma files in partition 2 of usb
    • synology pat filename - used to replace rd.gz and zImage on partition 2 of usb
  • Discovery of plugged in USB devices
    • scans for all plugged in usb drives
    • prompt for selection of usb drive to use
    • collects pid and vid of usb - changed in grub.cfg
    • formats usb drive
  • Extract files
    • extract bootloader/synoboot from zip
    • extract extra drivers from zip (when provided)
    • extract synology pat with 7zip
  • Writes synoboot.img to USB
  • Mounts USB partitions locally
  • Changes to grub.cfg and file imports
  • Prompt to make additional manual changes
    • User can modify partition 1 and partition 2 files
      • modify grub.cfg for custom settings (sataportmap, timeout, etc)
      • import other files (custom drivers, etc)
    • User can verify changes made
  • Unmount of USB partitions
  • Eject of USB drive
  • Cleanup of working directory (extracted files and folders from playbook)

 

I found there was very few guides related to OSX so hopefully this is helpful to any of the OSX users out there.
 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.