Raspberry Pis

· About

I love them

why pi #

I currently use Pis for:

install Raspberry Pi OS #

Raspberry Pi Imager #

Use the Raspberry Pi Imager tool if you can:

plug in your sd card reader, you should see empty mount points appear:

$ lsblk
sda                   8:0    1     0B  0 disk
sdb                   8:16   1     0B  0 disk
sdc                   8:32   1     0B  0 disk
sdd                   8:48   1     0B  0 disk

As soon as you insert your SD card, you should immediately see the storage appear under one of these mount points:

$ lsblk
...
sda                 8:0    1  29.7G  0 disk
├─sda1              8:1    1  42.9M  0 part
└─sda2              8:2    1  29.7G  0 part

You should now be able to run the Raspberry Pi Imager

NixOS has the rpi-imager tool available, so you don't have to download anything:

nix-shell -p rpi-imager

But currently I'm having a hard time using this tool on NixOS because that tool needs super access, and as soon as it's run with sudo, it crashes

browser #

I had to edit /etc/resolv.conf because of slow loading times, I appended the following to the file:

# my options
options timeout:1 attempts:5

go #

I had to build go from source, as the version of go that comes with the raspian distro is not compatible with megacmd

scanner #

problems with sane and detecting a USB scanner

i had to go to /dev/bus and

chmod -R 777 usb

after that the scanner was detected by scanimage -L

sound #

ALSA should already be pre-installed, use that - not pulseaudio.

[[MPlayer]] will use the default libavcodec to play mp3 files - which is fine. It will complain however that it can't find the mpg123 codec files to play. Install the packages libmpg123-0 (and maybe mpg123?) and then edit the ~/.mplayer/config file to include:

afm=mp3lib

The pi can either output audio via the hdmi cable or the standard analogue audio jack. Use the below command to switch between hdmi/analogue:

Substituting for the desired mode: 0=auto, 1=headphones, 2=hdmi. For example, to force the Raspberry Pi to use the analog output:

sudo amixer cset numid=3 1

port forwarding #

You can use port forwarding on the router to forward a high port number to the ssh port of a pi on my local network.

e.g. 80.111.144.159:10000 -> 192.168.1.100:22

to generate this high port number, you can multiply the final octet of the local static ip address by the power of 2

e.g. if the local 192.168.1.100, the port number used for forwarding will be: 100^2 = 10000

see also #