BPI-R2 new image: Basic Alpine Router Platform with Pantavisor 004 (2018-05-29)

(Alexander Sack) #1

SUPERSEDED: a new revision of this image has been posted here: http://forum.banana-pi.org/t/bpi-r2-new-image-basic-alpine-router-platform-with-wifi-accesspoint-on-pantavisor-005-2018-06-17/

Hi all,

as a working example for the bring up of our container based device management solution “pantavisor” we picked alpine as a first fun project to make a custom router stack to deliver a convenient first boot step for BPI to use Pantavisor enabled devices.

Right now it supports a basic out of the box router experience with 4 internal ports serving DHCP leases to connected devices and 1 WAN port (port 0) requesting a DHCP lease to get an outbound connection.

If you like this we can add WIFI etc. also. Let us know!

To install this alpine image, download the pre-built SD images and install them on your SD-Card (i know that this might be slow from china mainland, so would be nice if someone could mirror these; happy to add more links):

Once up you can ssh in with credentials: root / pantacor

To conveniently find your device through MDNS on your local network we recommend using “pvr” tool. Please first download and install:

With pvr you can scan for BPI-R2 running this images after bootup as long as you connect it to through the WAN port to your local network. Once connected , the WAN interface will try to use DHCP to acquire a lease; LAN ports 1-5 will serve DHCP leases for internal computers).

For example:

$ pvr scan
Scanning ...
        ID: 5b0cf52979b74d0009a7175e (unclaimed)
        Host: linux.local.
        IPv4: []
        IPv6: [2a02:2028:708:3d01:602:a2ff:feb3:d4e8]
        Port: 22
        Claim Cmd: pvr claim -c brightly-immense-bat https://api.pantahub.com:443/devices/5b0cf52979b74d0009a7175e

Now simply use ssh to log in your device like below:

# username: root / password: pantacor
$ ssh -lroot
root@'s password:
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.


At this point: Enjoy our basic Alpine Router experience on your BPI-R2!

Use Pantavisor / Pantahub to update device firmware conveniently

You can use the images above in any way you like, but if you want to try out the Pantavisor way of how to roll new firmware to this device through pantahub/pantavisor, you will have to first register an account on:


Once you are done, you can use the above pvr claim command to claim a device (make it so that your account gets the power to manage it):

pvr claim -c brightly-immense-bat https://api.pantahub.com:443/devices/5b0cf52979b74d0009a7175e

After you have claimed it, the device will upload its firmware to a private repo on pantahub and then you can use the following flow to update kernel, modules, firmware and rootfs with just one command: pvr.

First get the clone URL of your device with pvr scan:

$ pvr scan
Scanning ...
        ID: 5b0aa4363c6f7200095b2566 (owned)
        Host: linux.local.
        IPv4: []
        IPv6: [2a02:2028:733:ee01:602:a2ff:feb3:d4e8]
        Port: 22
        Pantahub WWW: https://www.pantahub.com/u/_/devices/5b0aa4363c6f7200095b2566
        PVR Clone: https://api.pantahub.com:443/trails/5b0aa4363c6f7200095b2566

Now clone the device using your login details on pantahub:

 pvr clone https://api.pantahub.com:443/trails/5b0d6f3cadf5440009a87893
*** Login (/type [R] to register) @ https://api.pantahub.com/auth (realm=pantahub services) ***
Username: xxxxyourusername
Password: *****
ea414468074ee0a [OK]
6b60eb69698bd73 [OK]
9dec3972b4d2ecb [OK]
ac3bdc91920d401 [OK]
1eb41b5e7849330 [OK]
3b97e2186be9ae3 [OK]
f483d8969eb279b [OK]

Now you can change the rootfs (replace the bpi-root.squashfs) or the kernel etc. and use pvr to post your changes to your device. Device will then try to boot into the new configuration and if it fails to get network access automatically rollback on next boot to initial version.

$ pvr commit
$ pvr post

Also, beyond full control through pvr, you can have a visual on your device in pantahub.com:


  • Alexander

BPI-R2 new image: Basic Alpine Router Platform with WIFI AccessPoint on Pantavisor 005 (2018-06-17)