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

From Luky-Wiki
Jump to: navigation, search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Matrix_ip.jpg]]
+
This is quick and dirty way how to get my "Matrix Pi" operating.
  
 +
[[File: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 [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.
  
https://github.com/debian-pi/raspbian-ua-netinst/releases#raspbian-ua-netinst/raspbian-ua-netinst-latest.zip
+
==== 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]).
  
 +
==== Step 2 ====
 +
Unpack [[Media:Matrix-pi.zip|Matrix-pi.zip]] to SD card.
  
=== installer-config.txt ===
+
''Note 1:'' <code>installer-config.txt</code> is only template.
 +
 
 +
==== Step 3 ====
 +
wait for installer to do it's job
 +
 
 +
==== Step 4 ====
 +
log to newly installed raspbian system and execute:
 
<pre>
 
<pre>
hostname=
+
bash -x /boot/post-install.txt install
domainname=
 
rootpw=
 
rootfstype=btrfs
 
 
</pre>
 
</pre>
  
=== post-install.txt ===
+
==== Step 5 ====
<pre>
+
Enjoy matrix display on your monitor :o)
#!/bin/bash
 
 
 
if [ "$1" == "install" ]
 
then
 
 
 
        set -e
 
 
 
        echo "post-install - STAGE 0"
 
                dpkg-reconfigure locales
 
                dpkg-reconfigure tzdata
 
 
 
        echo "post-install - STAGE 1"
 
                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"
 
                rpi-update
 
                cp -v /boot/vmlinuz-* /boot/kernel.img
 
 
 
        echo "post-install - STAGE 3"
 
                apt-get -y install screen strace htop nload traceroute mc ddrescue rsync \
 
                        vim pydf ca-certificates lsscsi lsof collectl atop psmisc
 
 
 
        echo "post-install - STAGE 4"
 
                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"
 
        echo "  sleeping 30 seconds ..."
 
                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)