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

From Luky-Wiki
Jump to: navigation, search
(Created page with "=== installer-config.txt === <pre> hostname= domainname= rootpw= rootfstype=btrfs </pre> === post-install.txt === <pre> #!/bin/bash if [ "$1" == "install" ] then se...")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
=== installer-config.txt ===
+
This is quick and dirty way how to get my "Matrix Pi" operating.
−
<pre>
 
−
hostname=
 
−
domainname=
 
−
rootpw=
 
−
rootfstype=btrfs
 
−
</pre>
 
  
−
=== post-install.txt ===
+
[[File:Matrix_ip.jpg]]
−
<pre>
 
−
#!/bin/bash
 
  
−
if [ "$1" == "install" ]
+
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 ...
−
then
 
  
−
        set -e
+
=== 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.
  
−
        echo "post-install - STAGE 0"
+
==== Step 1 ====
−
                dpkg-reconfigure locales
+
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]).
−
                dpkg-reconfigure tzdata
 
  
−
        echo "post-install - STAGE 1"
+
==== Step 2 ====
−
                apt-get -y install raspi-copies-and-fills raspi-config libraspberrypi-bin btrfs-tools apt-utils rpi-update
+
Unpack [[Media:Matrix-pi.zip|Matrix-pi.zip]] to SD card.
−
                btrfs subvolume create /.snapshot
 
−
                btrfs subvolume snapshot -r / /.snapshot/base-system/
 
  
−
        echo "post-install - STAGE 2"
+
''Note 1:'' <code>installer-config.txt</code> is only template.
−
                rpi-update
 
−
                cp -v /boot/vmlinuz-* /boot/kernel.img
 
  
−
        echo "post-install - STAGE 3"
+
==== Step 3 ====
−
                apt-get -y install screen strace htop nload traceroute mc ddrescue rsync \
+
wait for installer to do it's job
−
                        vim pydf ca-certificates lsscsi lsof collectl atop psmisc
 
  
−
        echo "post-install - STAGE 4"
+
==== Step 4 ====
−
                apt-get -y install git unzip python3 python-pygame
+
log to newly installed raspbian system and execute:
−
 
+
<pre>
−
        echo "post-install - STAGE 5"
+
bash -x /boot/post-install.txt install
−
                apt-get -y install cmatrix util-linux
+
</pre>
−
                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"
+
==== Step 5 ====
−
                mkfs.btrfs -f /dev/sda
+
Enjoy matrix display on your monitor :o)
−
                (
 
−
                        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)