From 6c2be54cda522fd78b0639569a64e77cc5df4cdd Mon Sep 17 00:00:00 2001 From: Attila Lendvai Date: Sun, 15 Nov 2015 16:51:42 +0100 Subject: [PATCH] Update README.md --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9a12dbd..6fd6860 100644 --- a/README.md +++ b/README.md @@ -25,34 +25,35 @@ Results will be under `build/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-x86_6 To see a list of available targets, run this in the ImageBuilder dir: ```make info```. -### Setup stagesd +### Setup stages Blinking leds show which phase the extroot setup scripts are in. Consult the sources for details: [autoprovision-functions.sh](image-extras/common/root/autoprovision-functions.sh#L49). -#### Stage 1 +#### Stage 1: setup extroot At the first boot after flashing the firmware the autoprovision script will -wait for anything (!) in `/dev/sda` to show up, then erase it and set up a -`swap`, an `extroot`, and a `data`filesystem (for the remaining space), and -then reboot. +wait for anything (!) in `/dev/sda` to show up (that is >= 512M), then erase +it and set up a `swap`, an `extroot`, and a `data`filesystem (for the remaining +space), and then reboot. -#### Stage 2 +#### Stage 2: download and install some packages from the internet Once it booted into the new extroot, it will continuously attempt to install some OpenWRT packages until an internet connection is set up on the router -(either by using ssh or LuCI if you could include it in the firmware). +(either by using ssh or LuCI if you could fit it into the firmware). ### Login After flashing the firmware the router will have the standard -`192.168.1.1` IP address, and SSH will listen (in all stages) using the keys -specified in [authorized_keys](image-extras/common/etc/dropbear/authorized_keys) -(**this repo contains my own ssh public key as an example, either delete it or replace -it with yours!**). +`192.168.1.1` IP address. -By default the root passwd is initialized to a random string. If -you want to set up a password, then edit the stage 2 script: [autoprovision-stage2.sh](image-extras/common/root/autoprovision-stage2.sh#L53). +By default the root passwd is not set, so the router will start telnet with +no password. If you want to set up a password, then edit the stage 2 script: +[autoprovision-stage2.sh](image-extras/common/root/autoprovision-stage2.sh#L53). + +If a password is set, then telnet is disabled by OpenWRT and SSH will listen +using the keys specified in [authorized_keys](image-extras/common/etc/dropbear/authorized_keys). Once connected, you can read the log with `logread -f`. @@ -62,14 +63,13 @@ This is more of a template than something standalone. You most probably want to customize this script here and there; search for `CUSTOMIZE` for places of interest. -Most importantly, **set up your own public ssh key, or delete the default**. +Most importantly, **set up a password and maybe an ssh key**. -I've extracted this from a project where OpenWRT nodes auto-provision -themselves in 3 stages, but I thought it's useful enough for making it -public (stage 1: extroot setup; stage 2: install packages; stage 3: a -Python script for an app-level sync feature). +I've extracted this from a project of mine where OpenWRT nodes auto-provision +themselves in 3 stages (stage 3 was a Python script for an app-level sync feature), +but I thought it's useful enough for making it public. -At the time of writing it only supports a few `ar71xx` routers out of the box +At the time of writing it only supports a few `ar71xx` routers out of the box, but it's easy to extend it. ## Tested with