Using grc (Generic Colouriser) for RSyslog

Colorized output for RSyslog files

I started updating my Centralised RSyslog server on Raspberry Pi the other day, and one of the things I’ve been meaning to research was syntax highlighting for RSyslog logs. After a brief search online, I found grc: a great tool for seeing output of many common Unix commands and log files in a completely new, colorful and useful way.

Install grc in Raspbian (Debian/Ubuntu)

I did this in Raspbian OS:

$ sudo apt-get install grc

It brought quote a few dependencies with it, but installed fairly quickly.

grc for looking at RSyslog output

Simply run grc and tail the messages file or RSyslog file. It will look like this:

RSyslog output with grc colouriser

Looking and process listing with ps and grc

Many common commands are used, but I’ll show just the ps command highlighting for now:

ps output with colorized syntax

That’s it for today. I think this is a must-have command line tool – am really impressed!

See Also




FLIRC Raspberry Pi 4 Case

FLIRC case for Raspberry Pi 4

Alright! FLIRC case just arrived the other day so I think my Raspberry Pi 4 is finally in business!



Why FLIRC case is a Big Deal

Apparently, Raspberry Pi 4 is so powerful that CPU throttling (slowing CPU down when it’s too hot) becomes a real issue. Not that I plan to be running my Raspberry Pi 4 under constant 100% CPU load for all 4 cores, but I want this little system to be stable.

Running overheated is not healthy for most of PC components. They’re made to withstand incredible temperatures, but assume you would take precautions and ensure adequate cooling to extend their lifespan.

That’s why I figured FLIRC case should be fun. It’s made of aluminum which means heat from the RPi4 CPU is dissipated rather efficiently without help of any fans.

I think it’s a big deal because previous models of Raspberry Pi could work without overheating (I remember buying special heatsinks for Raspberry Pi 3 memory chips though), but current model is so versatile and powerful that it may need CPU to be running at full capacity to provide comfortable desktop environment.

FLIRC Raspberry Pi 4 Case

Here are some of the photos – looks pretty neat and these top and bottom plastic panels on the case are super smooth and comfortable to the touch.

Buying FLIRC case for RPi 4

I got mine from PiHut, where it runs out of stock pretty regularly. Still, the price and delivery options are quite good so I can totally recommend them.

Next Steps

I’m going to attempt Kali Linux install on this Raspberry Pi 4 – if it works it should be a great little security appliance to have on my home office network. I will post a Unix Tutorial project about this once ready.

See Also




How To: Install Go on Raspberry Pi

Screen Shot 2019-07-28 at 09.08.37.png

There’s nothing special about installing Go language on Raspberry Pi platform, apart from the fact that you will get the version of Go compiled for the platform Raspberry Pi is using – which is ARM based.

Install Go using apt-get

Simply install the golang package, expect it to bring quite a few dependencies along:

greys@becky:~ $ sudo apt-get install golang
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcgi-fast-perl libcgi-pm-perl libdate-manip-perl libdbi1 libdevel-globaldestruction-perl libdist-checkconflicts-perl libemail-date-format-perl
libexporter-tiny-perl libfcgi-perl libfile-copy-recursive-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libio-html-perl libio-multiplex-perl libio-socket-inet6-perl libio-socket-ssl-perl libipc-shareable-perl
liblist-moreutils-perl liblog-dispatch-perl liblog-log4perl-perl liblwp-mediatypes-perl libmailtools-perl libmime-lite-perl libmime-types-perl
libmodule-implementation-perl libmodule-runtime-perl libnet-cidr-perl libnet-libidn-perl libnet-server-perl libnet-smtp-ssl-perl libnet-snmp-perl
libnet-ssleay-perl libparams-classify-perl libparams-validate-perl librrd8 librrds-perl libsocket6-perl libsub-exporter-progressive-perl
libsub-name-perl libtry-tiny-perl lxkeymap munin-doc perl-openssl-defaults python-cairo python-gtk2 python-xklavier rrdtool
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
golang-1.7 golang-1.7-doc golang-1.7-go golang-1.7-src golang-doc golang-go golang-src
Suggested packages:
bzr mercurial
The following NEW packages will be installed:
golang golang-1.7 golang-1.7-doc golang-1.7-go golang-1.7-src golang-doc golang-go golang-src
0 upgraded, 8 newly installed, 0 to remove and 182 not upgraded.
Need to get 27.5 MB of archives.
After this operation, 144 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Run go to check version

