[Posts] Raspberry Pi 4b mounted tutorial ubuntu-18.04.3 (2019.8.17)

Raspberry Pi 4b mounted tutorial ubuntu-18.04.3 (2019.8.17)

HTTPS: // www.jianshu.com/p/8e9dfac49670 

evening to try.

 

The latest version of Raspberry Pi 4b released the end of June, only official Raspbian-Buster support systems, other systems are only to support Raspberry Pi 3b +, which is very inconvenient for the players Raspberry Pi 4b, so the following will teach you how to modify the configuration file, so that it is possible to run on ubuntu raspberry Pi 4b.

First, install

As used herein, 32G memory card is installed ubuntu-18.04.3-preinstalled-server-armhf + raspi3 system, 32-bit system, there will be 64-bit system memory limit after installation, it is not to install.

Download image, select ubuntu-18.04.3-preinstalled-server- armhf + raspi3.img.xz mirrored download
download the image from the official: https://wiki.ubuntu.com/ARM/RaspberryPi
or download from here:  HTTP: //cdimage.ubuntu.com/releases/18.04/release/

Download from the official Raspberry Pi 4b of Boot boot: https://github.com/raspberrypi/firmware

These documents have been uploaded to the Baidu network disk:
Link: https://pan.baidu.com/s/1N4qG6ZZNE18GFhYcaj85hA
extraction code: x572

Tools to prepare:

8G is greater than the memory card
Win32DiskImager
Ubuntu-18.04.3-preinstalled-Server-armhf + raspi3.img
firmware-master.zip

First Place the downloaded image with Win32DiskImager ready to burn inside the U disk, with other burning software can be.

 

 
image.png

After burning is complete, open U disk, delete all the files inside, and then get in extracting from firmware-master.zip copy all the files inside the folder to Boot U disk inside, so Raspberry Pi 3b + files are the boot raspberry Pi 4b replace the boot file,
replacing the former:

 

 
image.png

After replacement

 

 
image.png

U created in the root directory of the two files (cmdline.txt and config.txt), respectively, and copy the contents written to the file and save it, or you can copy to the U disk after Baidu network disk already written file download Root directory.
Creating cmdline.txt, copy the following contents into a file and save inside

dwc_otg.fiq_fix_enable=2 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rootflags=noload net.ifnames=0

Creating config.txt, copy the following contents into a file and save inside

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[Pi4]

[all]

At the same time, remember to create an empty file, renamed SSH (do not have the file extension .txt), into the root directory of U, open SSH remote login, if after installation can not enter the system, it does not matter, you can use Telnet.

So far, you can insert the memory card into your Raspberry Pi 4b, start the system, first start a long time, takes 2-3 minutes, please be patient.

The default username and password are: ubuntu

Other details can refer to Source: https://jamesachambers.com/raspberry-pi-ubuntu-server-18-04-2-installation-guide/

Second, change the source

First implementation of what sudo apt-get update to see if successful, if successful, wait for the update to complete, will not be too long, can determine the configuration of the normal update on the implementation of what steps to change source

sudo nano /etc/apt/sources.list

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic main restricted
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates main restricted
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic universe
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates universe
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security main restricted
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security main restricted
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security universe
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

Remember to update it after the change source

sudo apt update
sudo apt upgrade

If the installation of the update error: dpkg returned an error code (1 )
Execute the following statement
into the directory

cd /var/lib/dpkg

Delete Files

sudo mv info info.baksudo

Re-create, to solve this problem errors

sudo mkdir info

And then re-execute the above update

It must ensure that the replacement source is correct, can not do without, otherwise the problem can not find the installation package will appear Oh, Xiao Bian little before replacement is the source of one, so the installation software will not find the appropriate installation package
when installing the desktop, there will be problem dependent, install aptitude, with aptitude can automatically install the missing dependencies

sudo apt-get install aptitude

Like desktop can install the official recommendation of the desktop, you can install one of the following three:

sudo aptitude install xubuntu-desktop
sudo aptitude install lubuntu-desktop
sudo aptitude install kubuntu-desktop

Third, the use xrdp Remote Desktop Connection

sudo apt-get install tightvncserver xrdp

After installation, the following instruction


echo xfce4-session >~/.xsession

Xfce4-session will be written to the file .xsession

Modify /etc/xrdp/startwm.sh file

sudo nano /etc/xrdp/startwm.sh

In the / etc / X11 / Xsession upper added xfce4-session

 

 
image.png

Modify the configuration file / etc / X11 / Xsession

sudo nano /etc/X11/Xsession

Add xfce4-session at the top of the file

 
image.png

Restart the service xrdp

sudo service xrdp restart

Then we can use the Windows mstsc logged in, the interface is as follows

 
image.png
 
image.png
 
image.png

Guess you like

Origin www.cnblogs.com/jinanxiaolaohu/p/12433816.html