Three helpful tips for the 21 Bitcoin Computer

1. Connect 21 computer directly to laptop/desktop via ethernet.
Needed: a mac

If you want to avoid using the usb-serial cable and setting up wifi, there is a very easy way of getting your 21 online. This can be used for the initial setup of the device.

First, connect your 21 via ethernet to your mac. On newer macs you will need a thunderbolt to ethernet adapter. It looks like this:

Next, set up internet sharing to your 21 device. Go to Settings->Sharing and share your connection to “Thunderbolt Ethernet”, like so:

Next, you can simply ssh into your device.

To get its ip, install nmap and scan your lan for devices.

brew install nmap

sudo nmap -sn -PE 192.168.N.0/24

(N is usually 2 for the Thunderbolt bridge)

then simply connect!

ssh twenty@<ip>

2. Mount the 21 hard-drive as a volume on your Mac
Needed: 21 computer ip, a mac

In order to speed up development, it can be very helpful to have the 21 computer hard drive mounted as a volume on your system. For example, this will enable you to use Sublime/Atom to directly edit files on the 21 computer.

First, install OSXFUSE and SSHFS on your mac. They are both available here.

Then, create a mount point (can simply be a directory):

mkdir ~/mount

And then mount the 21 drive using sshfs:

sshfs twenty@ip:/ ~/mount -ovolname=21

This command mounts the root directory of the 21 device at the mount point (~/mount) as a volume named 21. You will be prompted for the password just like when using normal ssh. To mount the user folder, simply use:

sshfs twenty@ip:/home/twenty ~/mount -ovolname=21

To unmount, use:

umount -f ~/mount

3. Reset the password for any user
Needed: hdmi display, usb keyboard, ability to mount nano-sd card on your computer.

I originally thought this invalidated the device for use on 21’s network, but upon further review, it turns out that the following steps should work if followed properly. Just don’t mess anything up as root.

If you have accidentally forgotten the password for the twenty user, it’s very possible to reset any password on the 21 computer (the process is identical for other Raspberry Pi’s).

First, we are going to use the device in standalone mode. This requires you to connect a usb keyboard and the HDMI out port to a display.

Before starting the computer in standalone mode, mount the nano-sd card on a non-21 computer (you might need a nano-sd usb reader).

You should now have a volume called boot available on your computer. We want to force the 21 computer to give shell access on startup. To do this, simply edit the cmdline.txt file, like so:

sudo nano /Volumes/boot/cmdline.txt

and add:


to the end of the file and save. This will start the /bin/sh shell automatically at startup, bypassing the login.

Reinsert the nano-sd into the 21 computer and start the it (with a keyboard and display connected). After startup, you should have root access. Try typing whoami and pressing enter.

The next step is to change the password for the twenty user. To do this, you need to mount / with read write privileges, and then do a standard passwd.

mount -rw -o remount /
passwd twenty

Lastly, shut down the 21 computer, mount the nano-sd on your non-21 computer, remove the init=/bin/sh line, reinsert the nano-sd, and start your 21 computer normally.

Happy coding!

Show your support

Clapping shows how much you appreciated Axel Ericsson’s story.