greys@becky:~ $ go version
go version go1.7.4 linux/arm

Have fun!

See Also




Ordered Raspberry Pi 4!

Screen Shot 2019-06-24 at 23.54.13

Apologies for a bunch of Raspberry Pi 4 posts in a row – I was both excited about Raspberry Pi 4 platform and away from my home lab (while enjoying summer holidays in Turkey). This is probably the last update on this for the next couple of weeks.

I Finally Ordered Raspberry Pi 4 with 4GB RAM

Got the email from The Pi Hut that Raspberry Pi 4 with 4GB RAM is back in stock and ordered it immediately. Am lookiing forward to setting it up, especially in the light of news that many opportunities open up – like Kali Linux available for Raspberry now.

Raspberry Pi Beginner’s Guide

I also got the beginner’s guide book delivered yesterday – will be great to catch up on the recent developments of both hardware and software platform. I also am a strong believer in (re)organizing knowledge – so even with my 20+ years of Unix/Linux experience I still enjoy reading technical books of all levels: even a beginner level book may be useful to properly (re)learn and memorize basics of a hardware platform or software solution. One useful/interesting idea about a book is all you need to make it worth the money spent.

That’s it for today! Will be catching up on news and publishing more shortly.

See Also




4GB Raspberry Pi 4 Model is Out of Stock

raspberry-pi4-specs
Raspberry Pi 4

Wow, demand for the latest and greatest Raspberry Pi 4 is bigger than I thought! I didn’t want to order it right when Raspberry Pi 4 was announced, and will have to wait a few weeks now until all the pre-orders are fulfilled.

Why Raspberry Pi 4 Model with 4GB is Most Popular

I belive Raspberry Pi 4 with 4GB RAM is the closest yet to a fully functional desktop system: you can develop software, test and host websites, setup your own cloud systems and even play games like Minecraft with the smoothest experience.

I also think Raspberry Pi 4 is still pretty cheap, so the extra eur10-20 you will pay to get more powerful model is well worth the relatively dramatic gains from such an upgrade.

Finally, dual monitor setup with 4K resolutions is another very tempting feature of the Raspberry Pi 4 – and while it’s available on all the latest models, I think the 4GB version is most popular because users plan to run more applications and more advanced software development setups with extra memory available.

ModMyPi, the vendor I used to get everything Raspberry Pi from, has just been purchased by ThePiHut company – and their website shows Raspberry Pi 4 with 4GB out of stock. Hope this is not for long as I really want to get the latest model for some experiements in my Unix Tutorial Hardware Lab.

See Also




Why I'm Excited about Raspberry Pi 4 Release

raspberry-pi4-specs
Raspberry Pi 4 – technical improvements

Now that Raspberry Pi 4 is announced and released, first impressions and reviews are starting to appear online. I won’t be ordering it for a few weeks due to upcoming summer holidays, but will share my views about this excellent hardware upgrade.

Biggest Improvement in Raspberry Pi 4: RAM

Memory has been the most limiting factor in previous generation of Raspberry Pi devices: even highly customised and optimised operating system and desktop environment couldn’t unlock the platform’s true potential because of RAM shortage.

Graphics support required memory sharing which means you have even less than 1GB RAM available to your operating system.

USB 3.0 in Raspberry Pi 4

This is another great thing: previous Raspberry Pi models had USB 2.0 and suffered from throughput limitations (especially apparent when using USB-based gigabit network adapter).

I’ve got a few USB 3.0 HDDs and enclosures in my home office, so plan to hook them up to one of the Raspberry Pi 4 to configure it as network attached storage.

