Installing linux on orange pi

Orange Pi. Установка ОС (Debian, Ubuntu), первоначальная настройка

Записываем на SD карту с помощью Rufus (или аналогичной), вставляем карту в OrangePI, загружаемся и авторизуемся (логин: orangepi, пароль: orangepi).

Настраиваем интернет Wi-Fi. Или через интерфейс десктоп (если установлен).

Подключаемся через Putty (мне так удобнее). Меняем китайские репозитории. Вводим:

Если установлена Debian, то меняем на:

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

deb http://security.debian.org/ bullseye-security main contrib non-free
#deb-src http://security.debian.org/ bullseye-security main contrib non-free

Если установлена Ubuntu, то меняем на:

deb http://ports.ubuntu.com/ jammy main restricted universe multiverse
#deb-src http://ports.ubuntu.com/ jammy main restricted universe multiverse

deb http://ports.ubuntu.com/ jammy-security main restricted universe multiverse
#deb-src http://ports.ubuntu.com/ jammy-security main restricted universe multiverse

deb http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse
#deb-src http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse

deb http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse
#deb-src http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse

Источник

Install Ubuntu Desktop from Official Orange Pi Website onto Orange Pi 3

According to our previous blog Install Armbian Ubuntu Desktop Nightly Built onto Orange Pi 3, Wifi module of Orange Pi 3 with Armbian nightly built for Orange Pi 3 does NOT function well. Therefore, today, we resort back to the Ubuntu Desktop distro from Orange Pi’s official website.

PART A: Install Ubuntu Desktop from Official Orange Pi Website onto Orange Pi 3

1. Download Ubuntu Desktop for Orange Pi 3 from Official Orange Pi Website

➜ orangepi tar xvf OrangePi_3_xenial_desktop_linux4.9_v1.3.img.tar.gz
OrangePi_3_xenial_desktop_linux4.9_v1.3.img
OrangePi_3_xenial_desktop_linux4.9_v1.3.img.md5sum

2. Install Orange Pi’s Official Ubuntu Desktop for Orange Pi 3

➜ orangepi sudo dd bs=4M if=OrangePi_3_xenial_desktop_linux4.9_v1.3.img of=/dev/mmcblk0 conv=fsync
[sudo] password for lvision:
950+0 records in
950+0 records out
3984588800 bytes (4.0 GB, 3.7 GiB) copied, 170.284 s, 23.4 MB/s

PART B: Boot Into Orange Pi 3, Enable SSH, Update & Upgrade, Locale Configuration, Network Configuration

Different from our previous blog Install Armbian Ubuntu Desktop With Kernel 5.0 onto Banana Pi M3, SSH service on Orange Pi’s Official Ubuntu Desktop for Orange Pi 3 is NOT enabled by default. Therefore, we’ve got to enable SSH during out FIRST boot.

Читайте также:  Linux chown все папки

1. Boot into Orange Pi 3

Overview of Official Orange Pi's Ubuntu Desktop

The overview of Official Orange Pi’s Ubuntu Desktop for Orange Pi 3 looks as:

2. Kernel Doublechecking

orangepi@OrangePi:~$ uname -r
4.9.118+
orangepi@OrangePi:~$ uname -a
Linux OrangePi 4.9.118+ #5 SMP PREEMPT Mon Apr 15 09:45:02 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
orangepi@OrangePi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

3. Enable SSH

Auto Start SSH Service After Booting

After having successfully enabled SSH, you are able to login Orange Pi 3 remotely. Well, you may still need to figure out how to:

  • setup Wifi for Orange Pi 3, which is pretty simple with Ubuntu Desktop GUI
  • further setup static IP addresses in your router for both Wifi and Wired connections

4. Update & Upgrade

orangepi@OrangePi:~$ sudo apt update
[sudo] password for orangepi:
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-updates InRelease
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-backports InRelease
Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports xenial-security InRelease
Reading package lists. Done
Building dependency tree
Reading state information. Done
All packages are up to date.
root@orangepi3:~#

Since I’ve already updated/upgraded all packages, it’ll tell you from terminal that All packages are up to date.. BTW, it seems Orange Pi is a team from TsingHua Universiity?

5. Locale Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
orangepi@OrangePi:~$ sudo dpkg-reconfigure tzdata
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = «en»,
LC_ADDRESS = «en»,
LC_MONETARY = «en»,
LC_NUMERIC = «en»,
LC_TELEPHONE = «en»,
LC_IDENTIFICATION = «en»,
LC_MEASUREMENT = «en»,
LC_CTYPE = «en_CA.UTF-8»,
LC_TIME = «en»,
LC_NAME = «en»,
LANG = «en_CA.UTF-8»
are supported and installed on your system.
perl: warning: Falling back to the standard locale («C»).
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

Current default time zone: ‘America/Vancouver’
Local time is now: Wed Jun 5 09:43:12 PDT 2019.
Universal Time is now: Wed Jun 5 16:43:12 UTC 2019.

During the above process, you’ll set the following 2 pages correspondingly:

System Locale America

System Locale Vancouver

By using the command date, we can see the timezone has been successfully reset.

orangepi@OrangePi:~# date
Wed Jun 5 12:05:40 PDT 2019

6. Network Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
orangepi@OrangePi:~$ ip -c address
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 36:c9:e3:f1:b8:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.78/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2001:569:7e6d:1b00:4cbf:8fff:88e0:e68c/64 scope global temporary dynamic
valid_lft 7488sec preferred_lft 7188sec
inet6 2001:569:7e6d:1b00:c145:4c18:8c39:e90a/64 scope global mngtmpaddr noprefixroute dynamic
valid_lft 7488sec preferred_lft 7188sec
inet6 fe80::5ca:d7da:797:33af/64 scope link
valid_lft forever preferred_lft forever
3: tunl0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1
link/ipip 0.0.0.0 brd 0.0.0.0
4: gre0@NONE: mtu 1476 qdisc noop state DOWN group default qlen 1
link/gre 0.0.0.0 brd 0.0.0.0
5: gretap0@NONE: mtu 1462 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
6: ip_vti0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1
link/ipip 0.0.0.0 brd 0.0.0.0
7: ip6_vti0@NONE: mtu 1500 qdisc noop state DOWN group default qlen 1
link/tunnel6 :: brd ::
8: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1
link/sit 0.0.0.0 brd 0.0.0.0
9: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1
link/tunnel6 :: brd ::
10: wlan0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 6c:21:a2:14:cc:ce brd ff:ff:ff:ff:ff:ff
inet 192.168.1.79/24 brd 192.168.1.255 scope global dynamic wlan0
valid_lft 86384sec preferred_lft 86384sec
inet6 2001:569:7e6d:1b00:9055:86f5:5b5:82ae/64 scope global temporary dynamic
valid_lft 7488sec preferred_lft 7188sec
inet6 2001:569:7e6d:1b00:a76:2b2e:4c08:f7cd/64 scope global mngtmpaddr noprefixroute dynamic
valid_lft 7488sec preferred_lft 7188sec
inet6 fe80::200d:cbb5:fc23:f6e4/64 scope link
valid_lft forever preferred_lft forever

Читайте также:  Разработка android приложений linux

As you can see, I set up static IP address as follows:

Источник

How to install Linux on the eMMC of an Orange Pi 3 LTS

It’s impossible to buy a Raspberry Pi right now so my company is looking to the Orange Pi as an alternative. One perk is that these boards include eMMC memory so that the OS is stored on the board itself. Here’s how to install Linux to the flash memory.

Mike Szczys

How to install Linux on the eMMC of an Orange Pi 3 LTS

At Golioth, we use Hardware in the Loop (HIL) testing to validate all pull requests to the platform on the actual hardware being targeted. This means that GitHub actions are compiling and running code on the nRF9160, ESP32, and a few other platforms. It’s really slick!

Part of making this all work is a Linux box that connects GitHub actions to the actual dev boards. It’s a perfect job for a Raspberry Pi. The catch, of course, is that because of the chip shortage we haven’t been able to buy a Raspberry Pi for the last year and a half.

This weekend I spent some time validating the Orange Pi 3 LTS as a suitable alternative, and I’m quite happy with it. One of the only drawbacks I have found is that the documentation is not nearly as complete. It took me a while to find the correct command for copying Linux to the onboard eMMC flash memory:

This is command is nowhere to be found on the official wiki, and the documentation available for download includes a deprecated command that no longer works. There is also a bit more that goes into the install so I’m going to walk through the process in this tutorial.

Читайте также:  Ускорение загрузки linux mint

Download Ubuntu and Flash onto an SD Card for installation

The first step is to download an Ubuntu image and flash it onto an SD Card. We will boot the Orange Pi 3 LTS from this SD Card and then install the OS onto the eMMC storage.

  1. Go to the Orange Pi downloads page and choose Ubuntu. Download Orange Pi Ubuntu imageYou will be redirected to a Google Drive folder with several files in it. I downloaded the Orangepi3-lts_3.0.8_ubuntu_jammy_server_linux5.16.17.7z archive as I don’t need a desktop for this project. However, installation for any of these images is largely the same.
  2. Extract the .img file from the archive you just downloaded
  3. Download Balena Etcher, which is useful for flashing installation images to an SD Card Balena Etcher
  4. Select your .img file, chose your SD card, and click on flash.

I have seen mention that this SD card should be smaller than the 8GB eMMC on which we will be installing the OS. However, I haven’t verified this requirement. I happened to be using a 2GB card and it works well.

Boot in Linux and Install on the eMMC Flash Memory

Place your SD card in the slot on the bottom of the Oragne Pi 3 LTS board. Connect your monitor via HDMI and your keyboard using the USB ports. Apply power to the USB-C connector on the board.

  1. After boot, log in with username root and password orangepi Orange Pi boot screen
  2. Type nand-sata-install to begin the installation process
  3. Choose to boot from eMMC, choose EXT4 , then accept the warning that the process will erase all contents of the eMMC memory eMMC install menu
  4. After a few minutes you will be given the option to power down the board. Do so and remove the SD Card.

Installation of Linux on the eMMC is now complete

Bonus: Connecting to WiFi and fixing the DNS

At this point Linux is installed and working on the Orange Pi. You can boot the board and log in with root / orangepi . If you are using an Ethernet connection you likely already have internet working, but I only wanted to use WiFi. Let’s step through the process of setting that up.

    Add WiFi to the network interfaces

 $ sudo nano /etc/network/interfaces #Add the following to the bottom of this file: auto wlan0 iface wlan0 inet dhcp wpa-ssid your-wifi-ssid wpa-psk your-wifi-password 
 $ sudo nano /etc/resolv.conf #Add the folling to the bottom of this file: search domain.name nameserver 8.8.8.8 nameserver 1.1.1.1 nameserver 1.0.0.1 

Wrapping Up

The Orange Pi is now running from the onboard eMMC, it’s connected to your WiFi network, and it’s able to use a DNS server for domain name lookup. There is still some work to do. I recommend you add a public key for logging in over SSH and disable password-based authentication. But that’s a post for another day.

Источник

Оцените статью
Adblock
detector