Giter Site home page Giter Site logo

gesellix / pi-init2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bytemarkhosting/pi-init2

3.0 3.0 0.0 25 KB

Set up a Raspberry Pi and manage any of its configuration just from the /boot partition

License: MIT License

Shell 22.95% Go 77.05%

pi-init2's Introduction

Raspberry Pi Pre Init

Purpose

A program which lets you set up a Raspberry Pi solely by writing to the /boot partition (i.e. the one you can write from most computers!).

This allows you to distribute a small .zip file to set up a Raspberry Pi to do anything. You tell the user to unzip it over the top of the Pi's boot partition - the system can set itself up perfectly on the first boot.

Additionally, once a Raspberry Pi has been set up using pi-init2, files under the appliance base directory are symlinked back to the /boot, allowing you to reliably edit those "user-serviceable" files from the computer in future. So e.g. the list of wireless networks and passwords, or other files specific to the kind of appliance you're building.

Trying it out

The Raspberry Pi should now boot several times. The first boot takes 2-5 minutes depending on your network, and which model of Raspberry Pi you use (I tested with model 3).

By default the following changes will be applied:

  • SSH will be enabled by adding the /boot/ssh file.
  • The hostname will be set to the content of /boot/hostname.
  • If GitHub is reachable, SSH keys will be downloaded and saved in /home/pi/.ssh/authorized_keys, and password authentication will be disabled.

Beware: You'll need to edit the pi-install script to use your GitHub username (or remove that part completely)!

Building pi-init2

You'll find a script called '/build-and-copy' which you can use from a Linux or MacOS to build the pi-init2 program, copy all the appliance files into place, and unmount the card.

Disclaimer/Credits

Credits go to the following projects:

  • pi-init2: This project is actually a fork of pi-init2, but heavily modified and stripped down to my needs. That's why the binary is still named pi-init2, so that its origin won't be forgotten.
  • raspbian-boot-setup: Another project with a similar technique.
  • PiBakery: A good resource to find more blocks to setup your Raspberry Pi.

Any contributions appreciated!

pi-init2's People

Contributors

cdn avatar gesellix avatar ivuk avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.