Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Latest commit

 

History

History
16 lines (13 loc) · 992 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 992 Bytes

NiceHash OS image downloader

This tool is intended to download and prepare a NiceHash OS to be used in the cloud (specially Azure), in a convenient way, usnig Alpine-based Docker container.

What does this tool do?

  • Downloads the latest NiceHash OS (RAW) disk image availabla
  • Shrinks the image to 702545408 bytes (670 MB minus 512 bytes, see below why)
  • Fixes the GPT structure (using sgdisk)
  • Converts the image to VHD (using qemu-img)
  • If loop device is available
    • Attaches the VHD image as loop device (using (losetup))
    • Mounts the second partition
    • Updates the NiceHas OS configuration file
  • Otherwise, you must mount the image and edit the configuration file yourself

Loop devices are exposed by running the container as privileged. Otherwise, you need to mount the image and edit the configuration file manually.