Raspberry Pi: resources


Raspberry Pi











Raspberry Pi: status

How are you today?

for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi
    echo -e "$src:\t$(vcgencmd measure_clock $src)"
for id in core sdram_c sdram_i sdram_p
    echo -e "$id:\t$(vcgencmd measure_volts $id)"
vcgencmd codec_enabled MPG2
vcgencmd codec_enabled WVC1                   

Synology: Preserve your path

After DSM update ipkg/opkg stops working.

Always remember > Trust is good – verification is better

EDIT: apply to /root/.profile as well

Use your favorite ssh-client to connect to your diskstation as root

# ssh root@your-ds
# cp /etc/profile /etc/profile.org
# vi /etc/profile

If you mess up in vi Esc:q! and start again

Find the line reading


Place the cursor under the first slash ‘/’ and press i to insert text.

Modify path according to your environment ipkg or opkg



Press Esc to go back to command mode and then press uppercase Z twice to save and close vi.

For good measure – verify the changes you made

# cat /etc/profile

Activate the path modification by sourcing profile

# source /etc/profile

During the next DSM update your profile will probably be replaced by the update process and to prevent that you can make the file readonly by doing

# chmod 0444 /etc/profile[/code]

Arch: Install using TFTP

Local pxe installation

Remember – every action by YOU is YOUR responsibility – not mine.

Recommended reading

The following is my preferences

  • and therefore might not suit you – so change what ever you like, to fit your needs.

The approach is more than average geeky, and requires a local server to serve pxe-boot and fast internet connection, but you will benefit by getting an up2date killer-installation just as you prefer it.

You need at machine to serve as TFTP server. If you have Synology NAS you are in luck.

The machine you want to install must be able to boot from the network. This is a setting in BIOS.

When booted you must select an installation mirror. It makes sense to select a mirror in your neighborhood – or at least in your country


Above mirror is Ålborg University in Denmark so this works for me.

Wait while 250MB data is fetched …

Keyboard layout

# loadkeys dk

Get disk ready

remember backup – all my files is located at network-shares so this works for me.

# sgdisk --zap-all /dev/sdc
# reboot

The terminal font can be a pain (this one lacks danish accent chars æøå) but is good on my tired eyes

# setfont Lat2-Terminus16

This one has support for above mentioned accent chars

# setfont cp865-8x16


I run from a PCIe card with mSATA disk raid so my bootdrive is not the common choice. You will need to modify according to your actual setup

# cgdisk /dev/sdc

    sdc1 type 8200 name root filesystem ext4
    sdc2 type 8302 name home filesystem ext4
    sdc3 type 8300 name boot filesystem ext2

Create filesystems and mount them

# mkfs.ext4 /dev/sdc1
# mkfs.ext4 /dev/sdc2 
# mkfs.ext2 /dev/sdc3
# mount /dev/sdc1 /mnt
# mkdir /mnt/home
# mkdir /mnt/boot
# mount /dev/sdc2 /mnt/home
# mount /dev/sdc3 /mnt/boot
# lsblk -f

Base installation

# pacman -Syy                                                 
# pacstrap /mnt base base-devel
# genfstab -U -p /mnt >> /mnt/etc/fstab
# cat /mnt/etc/fstab
# arch-chroot /mnt /bin/bash


# echo LANG=da_DK.UTF-8 > /etc/locale.conf
# echo da_DK.UTF-8 UTF-8 > /etc/locale.gen
# locale-gen                                                  
# echo KEYMAP=dk > /etc/vconsole.conf            
# echo FONT=Lat2-Terminus16 >> /etc/vconsole.conf
# ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime  
# hwclock --systohc --utc


# echo ts1 > /etc/hostname
# nano /etc/hosts         localhost.localdomain    localhost         sfinx    sfinx.uex.lan sfinx


# ip link
# ip addr


# systemctl enable            


# pacman -S gptfdisk syslinux
# syslinux-install_update -iam                      
# nano /boot/syslinux/syslinux.cfg

    LABEL arch
        APPEND root=/dev/sdc3 rw
    LABEL archfallback
        APPEND root=/dev/sdc3 rw

The raisin in the hotdog-end

# passwd                                            
# exit
# umount -R /mnt
# reboot


Beginners’ guide
Installation guide
General recommendations


XDMCP desktop over LAN

Install XDM, LightDM and a greeter

$ sudo pacman -S xorg-xdm lightdm lightdm-gtk-greeter

/etc/X11/xdm/Xaccess => remove # at beginning of line

#*                  #any host can get a login window    

/etc/X11/xdm/Xservers => insert # at beginning of line

:0 local /usr/bin/X :0

/etc/X11/xdm/xdm-config => insert ! at beginning of line

DisplayManager.requestPort: 0

/etc/lightdm/lightdm.conf => edit section [XDMCPServer]



$ su -l root
# xdm -config /etc/X11/xdm/xdm-config
# exit

Activate and start LightDM

$ sudo systemctl enable lightdm
$ sudo systemctl start lightdm

Install Xming on Windows.

I recommend the donation approach. These versions are much-much than community version.

Arch: Oracle java

Archlinux bruger som standard openJDK javamiljø og Android Studio bygger på JetBrains IntelliJ som igen fungerer bedst med Oracle Java.

Installer fra AUR med pacaur

$ pacaur -S jdk

Men man kan da også tage denne løsning:

Download JRE og JDK fra Oracle tech network

Opret mapperne {version} erstattes med den hentede version.

For Java jre-8u25-linux-x64.tar.gz indsættes 8u25 eller blot 8

$ sudo mkdir --parent /usr/lib/jvm/java-{version}-oraclejre
$ sudo mkdir --parent /usr/lib/jvm/java-{version}-oraclejdk

Udpak arkiverne

$ tar -xf ~/Downloads/jre-8u25-linux-x64.tar.gz
$ tar -xf ~/Downloads/jre-8u25-linux-x64.tar.gz

Kopier de udpakkede filer til de respektive mapper

$ sudo cp --recursive ./jre1.8.0_25/* /usr/lib/jvm/java-8-oraclejre
$ sudo cp --recursive ./jdk1.8.0_25/* /usr/lib/jvm/java-8-oraclejdk

Brug archlinux-java status for at vis aktuelle konfiguration.

$ archlinux-java status

Hvis ovenstående giver en fejlmeddelelse skal pakkerne java-runtime-common og java-environment-common installeres.

Det er pakken java-runtime-common som indeholder scriptet archlinux-java.

$ sudo pacman -Syyu java-runtime-common java-environment-common

Sæt det ønskede miljø med på denne måde

$ sudo archlinux-java set java-8-oraclejdk