Jump to content

Documentation


Dave Kimble

Recommended Posts

Following the suggestion that if I didn't like the documentation, I should write it myself, here is my version of what I was hoping for, (how to get started) instead of the formal definition style of a reference manual.  Please feel free to correct the errors and use it how you wish.

 

How to set up OS for development boards

 

General

This tutorial should apply to any board supported by Armbian, it uses the example of Orange Pi Prime.

 

0.  Introduction

The Prime's hardware is good, but can only work properly if the OS has all the drivers for the chips used on the board and only a few OS versions have them right. The most common faults are insufficient power (5V, 2.5A), poor or slow micro-SD cards, and CPU chip (Allwinner H5) overheating due to overclocking. The driver for the CPU chip watches the temperature and reduces the clock speed to keep temperatures in the safe zone (the lower the better, extending the board's life).

Because of the overheating problems, I recommend NOT putting your Prime in a plastic box - mount it somehow in a vertical plane, and buy a heatsink for it, the bigger the better, and run a temperature monitor (LXDE has one built in).

 

1.  Choosing the OS

In my experience, only Armbian has the right approach, so I recommend downloading your OS from http://armbian.com/download.  Your first choice is whether to have a GUI, and which desktop to use.  The "desktop" Armbian version uses XFCE, which I dislike - I MUCH prefer LXDE. So download the non-desktop ("server") version and install LXDE afterwards.  It is very hard to switch desktops from XFCE, because the login screen doesn't have an icon to choose the new desktop environment, and its a waste of electrons downloading it if you are going to use another one.

 

2.  Copy to micro-SD

Having downloaded and unzipped your image, you have to copy it to the micro-SD card.  You need Etcher to do this, (http://etcher.io/download). It will also do a verify pass for you.  You should also do a checksum check on it. If your SD card has a checksum error, it will NEVER work.

 

3.  First boot

Put the Micro-SD card in the TF slot on your new board, and the cables for ethernet, HDMI, and lastly power. After 5 seconds it will have loaded the bootloader, switched on the green LED, put something temporarily on the screen and started loading the Linux kernel. 

 

During the boot, nothing will appear on the screen for 8 seconds (while the screen driver loads), then a cursor will flash in top left of the screen for about 30 seconds (first time only, later 10 seconds), and then you will be invited to log in. The username is "root" and the password is "1234". It will then give an interesting readout of some basic values, and a CLI prompt. Congratulations, you have successfully booted !  If you get a red LED, you have messed up - either the power supply or the micro-SD card or the checksum.

 

The first thing you must now do is change the root password, and the second is to nominate the first non-root user and password. Then you can reboot:

sudo reboot now

and log in as the non-root user. As the Armbian OS download will be slightly out of date, you will then need to do:
sudo apt update
sudo apt upgrade

to get the updates since the download file was produced.

 

4.  Copying file system to USB-SATA (optional)

At this point you can plug in an empty disk drive via USB (on a powered USB hub), a 60GB SSD is sufficient for this. Remember that SSDs do not like being unplugged when they are busy, and you can't tell when that is, so DON'T DO IT.

 

The entire OS is first saved on the micro-SD card, and the boot section will always remain there, but you now have the option to copy the root filesystem to SSD for faster and safer booting:
sudo armbian-config
which offers you a menu of options, choose System, which will load a bunch more options, choose "micro-SD to USB/SATA installation".
The next questions should only offer you one option - to format /sda1 as ext4. Then it will start the copy, which is very slow and boring, and then tidy up. After this you must reboot and log in as the non-root user.

 

5.  Second boot

Other armbian-config options include setting your timezone, hostname, and making your user login compulsory.

Finally we get to install the X server and our desktop environment, in this case: LXDE (alternatives XFCE4, KDE, GNOME3, Mint, etc ...)
sudo apt install xorg lxde

The LXDE package includes the lightdm display manager package, and as part of its installation it will ask you if you want lightdm to be your current display manager instead of Armbian desktop's nodm, say yes.

 

6.  Second reboot

And now when we reboot:
sudo reboot now

it should end up in the GUI at the login screen of lightdm.  Click the icon to check that it is going to use the LXDE desktop.

Enter your username and password, and it should go to your new desktop.  The taskbar is at the bottom and is black, and the background of the desktop is dark grey - yuck. But you can right click on the taskbar and choose Panel Settings, and move the panel to the left margin (the natural place with wide screens) and change its colour. Right-clicking the desktop will give you options to choose you own colour or photo as the desktop background.

 

Hurray! Now you can start installing all your apps and fine-tuning their settings.

 

7.  Trouble-shooting

If it doesn't manage to get into the GUI desktop, it will probably go into the CLI interface instead.  This probably means an instance of the X server is not running, which can be fixed by:

startx

The keyboard shortcut Alt-f7 should switch to tty7, which is the GUI screen.  Control-Alt-f1 should switch to tty1, which is the CLI screen.


There are too many ways for this set up to go wrong to cover them all. Ask (politely) at the Armbian Forum, http://forum.armbian.com saying precisely what you did (that worked), and what you did that didn't, including screenshots, logs and exact error messages.

 

armbianmonitor -u

will produce a log of the boot process and upload it to a public webspace, so you can post that URL with your question.

 

Remember the forum helpers are unpaid, busy people, and they will expect you to have searched the documentation and forums first.

Link to comment
Share on other sites

Well done, I think you are the first I see that, I hope others will follow you. If you even like start to participate on documentation a little how to.

 

A little contradictory:

On 10/20/2018 at 3:21 AM, Dave Kimble said:

How to set up OS for Orange Pi Prime

 

General

This tutorial should apply to any board supported by Armbian.

 

  • It is often focused on your personal opinion instead enlight it in a neutral way.
  • In the first-boot, there is no information about the automatic reboot process to resize the partition.
  • The US-Keyboard setting  when you enter your new password..
  • What do you suggest if the Second-Reboot does not end in the GUI ? 
    Very basic troubleshooting like: try startx  study error messages, armbianmonitor -u

By the way, on the download page, there is a small FAQ just beside the picture https://www.armbian.com/orange-pi-prime/  

 

Beside that, I like it 

Link to comment
Share on other sites

I agree the best place for this tutorial would be on the download page(s), linked as "How to get started".

 

Another "feature" that I always do from the start is edit one of the desktop themes (for example Clearlooks-Olive) to change the active title bar colour to yellow, and text to black, and then switch to it.  All the standard themes are very wishy-washy shades of grey.  I don't know how people can manage their desktops without this, (I've been doing this since Windows 3.1). 

sudo leafpad /usr/share/themes/Clearlooks-Olive/openbox-3/themerc

window.active.title.bg: flat
window.active.title.bg.color: #ffff00

window.active.label.text.color: #000000

save and exit.  Then

Menu > Preferences > Customize Look and Feel > Window Border > Clearlooks-Olive > Close

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines