Git Product home page Git Product logo

autowrite's Introduction

AUTOWRITE

This tool was made to simplify and automate the process of flashing and validating devices (usually to make bootable media)

Autowrite currently has features for:

  • Flashing multiple devices with a specified image file (from CLI or in prompt)
  • Verifying the hash of a downloaded file
  • Validating a flash device (by hashing the image file, and the flashed disk)
  • Setting up a flashed device for use as a headless raspberry pi (wpa_supplicant.conf OR ssh on boot OR uart on boot)
  • Blacklisting dangerous devices (like sda or nvme0n1)

Guide:

Installing:

  1. Install argparse: sudo pip3 install --user argparse or whatever you want (venv)
  2. Install autowrite: git clone https://github.com/BusesCanFly/autowrite && cd ./autowrite; chmod +x autowrite.py

Usage:

usage: autowrite.py [-h] [-f IMAGE] [-d DEVICE] [-v] [--hash HASH] [-s] [-u] [-w WPA] [--rpi] [-y]

optional arguments:
  -h, --help            show this help message and exit
  -f IMAGE, --image IMAGE
                        Path to image to use
  -d DEVICE, --device DEVICE
                        Device to flash (ex/ "mmcblk0")
  -v, --validate        Validate flashed device hash
  --hash HASH           Expected hash of image file (iso, img, etc.)
  -s, --ssh             Setup headless raspi ssh
  -u, --serial          Setup headless raspi uart
  -w WPA, --wpa WPA     Path to the wpa_supplicant.conf file for headless raspi setup
  --rpi                 Same as -s -u -w
  -y, --yes             Answer yes to all prompts

Notes:

  • By default, autowrite will refuse to flash /dev/sda or /dev/nvme0n1. The blacklist is found at the top of the script, uncomment/remove/add whatever is helpful.
  • "*" is a valid answer for -d/--device or in the scripts prompt

Disclaimer:

Be careful not to overwrite any drives you don't mean to (boot, fs, etc.) I am not responsible for anything that happens.

autowrite's People

Contributors

busescanfly avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.