Skip to content

Instantly share code, notes, and snippets.

@davidbarkhuizen
Last active February 2, 2021 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidbarkhuizen/5454992f37ad0a6c987191c62b28290b to your computer and use it in GitHub Desktop.
Save davidbarkhuizen/5454992f37ad0a6c987191c62b28290b to your computer and use it in GitHub Desktop.
raspberry pi

Raspberry Pi

Specs

Pi 3 Model B

CPU

Aspect Spec
Arch ARM RISC ?
Instruction Size 64bit
Cores 4
Frequency 1.2GHz
Manufacturer Broadcom
Model BCM2837

Other Components

Component Spec
RAM 1GB RAM
Wifi BCM43438 wireless LAN
BT BTLE
Ethernet 100 Base
GPIO 40-pin extended
USB 4xUSB 2
Audio Out 4 Pole stereo
Video composite, HDMI

Pi 4

CPU

Aspect Spec
Arch ARM RISC ?
Instruction Size 64bit
Cores 4
Frequency 1.5GHz
Manufacturer Broadcom
Model BCM2711 Cortex-A72

Other Components

Component Spec
RAM 2GB, 4GB or 8GB LPDDR4-3200 SDRAM
Wifi 2.4 GHz and 5.0 GHz IEEE 802.11ac wireless
BT Bluetooth 5.0, BLE
Ethernet Gigabit
GPIO Raspberry Pi standard 40 pin GPIO header (fully backwards compatible with previous boards)
USB 2xUSB3, 2xUSB2.
Audio Out 4-pole stereo audio
Video 2 × micro-HDMI ports (up to 4kp60 supported), 2-lane MIPI DSI display port, 2-lane MIPI CSI camera port
Graphics OpenGL ES 3.0

Installation

Common

  1. dowload & install rpi imager from https://www.raspberrypi.org/software/
  2. use rpi imager to choose, download & copy image to SD card

Raspbian

Headless VNC Client - Replace ??? with TightVNC

The installed VNC server () is non-proprietary, and the de facto Ubuntu client (Remmina) - has authentication problems with the prop protocol. I ultimately found TightVNC to be the best VNC server option for Raspbian. (x11vnc did not seem to support headless mode well).

# uninstall RealVNC server 
$ sudo apt-get remove realvnc-vnc-server

# install TightVNC server
$ sudo apt-get install tightvncserver

# manually launch tightvncserver on a headless (display 0) machine, with resolution 800x600
$ sudo tightvncserver :0 -geometry 800x600
# follow promts to define vnc password (use for client connection)

# kill existing VNC session on display 0
$ sudo tightvncserver -kill :0

# configure TightVNC to automatically start on server boot
# 1. edit /etc/rc.local
$ sudo nano /etc/rc.local
# 2. add line
$ sudo tightvncserver :0 -geometry 800x600
# 3 reboot
$ sudo reboot -h 0

fix for disappearing menu bar (from max_g) https://www.raspberrypi.org/forums/viewtopic.php?t=191765

# assuming that VNC has been previously started with headless session 0, i.e. with display :0

# stop VNC
$ sudo tightvncserver -kill :0

# edited config file to start session with LXDE:
$ nano ~/.vnc/xstartup
# add line
lxterminal & /usr/bin/lxsession -s LXDE &
# save and exit

# reboot
$ sudo reboot -h 0

capture sd card disc image (backup)

  1. determine which device is mapped to the SD card

list block devices

$ lsblk

ubuntu: locate the device with both /system-boot & /writable

sdb           8:16   1  14.5G  0 disk 
├─sdb1        8:17   1   256M  0 part /media/david/system-boot
└─sdb2        8:18   1  14.2G  0 part /media/david/writable

  1. backup the SD card

from device /dev/sdb
to /home/xxx/image.img
with block-size of 1 MB

$ sudo dd if=/dev/sdb of=/home/xxx/image.img bs=1M progress=status

USB Boot

Raspbian

links

# update software package repo listings
$ sudo apt update
# upgrade everything to latest
$ sudo apt full-upgrade
# update rpi tools
$ sudo rpi-update
# reboot pi
$ sudo reboot -h 0

wait for system to restart, then login again

# install latest bootloader
$ sudo rpi-eeprom-update -d -a

BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Thu Sep  3 12:11:43 UTC 2020 (1599135103)
 LATEST: Thu Sep  3 12:11:43 UTC 2020 (1599135103)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000138a1
 LATEST: 000138a1

# reboot pi
$ sudo reboot -h 0

wait for system to restart, then login again

launch rpi config utility
$ sudo raspi-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment