Difference between revisions of "Hardware: Raspberry Pi - Matrix Pi"

From Luky-Wiki
Jump to: navigation, search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
https://github.com/debian-pi/raspbian-ua-netinst/releases#raspbian-ua-netinst/raspbian-ua-netinst-latest.zip
+
This is quick and dirty way how to get my "Matrix Pi" operating.
  
 +
[[File:Matrix_ip.jpg]]
  
=== installer-config.txt ===
+
The intent is not to provide lightweight Matrix like display but to configure my development environment. My UI is not ready yet but I want to test video output and stability under CPU load. Cmatrix is providing both, nice looking output and is using lot of CPU. In future I'll replace it with my UI ...
<pre>
 
hostname=
 
domainname=
 
rootpw=
 
rootfstype=btrfs
 
</pre>
 
 
 
=== post-install.txt ===
 
<pre>
 
#!/bin/bash
 
  
if [ "$1" == "install" ]
+
=== How to install ===
then
+
I am using [https://github.com/debian-pi/raspbian-ua-netinst/releases#raspbian-ua-netinst/raspbian-ua-netinst-latest.zip raspbian-ua-netinst] as it don't require interaction during install. Good thing is that <code>installer-config.txt</code> and <code>post-install.txt</code> are retained during re-install. I put my configuration script inside <code>post-install.txt</code> in way that installer is ignoring it but I can invoke it later after system is installed.
  
        set -e
+
==== Step 1 ====
 +
Download installer and unpack it on SD card (for details check [https://github.com/debian-pi/raspbian-ua-netinst/releases#raspbian-ua-netinst/raspbian-ua-netinst-latest.zip raspbian-ua-netinst]).
  
        echo "post-install - STAGE 0"
+
==== Step 2 ====
                dpkg-reconfigure locales
+
Unpack [[Media:Matrix-pi.zip|Matrix-pi.zip]] to SD card.
                dpkg-reconfigure tzdata
 
  
        echo "post-install - STAGE 1"
+
''Note 1:'' <code>installer-config.txt</code> is only template.
                apt-get -y install raspi-copies-and-fills raspi-config libraspberrypi-bin btrfs-tools apt-utils rpi-update
 
                btrfs subvolume create /.snapshot
 
                btrfs subvolume snapshot -r / /.snapshot/base-system/
 
  
        echo "post-install - STAGE 2"
+
==== Step 3 ====
                rpi-update
+
wait for installer to do it's job
                cp -v /boot/vmlinuz-* /boot/kernel.img
 
  
        echo "post-install - STAGE 3"
+
==== Step 4 ====
                apt-get -y install screen strace htop nload traceroute mc ddrescue rsync \
+
log to newly installed raspbian system and execute:
                        vim pydf ca-certificates lsscsi lsof collectl atop psmisc
+
<pre>
 
+
bash -x /boot/post-install.txt install
        echo "post-install - STAGE 4"
+
</pre>
                apt-get -y install git unzip python3 python-pygame
 
 
 
        echo "post-install - STAGE 5"
 
                apt-get -y install cmatrix util-linux
 
                sed -i 's/1:2345:respawn:\/sbin\/getty 38400 tty1/1:2345:respawn:\/usr\/bin\/cmatrix -lba/' /etc/inittab
 
                (
 
                        echo
 
                        echo '# disable powersave and blank to keep monitor alive'
 
                        echo '1a:2345:once:/usr/bin/setterm -blank 0 -powersave off -powerdown 0'
 
                        echo
 
                ) >> /etc/inittab
 
 
 
        echo "post-install - STAGE 6"
 
                mkfs.btrfs -f /dev/sda
 
                (
 
                        echo
 
                        echo '/dev/sda        /data/local    btrfs  defaults 0 0'
 
                        echo
 
                ) >> /etc/fstab
 
                mkdir -pv /data/local
 
                mount -v  /data/local
 
                btrfs subvolume create /data/local/.snapshot
 
 
 
        echo "post-install - STAGE 7"
 
                btrfs subvolume snapshot -r / /.snapshot/configured-system
 
  
        echo "post-install - DONE"
+
==== Step 5 ====
        echo "  sleeping 30 seconds ..."
+
Enjoy matrix display on your monitor :o)
                sleep 30
 
                shutdown -r now
 
 
 
fi
 
# EOF
 
</pre>
 

Latest revision as of 22:47, 13 February 2016

This is quick and dirty way how to get my "Matrix Pi" operating.

Matrix ip.jpg

The intent is not to provide lightweight Matrix like display but to configure my development environment. My UI is not ready yet but I want to test video output and stability under CPU load. Cmatrix is providing both, nice looking output and is using lot of CPU. In future I'll replace it with my UI ...

How to install

I am using raspbian-ua-netinst as it don't require interaction during install. Good thing is that installer-config.txt and post-install.txt are retained during re-install. I put my configuration script inside post-install.txt in way that installer is ignoring it but I can invoke it later after system is installed.

Step 1

Download installer and unpack it on SD card (for details check raspbian-ua-netinst).

Step 2

Unpack Matrix-pi.zip to SD card.

Note 1: installer-config.txt is only template.

Step 3

wait for installer to do it's job

Step 4

log to newly installed raspbian system and execute:

bash -x /boot/post-install.txt install

Step 5

Enjoy matrix display on your monitor :o)