The Ethernet controller on the main SoC is connected to an external Broadcom PHY over a dedicated RGMII link, providing full throughput. USB is provided via an external VLI controller, connected over a single PCI Express Gen 2 lane, and providing a total of 4Gbps of bandwidth, shared between the four ports.

Particularly useful is the fact that Raspberry Pi 4 switches power source to USB-C, this gives more amperage to USB devices you’re plugging in.

Raspbian based on Debian 10 Buster

Even though Debian 10 is not released yet, Raspbian OS is already available as a beta download to ensure fully operational Raspberry Pi 4 setup.

Big improvement is deprecation of the old graphics drivers, bringing Mesa V3D implementation.

4K video support and dual monitors in Raspberry Pi 4

I’m already using one of my Raspberry Pi systems for log monitoring. Think it will be pretty cool to bring this setup to the next level by hooking a Raspberry Pi 4 to a large enough 4K display – this should make a perfect system for graphical dashboards and light browsing.

On the topic of browsing, there’s a 4Kp60 decoding of HEVC video on this new Raspberry Pi – should be great for most video streaming services (but not YouTube, which I think is using different codec – VP9).

These are some of the most important improvements in Raspberry Pi 4. Are you excited about some other aspects of Raspberry Pi 4 platform? Let me know!

See Also




Raspberry Pi 4: Faster CPU and 4GB RAM

Screen Shot 2019-06-24 at 23.54.13.pngRaspberry Pi 4 is available as of today, and it’s a massive step up in most aspects – should be a Linux desktop that’s quite comfortable to use (and there is indeed a Raspberry Pi Desktop kit bundling evertything you would need).

Raspberry Pi 4 Specs

  • Processor: A 1.5GHz quad-core 64-bit ARM Cortex-A72 CPU
  • RAM: 1GB with 2GB or 4GB of LPDDR4 SDRAM
  • Full-throughput Gigabit Ethernet
  • Dual-band 802.11ac wireless networking
  • Bluetooth 5.0
  • Two USB 3.0 and two USB 2.0 ports (sharing one PCI-e connection)
  • Dual monitor support with up to 4K resolution
  • VideoCore VI graphics, supporting OpenGL ES 3.x
  • 4Kp60 hardware decode of HEVC video

See Also




Upgrading Raspbian from Jessie to Stretch

raspberry-pi-logo

I noticed that it’s been a while since I upgraded my Raspberry Pi systems. I have updated Raspberry Pi firmware on all of them recently enough, but now decided to upgrade distro. Since Raspbian OS is based on Debian released, it meant I would have to upgrade Raspbian from Jessie base to Stretch.

Step 1: Update/upgrade existing distribution

This simply means we want to upgrade all existing packages before we’ll be moving to the next releast.

Refresh package info:

greys@s7:~ $ sudo apt-get update

Upgrade all the Raspbian OS packages

greys@s7:~ $ sudo apt-get upgrade
...
greys@s7:~ $ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
libcwiid1 libjs-prettify libllvm3.7 libqscintilla2-11 libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4 libruby1.9.1
libruby1.9.1-dbg libtcl8.5 libtcltk-ruby1.9.1 libtk8.5 pix-icons pix-plym-splash pixel-wallpaper ri1.9.1 ruby1.9.1 ruby1.9.1-dev
ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider supercollider-common supercollider-ide supercollider-language supercollider-supernova
tcl8.5 tk8.5
Use 'apt-get autoremove' to remove them.
Done
The following NEW packages will be installed:
bc coinor-libipopt1 colord colord-data cups cups-browsed cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers cups-ppdc
cups-server-common ghostscript libcolorhug2 libcupscgi1 libcupsmime1 libcupsppdc1 libfile-copy-recursive-perl libfontembed1 libgmime-2.6-0 libgs9
libgs9-common libgusb2 libgutenprint2 libieee1284-3 libijs-0.35 libinput-bin libinput10 libjbig2dec0 libllvm3.9 libmumps-seq-4.10.0 liboauth0
libopenjp2-7 libpam-chksshpwd libpaper-utils libpaper1 libqpdf13 libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5
libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libraw10 libsane libsane-common libsane-extras libsane-extras-common libwacom-bin
libwacom-common libwacom2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0
printer-driver-gutenprint python-cffi python-cryptography python-ply python-pycparser python3-cffi python3-cryptography python3-ply
python3-pycparser qpdf qttranslations5-l10n rpd-icons rpd-plym-splash rpd-wallpaper sane-utils ssl-cert update-inetd wolframscript
xserver-xorg-input-libinput
The following packages will be upgraded:
alacarte apt apt-utils bash bind9-host binutils bluez-firmware ca-certificates chromium-browser cpp-4.9 cron cups-bsd cups-client cups-common curl
dbus dbus-x11 debconf debconf-i18n debconf-utils e2fslibs e2fsprogs file firmware-atheros firmware-brcm80211 firmware-libertas firmware-ralink
firmware-realtek fuse g++-4.9 gcc-4.9 gcc-4.9-base gir1.2-gdkpixbuf-2.0 git git-core git-man gnupg gnupg-agent gnupg2 gpgv gpicview
gstreamer0.10-alsa gstreamer0.10-plugins-base gstreamer1.0-alsa gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good
gstreamer1.0-x gtk2-engines-pixbuf idle-python2.7 idle-python3.4 initramfs-tools isc-dhcp-client isc-dhcp-common libapt-inst1.5 libapt-pkg4.12
libarchive13 libasan1 libasound2 libasound2-data libatomic1 libaudiofile1 libavcodec56 libavformat56 libavresample2 libavutil54 libbind9-90
libblas-common libblas3 libbluray1 libc-ares2 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcaca0 libcairo-gobject2 libcairo2 libcomerr2
libcups2 libcupsfilters1 libcupsimage2 libcurl3 libcurl3-gnutls libdb5.3 libdbus-1-3 libdns-export100 libdns100 libdrm-amdgpu1 libdrm-freedreno1
libdrm-nouveau2 libdrm-radeon1 libdrm2 libdvdnav4 libegl1-mesa libelf1 libevent-2.0-5 libexpat1 libexpat1-dev libfaad2 libfcgi-perl libffi6
libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules libfm4 libfuse2 libgbm1 libgcc-4.9-dev libgcc1 libgcrypt20 libgd3
libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgfortran3 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgles1-mesa libgles2-mesa libgme0
libgnutls-deb0-28 libgnutls-openssl27 libgomp1 libgraphite2-3 libgssapi-krb5-2 libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base0.10-0
libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgudev-1.0-0 libhogweed2 libicu52 libidn11
libio-socket-ssl-perl libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90 libjasper1 libjpeg62-turbo libjs-jquery
libk5crypto3 libkrb5-3 libkrb5support0 liblapack3 liblcms2-2 libldap-2.4-2 libldb1 liblwres90 libmad0 libmagic1 libmp3lame0 libmpg123-0
libmwaw-0.3-3 libmysqlclient18 libncurses5 libncursesw5 libnettle4 libnss3 libobrender29 libobt2 libopencv-calib3d2.4 libopencv-contrib2.4
libopencv-core2.4 libopencv-features2d2.4 libopencv-flann2.4 libopencv-highgui2.4 libopencv-imgproc2.4 libopencv-legacy2.4 libopencv-ml2.4
libopencv-objdetect2.4 libopencv-video2.4 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpng12-0 libpng12-dev
libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpoppler46 libprocps3 libpython2.7 libpython2.7-minimal libpython2.7-stdlib
libpython3.4 libpython3.4-dev libpython3.4-minimal libpython3.4-stdlib libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0
librtmp1 libruby2.1 libsdl-image1.2 libsmbclient libsndfile1 libsoundtouch0 libsoup-gnome2.4-1 libsoup2.4-1 libsqlite3-0 libss2 libssh-4 libssh2-1
libssl-dev libssl-doc libssl1.0.0 libstdc++-4.9-dev libstdc++6 libswscale3 libsystemd0 libtag1-vanilla libtag1c2a libtasn1-6 libtevent0 libtiff5
libtinfo5 libtirpc1 libubsan0 libudev1 libva1 libvorbis0a libvorbisenc2 libvorbisfile3 libwayland-client0 libwayland-cursor0 libwayland-egl1-mesa
libwayland-server0 libwbclient0 libwpd-0.10-10 libx11-6 libx11-data libx11-xcb1 libxcursor1 libxfixes3 libxfont1 libxi6 libxml2 libxpm4 libxrandr2
libxslt1.1 libxtst6 libxv1 locales login lxpanel lxpanel-data man-db multiarch-support mysql-common ncurses-base ncurses-bin ncurses-term nodered
nuscratch openbox openssh-client openssh-server openssh-sftp-server openssl passwd patch pcmanfm perl perl-base perl-modules pi-bluetooth
pi-greeter piclone pigpio pipanel pishutdown pix-icons pix-plym-splash pixel-wallpaper policykit-1 poppler-utils pprompt procps python-gpiozero
python-lxml python-openssl python-picamera python-picraft python-pigpio python-werkzeug python2.7 python2.7-minimal python3-gpiozero
python3-openssl python3-picamera python3-picraft python3-pigpio python3-werkzeug python3.4 python3.4-dev python3.4-minimal raspberrypi-bootloader
raspberrypi-kernel raspberrypi-sys-mods raspberrypi-ui-mods raspi-config raspi-gpio rc-gui realvnc-vnc-server realvnc-vnc-viewer rpcbind
rpi-chromium-mods rsync ruby2.1 samba-common samba-libs sed sensible-utils sonic-pi ssh sudo systemd systemd-sysv tar tzdata udev unzip
va-driver-all wget wireless-regdb wiringpi wolfram-engine wpasupplicant x11-common xarchiver xdg-utils xserver-common xserver-xorg
xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-video-fbdev xserver-xorg-video-fbturbo
352 upgraded, 80 newly installed, 0 to remove and 0 not upgraded.
Need to get 363 MB/729 MB of archives.
After this operation, 245 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Double-check Upgrade Was Complete

If we re-run the same command, there should be no more updates pending:

greys@s7:~ $ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following packages were automatically installed and are no longer required:
libcwiid1 libjs-prettify libllvm3.7 libqscintilla2-11 libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4 libruby1.9.1
libruby1.9.1-dbg libtcl8.5 libtcltk-ruby1.9.1 libtk8.5 pix-icons pix-plym-splash pixel-wallpaper ri1.9.1 ruby1.9.1 ruby1.9.1-dev
ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider supercollider-common supercollider-ide supercollider-language supercollider-supernova
tcl8.5 tk8.5
Use 'apt-get autoremove' to remove them.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Perfect! Just a few packages to be tidied up with apt-get autoremove.

Tidy Up with apt-get autoremove

greys@s7:~ $ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libcwiid1 libjs-prettify libllvm3.7 libqscintilla2-11 libqscintilla2-l10n libqt4-network libqt4-xmlpatterns libqtwebkit4 libruby1.9.1
libruby1.9.1-dbg libtcl8.5 libtcltk-ruby1.9.1 libtk8.5 pix-icons pix-plym-splash pixel-wallpaper ri1.9.1 ruby1.9.1 ruby1.9.1-dev
ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider supercollider-common supercollider-ide supercollider-language supercollider-supernova
tcl8.5 tk8.5
0 upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
After this operation, 129 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 138805 files and directories currently installed.)
Removing supercollider (1:3.6.6~repack-2-1) ...
Removing supercollider-ide (1:3.6.6~repack-2-1) ...
Removing supercollider-language (1:3.6.6~repack-2-1) ...
Removing libcwiid1 (0.6.00+svn201-3.1) ...
Removing supercollider-common (1:3.6.6~repack-2-1) ...
Removing libjs-prettify (2013.03.04+dfsg-4) ...
Removing libllvm3.7:armhf (1:3.7-4~bpo8+1) ...
Removing libqscintilla2-11 (2.8.4+dfsg-1) ...
Removing libqscintilla2-l10n (2.8.4+dfsg-1) ...
Removing libqtwebkit4:armhf (2.3.4.dfsg-3) ...
Removing libqt4-xmlpatterns:armhf (4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1) ...
Removing libqt4-network:armhf (4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1+rpi1) ...
Removing ruby1.9.1-full (1.9.3.484-2) ...
Removing ruby1.9.1-dev (1.9.3.484-2) ...
Removing ruby1.9.3 (1.9.3.484-2) ...
Removing libruby1.9.1-dbg (1.9.3.484-2) ...
Removing libtcltk-ruby1.9.1 (1.9.3.484-2) ...
Removing tk8.5 (8.5.17-1) ...
Removing tcl8.5 (8.5.17-1) ...
Removing libtk8.5:armhf (8.5.17-1) ...
Removing pix-icons (0.8) ...
Removing pix-plym-splash (0.11) ...
Removing pixel-wallpaper (0.4) ...
Removing ri1.9.1 (1.9.3.484-2) ...
Removing ruby1.9.1-examples (1.9.3.484-2) ...
Removing supercollider-supernova (1:3.6.6~repack-2-1) ...
Removing libtcl8.5:armhf (8.5.17-1) ...
Removing ruby1.9.1 (1.9.3.484-2) ...
Removing libruby1.9.1 (1.9.3.484-2) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.5-1~bpo8+1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for ruby (1:2.1.5+deb8u2) ...

All clean now!

Step 2: Upgrade Raspbian OS to the next Release

You need to do pretty much the same steps as in previous section, but AFTER you update apt sources links to use the next Raspbian OS release.

As you know, Raspbian OS is based on Debian so it uses Debian’s naming conventions.

Meaning my old release was this:

jessie

… and next one (the one I’m upgrading to) is

stretch

Update apt sources.lst with new release name

So let’s update /etc/apt/sources.list file to reference stretch, which is the Debian release we want:

greys@s7:~ $ sudo vi /etc/apt/sources.list

edit this line:

deb http://raspbian.raspberrypi.org/raspbian/ jessie main contrib non-free rpi

so it looks like this:

deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

Refresh apt information

greys@s7:~ $ sudo apt-get update

Upgrade all the packages once again

This time they’ll be upgraded to the latest versions available for the next Raspbian OS release:

greys@s7:~ $ sudo apt-get upgrade
...
greys@s7:~ $ sudo apt dist-upgrade

That should be it. Now let’s reboot and Raspberry Pi should come back online sporting a brand new Raspbian OS release:

greys@s7:~ $ sudo shutdown -r now

Took around 1 minute for it to reboot… Then:

greys@s7:~ $ cat /etc/debian_version 
9.9

See Also




Advanced Hardware Information for Raspberry Pi

 

Screen Shot 2019-06-02 at 23.59.26.png

I’ve just learned about a really cool command for Raspbian OS, available in recent (Debian 9.0 based and later) Raspbian OS releases: pinout command shows you a visual presentation of what hardware configuration your Raspberry Pi has.

Simply type pinout, you don’t even need to use sudo. You’ll see output consisting of 3 parts that are so visual that I’ll screenshot two of them to show you exactly what to expect.

Pinout command for Rasbian OS – Raspberry Pi schematics

First part of the otuput looks really cool – it shows you the model name and the system board layout – where power and HDMI connections, where Ethernet port is and where to plug in USB:

Screen Shot 2019-06-02 at 23.57.00.png

Then you get the second part of the output, which is additional hardware info about your Raspberry Pi:

Revision : a01041
SoC : BCM2836
RAM : 1024Mb
Storage : MicroSD
USB ports : 4 (excluding power)
Ethernet ports : 1
Wi-fi : False
Bluetooth : False
Camera ports (CSI) : 1
Display ports (DSI): 1

Finally, the last part of the output of the pinout command is actually the pinouts layout for the GPIO part of Raspberry Pi plaform:

Screen Shot 2019-06-03 at 00.09.18.png

See Also




Make BIND9 named Use Only IPv4

Screen Shot 2019-05-01 at 17.41.33.pngHaving recently built a centralised log server with RSyslog on one of my Raspberry Pi systems at home office, I’m finally getting to reap the rewards: small and not so small errors get noticed and resolved at last.

Network Unreachable Resolving IPv6 in named

I notice getting lots of named errors like this:

May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-1683.awsdns-18.co.uk/A/IN': 2600
:9000:5301:5200::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-1244.awsdns-27.org/A/IN': 2600:9
000:5306:5b00::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-1683.awsdns-18.co.uk/AAAA/IN': 2
600:9000:5301:5200::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-573.awsdns-07.net/AAAA/IN': 2600
:9000:5301:c800::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-1244.awsdns-27.org/AAAA/IN': 260
0:9000:5306:5b00::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-573.awsdns-07.net/A/IN': 2600:90
00:5305:4700::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'ns-573.awsdns-07.net/AAAA/IN': 2600
:9000:5305:4700::1#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'flickr.com/DS/IN': 2001:503:231d::2
:30#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'yf2.yahoo.com/A/IN': 2406:8600:b8:f
e03::1003#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'yf1.yahoo.com/A/IN': 2406:8600:b8:f
e03::1003#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'yf2.yahoo.com/AAAA/IN': 2406:8600:b
8:fe03::1003#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'yf1.yahoo.com/AAAA/IN': 2406:8600:b
8:fe03::1003#53
May 1 16:13:04 becky named[545]: network unreachable resolving 'yahoodns.net/DS/IN': 2001:503:39c1:
:30#53

Since they all looked like IPv6 addresses, I figured IPv6 would be the explanation. Since I’m not using IPv6 yet, the logical step to resolve issues was to disable IPv6.

Switch BIND9 named to using IPv4 only

By editing the /etc/default/bind9 file, it’s very easy to enfore IPv4 ONLY mode.

Change OPTIONS line from this:

OPTIONS="-u bind"

to this:

OPTIONS="-u bind -4"

Now we just need to restart named daemon. Confusingly enough, it’s done by restarting the  service:

greys@becky:/ $ sudo systemctl restart bind9

let’s quickly confirm bind9 status:

greys@becky:/ $ sudo systemctl status bind9
● bind9.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-05-01 16:33:56 UTC; 3s ago
Docs: man:named(8)
Process: 3062 ExecStop=/usr/sbin/rndc stop (code=exited, status=0/SUCCESS)
Main PID: 3067 (named)
CGroup: /system.slice/bind9.service
└─3067 /usr/sbin/named -f -u bind -4

May 01 16:33:56 becky named[3067]: automatic empty zone: EMPTY.AS112.ARPA
May 01 16:33:56 becky named[3067]: configuring command channel from '/etc/bind/rndc.key'
May 01 16:33:56 becky named[3067]: command channel listening on 127.0.0.1#953
May 01 16:33:56 becky named[3067]: managed-keys-zone: loaded serial 788
May 01 16:33:56 becky named[3067]: zone 0.in-addr.arpa/IN: loaded serial 1
May 01 16:33:56 becky named[3067]: zone 127.in-addr.arpa/IN: loaded serial 1
May 01 16:33:56 becky named[3067]: zone localhost/IN: loaded serial 2
May 01 16:33:56 becky named[3067]: zone 255.in-addr.arpa/IN: loaded serial 1
May 01 16:33:56 becky named[3067]: all zones loaded
May 01 16:33:56 becky named[3067]: running

That’s it! Problem solved – no more IPv6 errors in named logs.

See Also