Sunday, November 19, 2017

Dreamcatcher SBC inital setup...and image creation.

As I experiment with th RTL portion of this board, I find that some of the software is incompatible with others...

So I spend a lot of time setting up from clean...then I make an image of that basic setup so I don't have to start from scratch...or so I thought.

I found out that my 'basic' image was a later version with a radio app installed.

So I made another fresh one.

Here is my process to make MY basic setup...(I use Windows)

-------------

Download Dreamcatcher Armbian image (currently Jessie linux) and write to SD card.

http://radionerds.com/index.php/DreamCatcher  This page has some instructions and documentation...and links to image downloads.

Write to SD card (I use Etcher for this)

Stick in DC (inboard card slot...not the one at the corner 'SD0_OS') and boot. If it doesn't power up when you plug in power, then press and hold the power button at corner.

You will need a USB to Ethernet adapter until your wifi is setup.

I have this one from Anker.

Figure out the IP address to the USB ethernet adapter, and use Putty to login.

At first boot, there are no accounts other than root.

Login is root  and password is 1234

It will welcome you to Outernet and direct you to change the password, then create a user and password (I didn't fill out any of the name etc stuff).

(At this point I recommend logging out, and logging back in with your newly created username for the rest of the install.   Most other install docs assume you are root, but some of the software needs to be installed by a non root user...so my docs assume you are logged in as the non root user.)

First there is a note in the RadioNerds docs that later versions of Armbian can 'brick' the device (doing an update)...I haven't noticed that yet, but here is what they recommend.  (puts the Kernal version on hold)

sudo apt-mark hold linux-dtb-next-sunxi linux-headers-next-sunxi linux-image-next-sunxi linux-firmware-image-next-sunxi

Next I do the updates.

sudo apt-get update
sudo apt-get upgrade

Now I activate and setup the WiFi.

sudo nmtui

It is pretty straight forward, you probably have to run it a few times to get it set up...you need to EDIT and ACTIVATE a connection.

At this point I reboot, with the USB to ethernet dongle disconnected, and make sure the WiFi setup is still there...sometimes it isn't...or maybe I am just impatient...

Now for me, I want a VNC and need a web browser installed (neither are on this barebones image).

For the Browser...(I used Konqueror because I couldn't get Chromium to install)

sudo apt-get install konqueror

For the VNC...

sudo apt-get install task-lxde-desktop
sudo apt-get install xfonts-base
sudo apt-get install tightvncserver

Now set up the VNC

tightvncserver

It will tell you to set a password, and shouldn't have any errors.

Now I need the VNC to start every time it boots...this is where I got the info.

Create and edit this file...

sudo sudo /etc/init.d/tightvncserver

add the following to the file (cut and paste).  Note halfway down where you ID the VNCUSER  put in the username you made, or current username on the Dreamcatcher...I only have one user, so I put that one down.

#!/bin/sh
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: vnc server
# Description:
#
### END INIT INFO
# /etc/init.d/tightvncserver
# Set the VNCUSER variable to the name of the user to start tightvncserver under
VNCUSER='YOURLOGINNAMEHERE'
case "$1" in
start)
#Change the display number below. The connection port will be 5900 + display #
su $VNCUSER -c '/usr/bin/tightvncserver :1'
echo "Starting TightVNC server for $VNCUSER"
;;
stop)
pkill Xtightvnc
echo "Tightvncserver stopped"
;;
*)
echo "Usage: /etc/init.d/tightvncserver {start|stop}"
exit 1
;;
esac
exit 0

And to save out of Nano hold the CTRL key and press o .  To exit, CTRL-x

Now set some permissions...

sudo chmod 755 /etc/init.d/tightvncserver
sudo update-rc.d tightvncserver defaults

Now test that your editing works...of course if you are already running the VNC it will tell you that, but shouldn't have any errors.

sudo /etc/init.d/tightvncserver start

Of course at this point, you should reboot and make sure everything works.

If the VNC won't start...maybe you will see a reason here...(in my case I didn't change the VNCUSER in the file above)

nano /home/{your login}/.vnc/dreamcatcher:1.log


Now I shut down the Dreamcatcher pull the SD card out, and put it in your computer.

Make a copy of the image, I use Win32DiskImager.

If you only have one flash drive plugged in, it will automatically show at the 'Device'.



Click on the folder icon and select the directory and enter name to store the new image.

Once you do that, you will see the 'Read' button is enabled...click it and in a few minutes you will have a new ready to run image.

No comments: